#[doc = "`AggregateTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct AggregateTransform {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<AggregateTransformAs>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub cross: ::std::option::Option<AggregateTransformCross>,
#[serde(default = "defaults::aggregate_transform_drop")]
pub drop: AggregateTransformDrop,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub fields: ::std::option::Option<AggregateTransformFields>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<AggregateTransformGroupby>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub key: ::std::option::Option<AggregateTransformKey>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub ops: ::std::option::Option<AggregateTransformOps>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: AggregateTransformType,
}
#[doc = "`AggregateTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformAs {
Array(::std::vec::Vec<AggregateTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<AggregateTransformAsArrayItem>> for AggregateTransformAs {
fn from(value: ::std::vec::Vec<AggregateTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for AggregateTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AggregateTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
Null,
}
impl ::std::convert::From<SignalRef> for AggregateTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AggregateTransformCross`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformCross {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for AggregateTransformCross {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for AggregateTransformCross {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AggregateTransformDrop`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformDrop {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::default::Default for AggregateTransformDrop {
fn default() -> Self {
AggregateTransformDrop::Boolean(true)
}
}
impl ::std::convert::From<bool> for AggregateTransformDrop {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for AggregateTransformDrop {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AggregateTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformFields {
Array(::std::vec::Vec<AggregateTransformFieldsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<AggregateTransformFieldsArrayItem>>
for AggregateTransformFields
{
fn from(value: ::std::vec::Vec<AggregateTransformFieldsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for AggregateTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AggregateTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
Null,
}
impl ::std::convert::From<ScaleField> for AggregateTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for AggregateTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for AggregateTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`AggregateTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformGroupby {
Array(::std::vec::Vec<AggregateTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<AggregateTransformGroupbyArrayItem>>
for AggregateTransformGroupby
{
fn from(value: ::std::vec::Vec<AggregateTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for AggregateTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AggregateTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for AggregateTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for AggregateTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for AggregateTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`AggregateTransformKey`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformKey {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for AggregateTransformKey {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for AggregateTransformKey {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for AggregateTransformKey {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`AggregateTransformOps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformOps {
Array(::std::vec::Vec<AggregateTransformOpsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<AggregateTransformOpsArrayItem>>
for AggregateTransformOps
{
fn from(value: ::std::vec::Vec<AggregateTransformOpsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for AggregateTransformOps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AggregateTransformOpsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AggregateTransformOpsArrayItem {
Variant0(AggregateTransformOpsArrayItemVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<AggregateTransformOpsArrayItemVariant0>
for AggregateTransformOpsArrayItem
{
fn from(value: AggregateTransformOpsArrayItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for AggregateTransformOpsArrayItem {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AggregateTransformOpsArrayItemVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AggregateTransformOpsArrayItemVariant0 {
#[serde(rename = "values")]
Values,
#[serde(rename = "count")]
Count,
#[serde(rename = "__count__")]
XXcountXx,
#[serde(rename = "missing")]
Missing,
#[serde(rename = "valid")]
Valid,
#[serde(rename = "sum")]
Sum,
#[serde(rename = "product")]
Product,
#[serde(rename = "mean")]
Mean,
#[serde(rename = "average")]
Average,
#[serde(rename = "variance")]
Variance,
#[serde(rename = "variancep")]
Variancep,
#[serde(rename = "stdev")]
Stdev,
#[serde(rename = "stdevp")]
Stdevp,
#[serde(rename = "stderr")]
Stderr,
#[serde(rename = "distinct")]
Distinct,
#[serde(rename = "ci0")]
Ci0,
#[serde(rename = "ci1")]
Ci1,
#[serde(rename = "median")]
Median,
#[serde(rename = "q1")]
Q1,
#[serde(rename = "q3")]
Q3,
#[serde(rename = "min")]
Min,
#[serde(rename = "max")]
Max,
#[serde(rename = "argmin")]
Argmin,
#[serde(rename = "argmax")]
Argmax,
}
impl ::std::fmt::Display for AggregateTransformOpsArrayItemVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Values => f.write_str("values"),
Self::Count => f.write_str("count"),
Self::XXcountXx => f.write_str("__count__"),
Self::Missing => f.write_str("missing"),
Self::Valid => f.write_str("valid"),
Self::Sum => f.write_str("sum"),
Self::Product => f.write_str("product"),
Self::Mean => f.write_str("mean"),
Self::Average => f.write_str("average"),
Self::Variance => f.write_str("variance"),
Self::Variancep => f.write_str("variancep"),
Self::Stdev => f.write_str("stdev"),
Self::Stdevp => f.write_str("stdevp"),
Self::Stderr => f.write_str("stderr"),
Self::Distinct => f.write_str("distinct"),
Self::Ci0 => f.write_str("ci0"),
Self::Ci1 => f.write_str("ci1"),
Self::Median => f.write_str("median"),
Self::Q1 => f.write_str("q1"),
Self::Q3 => f.write_str("q3"),
Self::Min => f.write_str("min"),
Self::Max => f.write_str("max"),
Self::Argmin => f.write_str("argmin"),
Self::Argmax => f.write_str("argmax"),
}
}
}
impl ::std::str::FromStr for AggregateTransformOpsArrayItemVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"values" => Ok(Self::Values),
"count" => Ok(Self::Count),
"__count__" => Ok(Self::XXcountXx),
"missing" => Ok(Self::Missing),
"valid" => Ok(Self::Valid),
"sum" => Ok(Self::Sum),
"product" => Ok(Self::Product),
"mean" => Ok(Self::Mean),
"average" => Ok(Self::Average),
"variance" => Ok(Self::Variance),
"variancep" => Ok(Self::Variancep),
"stdev" => Ok(Self::Stdev),
"stdevp" => Ok(Self::Stdevp),
"stderr" => Ok(Self::Stderr),
"distinct" => Ok(Self::Distinct),
"ci0" => Ok(Self::Ci0),
"ci1" => Ok(Self::Ci1),
"median" => Ok(Self::Median),
"q1" => Ok(Self::Q1),
"q3" => Ok(Self::Q3),
"min" => Ok(Self::Min),
"max" => Ok(Self::Max),
"argmin" => Ok(Self::Argmin),
"argmax" => Ok(Self::Argmax),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AggregateTransformOpsArrayItemVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AggregateTransformOpsArrayItemVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AggregateTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AggregateTransformType {
#[serde(rename = "aggregate")]
Aggregate,
}
impl ::std::fmt::Display for AggregateTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Aggregate => f.write_str("aggregate"),
}
}
}
impl ::std::str::FromStr for AggregateTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"aggregate" => Ok(Self::Aggregate),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AggregateTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AggregateTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AlignValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AlignValue {
Variant0(::std::vec::Vec<AlignValueVariant0Item>),
Variant1(AlignValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<AlignValueVariant0Item>> for AlignValue {
fn from(value: ::std::vec::Vec<AlignValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValueVariant1> for AlignValue {
fn from(value: AlignValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AlignValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AlignValueVariant0Item {
Variant0(AlignValueVariant0ItemVariant0),
Variant1(AlignValueVariant0ItemVariant1),
Variant2(AlignValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<AlignValueVariant0ItemVariant0> for AlignValueVariant0Item {
fn from(value: AlignValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValueVariant0ItemVariant1> for AlignValueVariant0Item {
fn from(value: AlignValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<AlignValueVariant0ItemVariant2> for AlignValueVariant0Item {
fn from(value: AlignValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`AlignValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AlignValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: AlignValueVariant0ItemVariant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: AlignValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`AlignValueVariant0ItemVariant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AlignValueVariant0ItemVariant0Variant1Value {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for AlignValueVariant0ItemVariant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for AlignValueVariant0ItemVariant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AlignValueVariant0ItemVariant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for AlignValueVariant0ItemVariant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AlignValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AlignValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for AlignValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for AlignValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for AlignValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for AlignValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for AlignValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for AlignValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`AlignValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AlignValueVariant0ItemVariant1 {}
#[doc = "`AlignValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AlignValueVariant0ItemVariant2 {}
#[doc = "`AlignValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AlignValueVariant1 {
Variant0(AlignValueVariant1Variant0),
Variant1(AlignValueVariant1Variant1),
Variant2(AlignValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<AlignValueVariant1Variant0> for AlignValueVariant1 {
fn from(value: AlignValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValueVariant1Variant1> for AlignValueVariant1 {
fn from(value: AlignValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<AlignValueVariant1Variant2> for AlignValueVariant1 {
fn from(value: AlignValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`AlignValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AlignValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: AlignValueVariant1Variant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: AlignValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`AlignValueVariant1Variant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AlignValueVariant1Variant0Variant1Value {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for AlignValueVariant1Variant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for AlignValueVariant1Variant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AlignValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AlignValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AlignValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AlignValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for AlignValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for AlignValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for AlignValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AlignValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for AlignValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for AlignValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`AlignValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AlignValueVariant1Variant1 {}
#[doc = "`AlignValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AlignValueVariant1Variant2 {}
#[doc = "`AnchorValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnchorValue {
Variant0(::std::vec::Vec<AnchorValueVariant0Item>),
Variant1(AnchorValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<AnchorValueVariant0Item>> for AnchorValue {
fn from(value: ::std::vec::Vec<AnchorValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValueVariant1> for AnchorValue {
fn from(value: AnchorValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AnchorValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnchorValueVariant0Item {
Variant0(AnchorValueVariant0ItemVariant0),
Variant1(AnchorValueVariant0ItemVariant1),
Variant2(AnchorValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<AnchorValueVariant0ItemVariant0> for AnchorValueVariant0Item {
fn from(value: AnchorValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValueVariant0ItemVariant1> for AnchorValueVariant0Item {
fn from(value: AnchorValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<AnchorValueVariant0ItemVariant2> for AnchorValueVariant0Item {
fn from(value: AnchorValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`AnchorValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnchorValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: AnchorValueVariant0ItemVariant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: AnchorValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`AnchorValueVariant0ItemVariant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AnchorValueVariant0ItemVariant0Variant1Value {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for AnchorValueVariant0ItemVariant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for AnchorValueVariant0ItemVariant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AnchorValueVariant0ItemVariant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for AnchorValueVariant0ItemVariant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AnchorValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnchorValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for AnchorValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for AnchorValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for AnchorValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for AnchorValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for AnchorValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for AnchorValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`AnchorValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AnchorValueVariant0ItemVariant1 {}
#[doc = "`AnchorValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AnchorValueVariant0ItemVariant2 {}
#[doc = "`AnchorValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnchorValueVariant1 {
Variant0(AnchorValueVariant1Variant0),
Variant1(AnchorValueVariant1Variant1),
Variant2(AnchorValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<AnchorValueVariant1Variant0> for AnchorValueVariant1 {
fn from(value: AnchorValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValueVariant1Variant1> for AnchorValueVariant1 {
fn from(value: AnchorValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<AnchorValueVariant1Variant2> for AnchorValueVariant1 {
fn from(value: AnchorValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`AnchorValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnchorValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: AnchorValueVariant1Variant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: AnchorValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`AnchorValueVariant1Variant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AnchorValueVariant1Variant0Variant1Value {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for AnchorValueVariant1Variant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for AnchorValueVariant1Variant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AnchorValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AnchorValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AnchorValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnchorValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for AnchorValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for AnchorValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for AnchorValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AnchorValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for AnchorValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for AnchorValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`AnchorValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AnchorValueVariant1Variant1 {}
#[doc = "`AnchorValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AnchorValueVariant1Variant2 {}
#[doc = "`AnyValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnyValue {
Variant0(::std::vec::Vec<AnyValueVariant0Item>),
Variant1(AnyValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<AnyValueVariant0Item>> for AnyValue {
fn from(value: ::std::vec::Vec<AnyValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnyValueVariant1> for AnyValue {
fn from(value: AnyValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AnyValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnyValueVariant0Item {
Variant0(AnyValueVariant0ItemVariant0),
Variant1(AnyValueVariant0ItemVariant1),
Variant2(AnyValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<AnyValueVariant0ItemVariant0> for AnyValueVariant0Item {
fn from(value: AnyValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnyValueVariant0ItemVariant1> for AnyValueVariant0Item {
fn from(value: AnyValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<AnyValueVariant0ItemVariant2> for AnyValueVariant0Item {
fn from(value: AnyValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`AnyValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnyValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: ::serde_json::Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: AnyValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`AnyValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnyValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for AnyValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for AnyValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for AnyValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AnyValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for AnyValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for AnyValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`AnyValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AnyValueVariant0ItemVariant1 {}
#[doc = "`AnyValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AnyValueVariant0ItemVariant2 {}
#[doc = "`AnyValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnyValueVariant1 {
Variant0(AnyValueVariant1Variant0),
Variant1(AnyValueVariant1Variant1),
Variant2(AnyValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<AnyValueVariant1Variant0> for AnyValueVariant1 {
fn from(value: AnyValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnyValueVariant1Variant1> for AnyValueVariant1 {
fn from(value: AnyValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<AnyValueVariant1Variant2> for AnyValueVariant1 {
fn from(value: AnyValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`AnyValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnyValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: ::serde_json::Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: AnyValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`AnyValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AnyValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for AnyValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for AnyValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for AnyValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AnyValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for AnyValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for AnyValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`AnyValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AnyValueVariant1Variant1 {}
#[doc = "`AnyValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum AnyValueVariant1Variant2 {}
#[doc = "`ArrayOrSignal`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ArrayOrSignal {
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ArrayOrSignal {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ArrayOrSignal {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ArrayValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ArrayValue {
Variant0(::std::vec::Vec<ArrayValueVariant0Item>),
Variant1(ArrayValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<ArrayValueVariant0Item>> for ArrayValue {
fn from(value: ::std::vec::Vec<ArrayValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValueVariant1> for ArrayValue {
fn from(value: ArrayValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`ArrayValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ArrayValueVariant0Item {
Variant0(ArrayValueVariant0ItemVariant0),
Variant1(ArrayValueVariant0ItemVariant1),
Variant2(ArrayValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<ArrayValueVariant0ItemVariant0> for ArrayValueVariant0Item {
fn from(value: ArrayValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValueVariant0ItemVariant1> for ArrayValueVariant0Item {
fn from(value: ArrayValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<ArrayValueVariant0ItemVariant2> for ArrayValueVariant0Item {
fn from(value: ArrayValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`ArrayValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ArrayValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: ::std::vec::Vec<::serde_json::Value>,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: ArrayValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`ArrayValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ArrayValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for ArrayValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for ArrayValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for ArrayValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for ArrayValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for ArrayValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for ArrayValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`ArrayValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum ArrayValueVariant0ItemVariant1 {}
#[doc = "`ArrayValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum ArrayValueVariant0ItemVariant2 {}
#[doc = "`ArrayValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ArrayValueVariant1 {
Variant0(ArrayValueVariant1Variant0),
Variant1(ArrayValueVariant1Variant1),
Variant2(ArrayValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<ArrayValueVariant1Variant0> for ArrayValueVariant1 {
fn from(value: ArrayValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValueVariant1Variant1> for ArrayValueVariant1 {
fn from(value: ArrayValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<ArrayValueVariant1Variant2> for ArrayValueVariant1 {
fn from(value: ArrayValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`ArrayValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ArrayValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: ::std::vec::Vec<::serde_json::Value>,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: ArrayValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`ArrayValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ArrayValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for ArrayValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for ArrayValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for ArrayValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ArrayValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for ArrayValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for ArrayValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`ArrayValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum ArrayValueVariant1Variant1 {}
#[doc = "`ArrayValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum ArrayValueVariant1Variant2 {}
#[doc = "`Autosize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Autosize {
Variant0(AutosizeVariant0),
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
contains: ::std::option::Option<AutosizeVariant1Contains>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
resize: ::std::option::Option<bool>,
#[serde(rename = "type")]
type_: AutosizeVariant1Type,
},
Variant2(SignalRef),
}
impl ::std::convert::From<AutosizeVariant0> for Autosize {
fn from(value: AutosizeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for Autosize {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`AutosizeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AutosizeVariant0 {
#[serde(rename = "pad")]
Pad,
#[serde(rename = "fit")]
Fit,
#[serde(rename = "fit-x")]
FitX,
#[serde(rename = "fit-y")]
FitY,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for AutosizeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Pad => f.write_str("pad"),
Self::Fit => f.write_str("fit"),
Self::FitX => f.write_str("fit-x"),
Self::FitY => f.write_str("fit-y"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for AutosizeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pad" => Ok(Self::Pad),
"fit" => Ok(Self::Fit),
"fit-x" => Ok(Self::FitX),
"fit-y" => Ok(Self::FitY),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AutosizeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AutosizeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AutosizeVariant1Contains`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AutosizeVariant1Contains {
#[serde(rename = "content")]
Content,
#[serde(rename = "padding")]
Padding,
}
impl ::std::fmt::Display for AutosizeVariant1Contains {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Content => f.write_str("content"),
Self::Padding => f.write_str("padding"),
}
}
}
impl ::std::str::FromStr for AutosizeVariant1Contains {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"content" => Ok(Self::Content),
"padding" => Ok(Self::Padding),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AutosizeVariant1Contains {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AutosizeVariant1Contains {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AutosizeVariant1Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AutosizeVariant1Type {
#[serde(rename = "pad")]
Pad,
#[serde(rename = "fit")]
Fit,
#[serde(rename = "fit-x")]
FitX,
#[serde(rename = "fit-y")]
FitY,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for AutosizeVariant1Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Pad => f.write_str("pad"),
Self::Fit => f.write_str("fit"),
Self::FitX => f.write_str("fit-x"),
Self::FitY => f.write_str("fit-y"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for AutosizeVariant1Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pad" => Ok(Self::Pad),
"fit" => Ok(Self::Fit),
"fit-x" => Ok(Self::FitX),
"fit-y" => Ok(Self::FitY),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AutosizeVariant1Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AutosizeVariant1Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::default::Default for AutosizeVariant1Type {
fn default() -> Self {
AutosizeVariant1Type::Pad
}
}
#[doc = "`Axis`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Axis {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub aria: ::std::option::Option<bool>,
#[serde(
rename = "bandPosition",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub band_position: ::std::option::Option<AxisBandPosition>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub domain: ::std::option::Option<bool>,
#[serde(
rename = "domainCap",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub domain_cap: ::std::option::Option<AxisDomainCap>,
#[serde(
rename = "domainColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub domain_color: ::std::option::Option<AxisDomainColor>,
#[serde(
rename = "domainDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub domain_dash: ::std::option::Option<AxisDomainDash>,
#[serde(
rename = "domainDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub domain_dash_offset: ::std::option::Option<AxisDomainDashOffset>,
#[serde(
rename = "domainOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub domain_opacity: ::std::option::Option<AxisDomainOpacity>,
#[serde(
rename = "domainWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub domain_width: ::std::option::Option<AxisDomainWidth>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub encode: ::std::option::Option<AxisEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub format: ::std::option::Option<AxisFormat>,
#[serde(
rename = "formatType",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub format_type: ::std::option::Option<AxisFormatType>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub grid: ::std::option::Option<bool>,
#[serde(
rename = "gridCap",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub grid_cap: ::std::option::Option<AxisGridCap>,
#[serde(
rename = "gridColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub grid_color: ::std::option::Option<AxisGridColor>,
#[serde(
rename = "gridDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub grid_dash: ::std::option::Option<AxisGridDash>,
#[serde(
rename = "gridDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub grid_dash_offset: ::std::option::Option<AxisGridDashOffset>,
#[serde(
rename = "gridOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub grid_opacity: ::std::option::Option<AxisGridOpacity>,
#[serde(
rename = "gridScale",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub grid_scale: ::std::option::Option<::std::string::String>,
#[serde(
rename = "gridWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub grid_width: ::std::option::Option<AxisGridWidth>,
#[serde(
rename = "labelAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_align: ::std::option::Option<AxisLabelAlign>,
#[serde(
rename = "labelAngle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_angle: ::std::option::Option<AxisLabelAngle>,
#[serde(
rename = "labelBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_baseline: ::std::option::Option<AxisLabelBaseline>,
#[serde(
rename = "labelBound",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_bound: ::std::option::Option<AxisLabelBound>,
#[serde(
rename = "labelColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_color: ::std::option::Option<AxisLabelColor>,
#[serde(
rename = "labelFlush",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_flush: ::std::option::Option<AxisLabelFlush>,
#[serde(
rename = "labelFlushOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_flush_offset: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "labelFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_font: ::std::option::Option<AxisLabelFont>,
#[serde(
rename = "labelFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_font_size: ::std::option::Option<AxisLabelFontSize>,
#[serde(
rename = "labelFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_font_style: ::std::option::Option<AxisLabelFontStyle>,
#[serde(
rename = "labelFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_font_weight: ::std::option::Option<AxisLabelFontWeight>,
#[serde(
rename = "labelLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_limit: ::std::option::Option<AxisLabelLimit>,
#[serde(
rename = "labelLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_line_height: ::std::option::Option<AxisLabelLineHeight>,
#[serde(
rename = "labelOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_offset: ::std::option::Option<AxisLabelOffset>,
#[serde(
rename = "labelOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_opacity: ::std::option::Option<AxisLabelOpacity>,
#[serde(
rename = "labelOverlap",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_overlap: ::std::option::Option<LabelOverlap>,
#[serde(
rename = "labelPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_padding: ::std::option::Option<AxisLabelPadding>,
#[serde(
rename = "labelSeparation",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub label_separation: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub labels: ::std::option::Option<bool>,
#[serde(
rename = "maxExtent",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub max_extent: ::std::option::Option<AxisMaxExtent>,
#[serde(
rename = "minExtent",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub min_extent: ::std::option::Option<AxisMinExtent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub offset: ::std::option::Option<AxisOffset>,
pub orient: AxisOrient,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub position: ::std::option::Option<AxisPosition>,
pub scale: ::std::string::String,
#[serde(
rename = "tickBand",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_band: ::std::option::Option<TickBand>,
#[serde(
rename = "tickCap",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_cap: ::std::option::Option<AxisTickCap>,
#[serde(
rename = "tickColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_color: ::std::option::Option<AxisTickColor>,
#[serde(
rename = "tickCount",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_count: ::std::option::Option<TickCount>,
#[serde(
rename = "tickDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_dash: ::std::option::Option<AxisTickDash>,
#[serde(
rename = "tickDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_dash_offset: ::std::option::Option<AxisTickDashOffset>,
#[serde(
rename = "tickExtra",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_extra: ::std::option::Option<BooleanOrSignal>,
#[serde(
rename = "tickMinStep",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_min_step: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "tickOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_offset: ::std::option::Option<AxisTickOffset>,
#[serde(
rename = "tickOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_opacity: ::std::option::Option<AxisTickOpacity>,
#[serde(
rename = "tickRound",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_round: ::std::option::Option<AxisTickRound>,
#[serde(
rename = "tickSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_size: ::std::option::Option<AxisTickSize>,
#[serde(
rename = "tickWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub tick_width: ::std::option::Option<AxisTickWidth>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub ticks: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<TextOrSignal>,
#[serde(
rename = "titleAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_align: ::std::option::Option<AxisTitleAlign>,
#[serde(
rename = "titleAnchor",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_anchor: ::std::option::Option<AxisTitleAnchor>,
#[serde(
rename = "titleAngle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_angle: ::std::option::Option<AxisTitleAngle>,
#[serde(
rename = "titleBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_baseline: ::std::option::Option<AxisTitleBaseline>,
#[serde(
rename = "titleColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_color: ::std::option::Option<AxisTitleColor>,
#[serde(
rename = "titleFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_font: ::std::option::Option<AxisTitleFont>,
#[serde(
rename = "titleFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_font_size: ::std::option::Option<AxisTitleFontSize>,
#[serde(
rename = "titleFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_font_style: ::std::option::Option<AxisTitleFontStyle>,
#[serde(
rename = "titleFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_font_weight: ::std::option::Option<AxisTitleFontWeight>,
#[serde(
rename = "titleLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_limit: ::std::option::Option<AxisTitleLimit>,
#[serde(
rename = "titleLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_line_height: ::std::option::Option<AxisTitleLineHeight>,
#[serde(
rename = "titleOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_opacity: ::std::option::Option<AxisTitleOpacity>,
#[serde(
rename = "titlePadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_padding: ::std::option::Option<AxisTitlePadding>,
#[serde(
rename = "titleX",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_x: ::std::option::Option<AxisTitleX>,
#[serde(
rename = "titleY",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub title_y: ::std::option::Option<AxisTitleY>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub translate: ::std::option::Option<AxisTranslate>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub values: ::std::option::Option<ArrayOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub zindex: ::std::option::Option<f64>,
}
#[doc = "`AxisBandPosition`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisBandPosition {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisBandPosition {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisBandPosition {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisDomainCap`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisDomainCap {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for AxisDomainCap {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisDomainColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisDomainColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for AxisDomainColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`AxisDomainDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisDomainDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for AxisDomainDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for AxisDomainDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisDomainDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisDomainDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisDomainDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisDomainDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisDomainOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisDomainOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisDomainOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisDomainOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisDomainWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisDomainWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisDomainWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisDomainWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisEncode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct AxisEncode {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub axis: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub domain: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub grid: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub labels: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub ticks: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<GuideEncode>,
}
#[doc = "`AxisFormat`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum AxisFormat {
String(::std::string::String),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
date: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
day: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
hours: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
milliseconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
minutes: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
month: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
quarter: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
seconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
week: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
year: ::std::option::Option<::std::string::String>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for AxisFormat {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AxisFormatType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisFormatType {
Variant0(AxisFormatTypeVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<AxisFormatTypeVariant0> for AxisFormatType {
fn from(value: AxisFormatTypeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for AxisFormatType {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisFormatTypeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AxisFormatTypeVariant0 {
#[serde(rename = "number")]
Number,
#[serde(rename = "time")]
Time,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for AxisFormatTypeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Number => f.write_str("number"),
Self::Time => f.write_str("time"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for AxisFormatTypeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"number" => Ok(Self::Number),
"time" => Ok(Self::Time),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AxisFormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AxisFormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AxisGridCap`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisGridCap {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for AxisGridCap {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisGridColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisGridColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for AxisGridColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`AxisGridDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisGridDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for AxisGridDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for AxisGridDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisGridDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisGridDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisGridDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisGridDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisGridOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisGridOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisGridOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisGridOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisGridWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisGridWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisGridWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisGridWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelAlign {
Variant0(AxisLabelAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<AxisLabelAlignVariant0> for AxisLabelAlign {
fn from(value: AxisLabelAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for AxisLabelAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AxisLabelAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for AxisLabelAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for AxisLabelAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AxisLabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AxisLabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AxisLabelAngle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelAngle {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisLabelAngle {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisLabelAngle {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelBaseline {
Variant0(AxisLabelBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<AxisLabelBaselineVariant0> for AxisLabelBaseline {
fn from(value: AxisLabelBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for AxisLabelBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AxisLabelBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for AxisLabelBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for AxisLabelBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AxisLabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AxisLabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AxisLabelBound`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelBound {
Boolean(bool),
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for AxisLabelBound {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for AxisLabelBound {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for AxisLabelBound {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AxisLabelColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for AxisLabelColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`AxisLabelFlush`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelFlush {
Boolean(bool),
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for AxisLabelFlush {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for AxisLabelFlush {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for AxisLabelFlush {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`AxisLabelFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for AxisLabelFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisLabelFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisLabelFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for AxisLabelFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for AxisLabelFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for AxisLabelFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisLabelLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisLabelLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisLabelLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisLabelLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisLabelOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisLabelOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisLabelOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisLabelOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisLabelPadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisLabelPadding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisLabelPadding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisLabelPadding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisMaxExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisMaxExtent {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisMaxExtent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisMaxExtent {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisMinExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisMinExtent {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisMinExtent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisMinExtent {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisOrient {
Variant0(AxisOrientVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<AxisOrientVariant0> for AxisOrient {
fn from(value: AxisOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for AxisOrient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AxisOrientVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
}
impl ::std::fmt::Display for AxisOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
}
}
}
impl ::std::str::FromStr for AxisOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AxisOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AxisOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AxisPosition`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisPosition {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisPosition {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisPosition {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTickCap`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTickCap {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for AxisTickCap {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTickColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTickColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for AxisTickColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`AxisTickDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTickDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for AxisTickDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for AxisTickDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTickDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTickDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTickDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTickDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTickOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTickOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTickOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTickOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTickOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTickOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTickOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTickOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTickRound`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTickRound {
Variant0(bool),
Variant1(BooleanValue),
}
impl ::std::convert::From<bool> for AxisTickRound {
fn from(value: bool) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BooleanValue> for AxisTickRound {
fn from(value: BooleanValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTickSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTickSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTickSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTickSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTickWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTickWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTickWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTickWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleAlign {
Variant0(AxisTitleAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<AxisTitleAlignVariant0> for AxisTitleAlign {
fn from(value: AxisTitleAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for AxisTitleAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AxisTitleAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for AxisTitleAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for AxisTitleAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AxisTitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AxisTitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AxisTitleAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleAnchor {
Variant0(::std::option::Option<AxisTitleAnchorVariant0>),
Variant1(AnchorValue),
}
impl ::std::convert::From<::std::option::Option<AxisTitleAnchorVariant0>> for AxisTitleAnchor {
fn from(value: ::std::option::Option<AxisTitleAnchorVariant0>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValue> for AxisTitleAnchor {
fn from(value: AnchorValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleAnchorVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AxisTitleAnchorVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for AxisTitleAnchorVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for AxisTitleAnchorVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AxisTitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AxisTitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AxisTitleAngle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleAngle {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTitleAngle {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTitleAngle {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleBaseline {
Variant0(AxisTitleBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<AxisTitleBaselineVariant0> for AxisTitleBaseline {
fn from(value: AxisTitleBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for AxisTitleBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AxisTitleBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for AxisTitleBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for AxisTitleBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AxisTitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AxisTitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AxisTitleColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for AxisTitleColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`AxisTitleFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for AxisTitleFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTitleFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTitleFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for AxisTitleFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for AxisTitleFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for AxisTitleFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTitleLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTitleLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTitleLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTitleLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTitleOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTitleOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitlePadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitlePadding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTitlePadding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTitlePadding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleX {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTitleX {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTitleX {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTitleY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTitleY {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTitleY {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTitleY {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`AxisTranslate`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum AxisTranslate {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for AxisTranslate {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for AxisTranslate {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`Background`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct Background(pub StringOrSignal);
impl ::std::ops::Deref for Background {
type Target = StringOrSignal;
fn deref(&self) -> &StringOrSignal {
&self.0
}
}
impl ::std::convert::From<Background> for StringOrSignal {
fn from(value: Background) -> Self {
value.0
}
}
impl ::std::convert::From<StringOrSignal> for Background {
fn from(value: StringOrSignal) -> Self {
Self(value)
}
}
#[doc = "`BaseColorValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum BaseColorValue {
Variant0(BaseColorValueVariant0),
Variant1 {
value: LinearGradient,
},
Variant2 {
value: RadialGradient,
},
Variant3 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<f64>,
gradient: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
start: ::std::option::Option<[f64; 2usize]>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
stop: ::std::option::Option<[f64; 2usize]>,
},
Variant4 {
color: BaseColorValueVariant4Color,
},
}
impl ::std::convert::From<BaseColorValueVariant0> for BaseColorValue {
fn from(value: BaseColorValueVariant0) -> Self {
Self::Variant0(value)
}
}
#[doc = "`BaseColorValueVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaseColorValueVariant0 {
Variant0(BaseColorValueVariant0Variant0),
Variant1(BaseColorValueVariant0Variant1),
Variant2(BaseColorValueVariant0Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<BaseColorValueVariant0Variant0> for BaseColorValueVariant0 {
fn from(value: BaseColorValueVariant0Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaseColorValueVariant0Variant1> for BaseColorValueVariant0 {
fn from(value: BaseColorValueVariant0Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<BaseColorValueVariant0Variant2> for BaseColorValueVariant0 {
fn from(value: BaseColorValueVariant0Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`BaseColorValueVariant0Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaseColorValueVariant0Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
value: ::std::option::Option<::std::string::String>,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: BaseColorValueVariant0Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`BaseColorValueVariant0Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaseColorValueVariant0Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for BaseColorValueVariant0Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for BaseColorValueVariant0Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for BaseColorValueVariant0Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BaseColorValueVariant0Variant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for BaseColorValueVariant0Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for BaseColorValueVariant0Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`BaseColorValueVariant0Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BaseColorValueVariant0Variant1 {}
#[doc = "`BaseColorValueVariant0Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BaseColorValueVariant0Variant2 {}
#[doc = "`BaseColorValueVariant4Color`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaseColorValueVariant4Color {
Rgb(ColorRgb),
Hsl(ColorHsl),
Lab(ColorLab),
Hcl(ColorHcl),
}
impl ::std::convert::From<ColorRgb> for BaseColorValueVariant4Color {
fn from(value: ColorRgb) -> Self {
Self::Rgb(value)
}
}
impl ::std::convert::From<ColorHsl> for BaseColorValueVariant4Color {
fn from(value: ColorHsl) -> Self {
Self::Hsl(value)
}
}
impl ::std::convert::From<ColorLab> for BaseColorValueVariant4Color {
fn from(value: ColorLab) -> Self {
Self::Lab(value)
}
}
impl ::std::convert::From<ColorHcl> for BaseColorValueVariant4Color {
fn from(value: ColorHcl) -> Self {
Self::Hcl(value)
}
}
#[doc = "`BaselineValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaselineValue {
Variant0(::std::vec::Vec<BaselineValueVariant0Item>),
Variant1(BaselineValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<BaselineValueVariant0Item>> for BaselineValue {
fn from(value: ::std::vec::Vec<BaselineValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValueVariant1> for BaselineValue {
fn from(value: BaselineValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`BaselineValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaselineValueVariant0Item {
Variant0(BaselineValueVariant0ItemVariant0),
Variant1(BaselineValueVariant0ItemVariant1),
Variant2(BaselineValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<BaselineValueVariant0ItemVariant0> for BaselineValueVariant0Item {
fn from(value: BaselineValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValueVariant0ItemVariant1> for BaselineValueVariant0Item {
fn from(value: BaselineValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<BaselineValueVariant0ItemVariant2> for BaselineValueVariant0Item {
fn from(value: BaselineValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`BaselineValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaselineValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: BaselineValueVariant0ItemVariant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: BaselineValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`BaselineValueVariant0ItemVariant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BaselineValueVariant0ItemVariant0Variant1Value {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
}
impl ::std::fmt::Display for BaselineValueVariant0ItemVariant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
}
}
}
impl ::std::str::FromStr for BaselineValueVariant0ItemVariant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BaselineValueVariant0ItemVariant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BaselineValueVariant0ItemVariant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BaselineValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaselineValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for BaselineValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for BaselineValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for BaselineValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BaselineValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for BaselineValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for BaselineValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`BaselineValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BaselineValueVariant0ItemVariant1 {}
#[doc = "`BaselineValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BaselineValueVariant0ItemVariant2 {}
#[doc = "`BaselineValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaselineValueVariant1 {
Variant0(BaselineValueVariant1Variant0),
Variant1(BaselineValueVariant1Variant1),
Variant2(BaselineValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<BaselineValueVariant1Variant0> for BaselineValueVariant1 {
fn from(value: BaselineValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValueVariant1Variant1> for BaselineValueVariant1 {
fn from(value: BaselineValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<BaselineValueVariant1Variant2> for BaselineValueVariant1 {
fn from(value: BaselineValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`BaselineValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaselineValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: BaselineValueVariant1Variant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: BaselineValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`BaselineValueVariant1Variant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BaselineValueVariant1Variant0Variant1Value {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
}
impl ::std::fmt::Display for BaselineValueVariant1Variant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
}
}
}
impl ::std::str::FromStr for BaselineValueVariant1Variant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BaselineValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BaselineValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BaselineValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BaselineValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for BaselineValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for BaselineValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for BaselineValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BaselineValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for BaselineValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for BaselineValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`BaselineValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BaselineValueVariant1Variant1 {}
#[doc = "`BaselineValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BaselineValueVariant1Variant2 {}
#[doc = "`BinTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct BinTransform {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub anchor: ::std::option::Option<BinTransformAnchor>,
#[serde(rename = "as", default = "defaults::bin_transform_as")]
pub as_: BinTransformAs,
#[serde(default = "defaults::bin_transform_base")]
pub base: BinTransformBase,
#[serde(default = "defaults::bin_transform_divide")]
pub divide: BinTransformDivide,
pub extent: BinTransformExtent,
pub field: BinTransformField,
#[serde(default = "defaults::bin_transform_interval")]
pub interval: BinTransformInterval,
#[serde(default = "defaults::bin_transform_maxbins")]
pub maxbins: BinTransformMaxbins,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub minstep: ::std::option::Option<BinTransformMinstep>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<BinTransformName>,
#[serde(default = "defaults::bin_transform_nice")]
pub nice: BinTransformNice,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub span: ::std::option::Option<BinTransformSpan>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub step: ::std::option::Option<BinTransformStep>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub steps: ::std::option::Option<BinTransformSteps>,
#[serde(rename = "type")]
pub type_: BinTransformType,
}
#[doc = "`BinTransformAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformAnchor {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for BinTransformAnchor {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformAnchor {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformAs {
Array([BinTransformAsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for BinTransformAs {
fn default() -> Self {
BinTransformAs::Array([
BinTransformAsArrayItem::String("bin0".to_string()),
BinTransformAsArrayItem::String("bin1".to_string()),
])
}
}
impl ::std::convert::From<[BinTransformAsArrayItem; 2usize]> for BinTransformAs {
fn from(value: [BinTransformAsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for BinTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformBase {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for BinTransformBase {
fn default() -> Self {
BinTransformBase::Number(10_f64)
}
}
impl ::std::convert::From<f64> for BinTransformBase {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformBase {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformDivide`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformDivide {
Array(::std::vec::Vec<BinTransformDivideArrayItem>),
SignalRef(SignalRef),
}
impl ::std::default::Default for BinTransformDivide {
fn default() -> Self {
BinTransformDivide::Array(vec![
BinTransformDivideArrayItem::Number(5_f64),
BinTransformDivideArrayItem::Number(2_f64),
])
}
}
impl ::std::convert::From<::std::vec::Vec<BinTransformDivideArrayItem>> for BinTransformDivide {
fn from(value: ::std::vec::Vec<BinTransformDivideArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformDivide {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformDivideArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformDivideArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for BinTransformDivideArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformDivideArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformExtent {
Array([BinTransformExtentArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[BinTransformExtentArrayItem; 2usize]> for BinTransformExtent {
fn from(value: [BinTransformExtentArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformExtent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformExtentArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformExtentArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for BinTransformExtentArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformExtentArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for BinTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for BinTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for BinTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`BinTransformInterval`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformInterval {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::default::Default for BinTransformInterval {
fn default() -> Self {
BinTransformInterval::Boolean(true)
}
}
impl ::std::convert::From<bool> for BinTransformInterval {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformInterval {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformMaxbins`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformMaxbins {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for BinTransformMaxbins {
fn default() -> Self {
BinTransformMaxbins::Number(20_f64)
}
}
impl ::std::convert::From<f64> for BinTransformMaxbins {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformMaxbins {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformMinstep`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformMinstep {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for BinTransformMinstep {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformMinstep {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformName`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformName {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for BinTransformName {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformNice`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformNice {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::default::Default for BinTransformNice {
fn default() -> Self {
BinTransformNice::Boolean(true)
}
}
impl ::std::convert::From<bool> for BinTransformNice {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformNice {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformSpan`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformSpan {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for BinTransformSpan {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformSpan {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformStep`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformStep {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for BinTransformStep {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformStep {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformSteps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformSteps {
Array(::std::vec::Vec<BinTransformStepsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<BinTransformStepsArrayItem>> for BinTransformSteps {
fn from(value: ::std::vec::Vec<BinTransformStepsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformSteps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformStepsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BinTransformStepsArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for BinTransformStepsArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for BinTransformStepsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BinTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BinTransformType {
#[serde(rename = "bin")]
Bin,
}
impl ::std::fmt::Display for BinTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Bin => f.write_str("bin"),
}
}
}
impl ::std::str::FromStr for BinTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"bin" => Ok(Self::Bin),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BinTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BinTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Bind`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Bind {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
debounce: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
element: ::std::option::Option<Element>,
input: BindVariant0Input,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
name: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
debounce: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
element: ::std::option::Option<Element>,
input: BindVariant1Input,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
labels: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
name: ::std::option::Option<::std::string::String>,
options: ::std::vec::Vec<::serde_json::Value>,
},
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
debounce: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
element: ::std::option::Option<Element>,
input: BindVariant2Input,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
max: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
min: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
name: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
step: ::std::option::Option<f64>,
},
Variant3 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
debounce: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
element: ::std::option::Option<Element>,
input: BindVariant3Input,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
name: ::std::option::Option<::std::string::String>,
},
Variant4 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
debounce: ::std::option::Option<f64>,
element: Element,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
event: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`BindVariant0Input`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BindVariant0Input {
#[serde(rename = "checkbox")]
Checkbox,
}
impl ::std::fmt::Display for BindVariant0Input {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Checkbox => f.write_str("checkbox"),
}
}
}
impl ::std::str::FromStr for BindVariant0Input {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"checkbox" => Ok(Self::Checkbox),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BindVariant0Input {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BindVariant0Input {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BindVariant1Input`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BindVariant1Input {
#[serde(rename = "radio")]
Radio,
#[serde(rename = "select")]
Select,
}
impl ::std::fmt::Display for BindVariant1Input {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Radio => f.write_str("radio"),
Self::Select => f.write_str("select"),
}
}
}
impl ::std::str::FromStr for BindVariant1Input {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"radio" => Ok(Self::Radio),
"select" => Ok(Self::Select),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BindVariant1Input {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BindVariant1Input {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BindVariant2Input`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BindVariant2Input {
#[serde(rename = "range")]
Range,
}
impl ::std::fmt::Display for BindVariant2Input {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Range => f.write_str("range"),
}
}
}
impl ::std::str::FromStr for BindVariant2Input {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"range" => Ok(Self::Range),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BindVariant2Input {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BindVariant2Input {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BindVariant3Input`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct BindVariant3Input(::std::string::String);
impl ::std::ops::Deref for BindVariant3Input {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<BindVariant3Input> for ::std::string::String {
fn from(value: BindVariant3Input) -> Self {
value.0
}
}
impl ::std::convert::TryFrom<::std::string::String> for BindVariant3Input {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
if [
"checkbox".to_string(),
"radio".to_string(),
"range".to_string(),
"select".to_string(),
]
.contains(&value)
{
Err("invalid value".into())
} else {
Ok(Self(value))
}
}
}
impl<'de> ::serde::Deserialize<'de> for BindVariant3Input {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
Self::try_from(<::std::string::String>::deserialize(deserializer)?)
.map_err(|e| <D::Error as ::serde::de::Error>::custom(e.to_string()))
}
}
#[doc = "`BlendValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BlendValue {
Variant0(::std::vec::Vec<BlendValueVariant0Item>),
Variant1(BlendValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<BlendValueVariant0Item>> for BlendValue {
fn from(value: ::std::vec::Vec<BlendValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BlendValueVariant1> for BlendValue {
fn from(value: BlendValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`BlendValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BlendValueVariant0Item {
Variant0(BlendValueVariant0ItemVariant0),
Variant1(BlendValueVariant0ItemVariant1),
Variant2(BlendValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<BlendValueVariant0ItemVariant0> for BlendValueVariant0Item {
fn from(value: BlendValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BlendValueVariant0ItemVariant1> for BlendValueVariant0Item {
fn from(value: BlendValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<BlendValueVariant0ItemVariant2> for BlendValueVariant0Item {
fn from(value: BlendValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`BlendValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BlendValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
value: ::std::option::Option<BlendValueVariant0ItemVariant0Variant1Value>,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: BlendValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`BlendValueVariant0ItemVariant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BlendValueVariant0ItemVariant0Variant1Value {
#[serde(rename = "multiply")]
Multiply,
#[serde(rename = "screen")]
Screen,
#[serde(rename = "overlay")]
Overlay,
#[serde(rename = "darken")]
Darken,
#[serde(rename = "lighten")]
Lighten,
#[serde(rename = "color-dodge")]
ColorDodge,
#[serde(rename = "color-burn")]
ColorBurn,
#[serde(rename = "hard-light")]
HardLight,
#[serde(rename = "soft-light")]
SoftLight,
#[serde(rename = "difference")]
Difference,
#[serde(rename = "exclusion")]
Exclusion,
#[serde(rename = "hue")]
Hue,
#[serde(rename = "saturation")]
Saturation,
#[serde(rename = "color")]
Color,
#[serde(rename = "luminosity")]
Luminosity,
}
impl ::std::fmt::Display for BlendValueVariant0ItemVariant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Multiply => f.write_str("multiply"),
Self::Screen => f.write_str("screen"),
Self::Overlay => f.write_str("overlay"),
Self::Darken => f.write_str("darken"),
Self::Lighten => f.write_str("lighten"),
Self::ColorDodge => f.write_str("color-dodge"),
Self::ColorBurn => f.write_str("color-burn"),
Self::HardLight => f.write_str("hard-light"),
Self::SoftLight => f.write_str("soft-light"),
Self::Difference => f.write_str("difference"),
Self::Exclusion => f.write_str("exclusion"),
Self::Hue => f.write_str("hue"),
Self::Saturation => f.write_str("saturation"),
Self::Color => f.write_str("color"),
Self::Luminosity => f.write_str("luminosity"),
}
}
}
impl ::std::str::FromStr for BlendValueVariant0ItemVariant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"multiply" => Ok(Self::Multiply),
"screen" => Ok(Self::Screen),
"overlay" => Ok(Self::Overlay),
"darken" => Ok(Self::Darken),
"lighten" => Ok(Self::Lighten),
"color-dodge" => Ok(Self::ColorDodge),
"color-burn" => Ok(Self::ColorBurn),
"hard-light" => Ok(Self::HardLight),
"soft-light" => Ok(Self::SoftLight),
"difference" => Ok(Self::Difference),
"exclusion" => Ok(Self::Exclusion),
"hue" => Ok(Self::Hue),
"saturation" => Ok(Self::Saturation),
"color" => Ok(Self::Color),
"luminosity" => Ok(Self::Luminosity),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BlendValueVariant0ItemVariant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BlendValueVariant0ItemVariant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BlendValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BlendValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for BlendValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for BlendValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for BlendValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BlendValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for BlendValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for BlendValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`BlendValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BlendValueVariant0ItemVariant1 {}
#[doc = "`BlendValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BlendValueVariant0ItemVariant2 {}
#[doc = "`BlendValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BlendValueVariant1 {
Variant0(BlendValueVariant1Variant0),
Variant1(BlendValueVariant1Variant1),
Variant2(BlendValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<BlendValueVariant1Variant0> for BlendValueVariant1 {
fn from(value: BlendValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BlendValueVariant1Variant1> for BlendValueVariant1 {
fn from(value: BlendValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<BlendValueVariant1Variant2> for BlendValueVariant1 {
fn from(value: BlendValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`BlendValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BlendValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
value: ::std::option::Option<BlendValueVariant1Variant0Variant1Value>,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: BlendValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`BlendValueVariant1Variant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BlendValueVariant1Variant0Variant1Value {
#[serde(rename = "multiply")]
Multiply,
#[serde(rename = "screen")]
Screen,
#[serde(rename = "overlay")]
Overlay,
#[serde(rename = "darken")]
Darken,
#[serde(rename = "lighten")]
Lighten,
#[serde(rename = "color-dodge")]
ColorDodge,
#[serde(rename = "color-burn")]
ColorBurn,
#[serde(rename = "hard-light")]
HardLight,
#[serde(rename = "soft-light")]
SoftLight,
#[serde(rename = "difference")]
Difference,
#[serde(rename = "exclusion")]
Exclusion,
#[serde(rename = "hue")]
Hue,
#[serde(rename = "saturation")]
Saturation,
#[serde(rename = "color")]
Color,
#[serde(rename = "luminosity")]
Luminosity,
}
impl ::std::fmt::Display for BlendValueVariant1Variant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Multiply => f.write_str("multiply"),
Self::Screen => f.write_str("screen"),
Self::Overlay => f.write_str("overlay"),
Self::Darken => f.write_str("darken"),
Self::Lighten => f.write_str("lighten"),
Self::ColorDodge => f.write_str("color-dodge"),
Self::ColorBurn => f.write_str("color-burn"),
Self::HardLight => f.write_str("hard-light"),
Self::SoftLight => f.write_str("soft-light"),
Self::Difference => f.write_str("difference"),
Self::Exclusion => f.write_str("exclusion"),
Self::Hue => f.write_str("hue"),
Self::Saturation => f.write_str("saturation"),
Self::Color => f.write_str("color"),
Self::Luminosity => f.write_str("luminosity"),
}
}
}
impl ::std::str::FromStr for BlendValueVariant1Variant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"multiply" => Ok(Self::Multiply),
"screen" => Ok(Self::Screen),
"overlay" => Ok(Self::Overlay),
"darken" => Ok(Self::Darken),
"lighten" => Ok(Self::Lighten),
"color-dodge" => Ok(Self::ColorDodge),
"color-burn" => Ok(Self::ColorBurn),
"hard-light" => Ok(Self::HardLight),
"soft-light" => Ok(Self::SoftLight),
"difference" => Ok(Self::Difference),
"exclusion" => Ok(Self::Exclusion),
"hue" => Ok(Self::Hue),
"saturation" => Ok(Self::Saturation),
"color" => Ok(Self::Color),
"luminosity" => Ok(Self::Luminosity),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BlendValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BlendValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BlendValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BlendValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for BlendValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for BlendValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for BlendValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BlendValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for BlendValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for BlendValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`BlendValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BlendValueVariant1Variant1 {}
#[doc = "`BlendValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BlendValueVariant1Variant2 {}
#[doc = "`BooleanOrSignal`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BooleanOrSignal {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for BooleanOrSignal {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for BooleanOrSignal {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`BooleanValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BooleanValue {
Variant0(::std::vec::Vec<BooleanValueVariant0Item>),
Variant1(BooleanValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<BooleanValueVariant0Item>> for BooleanValue {
fn from(value: ::std::vec::Vec<BooleanValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BooleanValueVariant1> for BooleanValue {
fn from(value: BooleanValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`BooleanValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BooleanValueVariant0Item {
Variant0(BooleanValueVariant0ItemVariant0),
Variant1(BooleanValueVariant0ItemVariant1),
Variant2(BooleanValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<BooleanValueVariant0ItemVariant0> for BooleanValueVariant0Item {
fn from(value: BooleanValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BooleanValueVariant0ItemVariant1> for BooleanValueVariant0Item {
fn from(value: BooleanValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<BooleanValueVariant0ItemVariant2> for BooleanValueVariant0Item {
fn from(value: BooleanValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`BooleanValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BooleanValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: bool,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: BooleanValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`BooleanValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BooleanValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for BooleanValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for BooleanValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for BooleanValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BooleanValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for BooleanValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for BooleanValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`BooleanValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BooleanValueVariant0ItemVariant1 {}
#[doc = "`BooleanValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BooleanValueVariant0ItemVariant2 {}
#[doc = "`BooleanValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BooleanValueVariant1 {
Variant0(BooleanValueVariant1Variant0),
Variant1(BooleanValueVariant1Variant1),
Variant2(BooleanValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<BooleanValueVariant1Variant0> for BooleanValueVariant1 {
fn from(value: BooleanValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BooleanValueVariant1Variant1> for BooleanValueVariant1 {
fn from(value: BooleanValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<BooleanValueVariant1Variant2> for BooleanValueVariant1 {
fn from(value: BooleanValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`BooleanValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BooleanValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: bool,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: BooleanValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`BooleanValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BooleanValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for BooleanValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for BooleanValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for BooleanValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BooleanValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for BooleanValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for BooleanValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`BooleanValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BooleanValueVariant1Variant1 {}
#[doc = "`BooleanValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum BooleanValueVariant1Variant2 {}
#[doc = "`CollectTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CollectTransform {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(rename = "type")]
pub type_: CollectTransformType,
}
#[doc = "`CollectTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CollectTransformType {
#[serde(rename = "collect")]
Collect,
}
impl ::std::fmt::Display for CollectTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Collect => f.write_str("collect"),
}
}
}
impl ::std::str::FromStr for CollectTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"collect" => Ok(Self::Collect),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CollectTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CollectTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ColorHcl`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct ColorHcl {
pub c: NumberValue,
pub h: NumberValue,
pub l: NumberValue,
}
#[doc = "`ColorHsl`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct ColorHsl {
pub h: NumberValue,
pub l: NumberValue,
pub s: NumberValue,
}
#[doc = "`ColorLab`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct ColorLab {
pub a: NumberValue,
pub b: NumberValue,
pub l: NumberValue,
}
#[doc = "`ColorRgb`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct ColorRgb {
pub b: NumberValue,
pub g: NumberValue,
pub r: NumberValue,
}
#[doc = "`Compare`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Compare {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
field: ::std::option::Option<CompareVariant0Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
Variant1 {
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
field: ::std::vec::Vec<CompareVariant1FieldItem>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
order: ::std::vec::Vec<SortOrder>,
},
}
#[doc = "`CompareVariant0Field`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CompareVariant0Field {
ScaleField(ScaleField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for CompareVariant0Field {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<Expr> for CompareVariant0Field {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`CompareVariant1FieldItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CompareVariant1FieldItem {
ScaleField(ScaleField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for CompareVariant1FieldItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<Expr> for CompareVariant1FieldItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ContourTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ContourTransform {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub bandwidth: ::std::option::Option<ContourTransformBandwidth>,
#[serde(
rename = "cellSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub cell_size: ::std::option::Option<ContourTransformCellSize>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub count: ::std::option::Option<ContourTransformCount>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub nice: ::std::option::Option<ContourTransformNice>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
pub size: ContourTransformSize,
#[serde(default = "defaults::contour_transform_smooth")]
pub smooth: ContourTransformSmooth,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub thresholds: ::std::option::Option<ContourTransformThresholds>,
#[serde(rename = "type")]
pub type_: ContourTransformType,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub values: ::std::option::Option<ContourTransformValues>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub weight: ::std::option::Option<ContourTransformWeight>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub x: ::std::option::Option<ContourTransformX>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub y: ::std::option::Option<ContourTransformY>,
}
#[doc = "`ContourTransformBandwidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformBandwidth {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ContourTransformBandwidth {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformBandwidth {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformCellSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformCellSize {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ContourTransformCellSize {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformCellSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformCount`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformCount {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ContourTransformCount {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformCount {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformNice`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformNice {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for ContourTransformNice {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformNice {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformSize {
Array([ContourTransformSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[ContourTransformSizeArrayItem; 2usize]> for ContourTransformSize {
fn from(value: [ContourTransformSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ContourTransformSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformSmooth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformSmooth {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::default::Default for ContourTransformSmooth {
fn default() -> Self {
ContourTransformSmooth::Boolean(true)
}
}
impl ::std::convert::From<bool> for ContourTransformSmooth {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformSmooth {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformThresholds`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformThresholds {
Array(::std::vec::Vec<ContourTransformThresholdsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ContourTransformThresholdsArrayItem>>
for ContourTransformThresholds
{
fn from(value: ::std::vec::Vec<ContourTransformThresholdsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformThresholds {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformThresholdsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformThresholdsArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ContourTransformThresholdsArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformThresholdsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ContourTransformType {
#[serde(rename = "contour")]
Contour,
}
impl ::std::fmt::Display for ContourTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Contour => f.write_str("contour"),
}
}
}
impl ::std::str::FromStr for ContourTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"contour" => Ok(Self::Contour),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ContourTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ContourTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ContourTransformValues`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformValues {
Array(::std::vec::Vec<ContourTransformValuesArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ContourTransformValuesArrayItem>>
for ContourTransformValues
{
fn from(value: ::std::vec::Vec<ContourTransformValuesArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformValues {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformValuesArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformValuesArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ContourTransformValuesArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ContourTransformValuesArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ContourTransformWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformWeight {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for ContourTransformWeight {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for ContourTransformWeight {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for ContourTransformWeight {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ContourTransformX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformX {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for ContourTransformX {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for ContourTransformX {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for ContourTransformX {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ContourTransformY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ContourTransformY {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for ContourTransformY {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for ContourTransformY {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for ContourTransformY {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`CountpatternTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CountpatternTransform {
#[serde(rename = "as", default = "defaults::countpattern_transform_as")]
pub as_: CountpatternTransformAs,
#[serde(default = "defaults::countpattern_transform_case")]
pub case: CountpatternTransformCase,
pub field: CountpatternTransformField,
#[serde(default = "defaults::countpattern_transform_pattern")]
pub pattern: CountpatternTransformPattern,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub stopwords: ::std::option::Option<CountpatternTransformStopwords>,
#[serde(rename = "type")]
pub type_: CountpatternTransformType,
}
#[doc = "`CountpatternTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CountpatternTransformAs {
Array([CountpatternTransformAsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for CountpatternTransformAs {
fn default() -> Self {
CountpatternTransformAs::Array([
CountpatternTransformAsArrayItem::String("text".to_string()),
CountpatternTransformAsArrayItem::String("count".to_string()),
])
}
}
impl ::std::convert::From<[CountpatternTransformAsArrayItem; 2usize]> for CountpatternTransformAs {
fn from(value: [CountpatternTransformAsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for CountpatternTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`CountpatternTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CountpatternTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for CountpatternTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`CountpatternTransformCase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CountpatternTransformCase {
Variant0(CountpatternTransformCaseVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for CountpatternTransformCase {
fn default() -> Self {
CountpatternTransformCase::Variant0(CountpatternTransformCaseVariant0::Mixed)
}
}
impl ::std::convert::From<CountpatternTransformCaseVariant0> for CountpatternTransformCase {
fn from(value: CountpatternTransformCaseVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for CountpatternTransformCase {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`CountpatternTransformCaseVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CountpatternTransformCaseVariant0 {
#[serde(rename = "upper")]
Upper,
#[serde(rename = "lower")]
Lower,
#[serde(rename = "mixed")]
Mixed,
}
impl ::std::fmt::Display for CountpatternTransformCaseVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Upper => f.write_str("upper"),
Self::Lower => f.write_str("lower"),
Self::Mixed => f.write_str("mixed"),
}
}
}
impl ::std::str::FromStr for CountpatternTransformCaseVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"upper" => Ok(Self::Upper),
"lower" => Ok(Self::Lower),
"mixed" => Ok(Self::Mixed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CountpatternTransformCaseVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CountpatternTransformCaseVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CountpatternTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CountpatternTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for CountpatternTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for CountpatternTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for CountpatternTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`CountpatternTransformPattern`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CountpatternTransformPattern {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for CountpatternTransformPattern {
fn default() -> Self {
CountpatternTransformPattern::String("[\\w\"]+".to_string())
}
}
impl ::std::convert::From<SignalRef> for CountpatternTransformPattern {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`CountpatternTransformStopwords`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CountpatternTransformStopwords {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for CountpatternTransformStopwords {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`CountpatternTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CountpatternTransformType {
#[serde(rename = "countpattern")]
Countpattern,
}
impl ::std::fmt::Display for CountpatternTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Countpattern => f.write_str("countpattern"),
}
}
}
impl ::std::str::FromStr for CountpatternTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"countpattern" => Ok(Self::Countpattern),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CountpatternTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CountpatternTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CrossTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CrossTransform {
#[serde(rename = "as", default = "defaults::cross_transform_as")]
pub as_: CrossTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub filter: ::std::option::Option<ExprString>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: CrossTransformType,
}
#[doc = "`CrossTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CrossTransformAs {
Array([CrossTransformAsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for CrossTransformAs {
fn default() -> Self {
CrossTransformAs::Array([
CrossTransformAsArrayItem::String("a".to_string()),
CrossTransformAsArrayItem::String("b".to_string()),
])
}
}
impl ::std::convert::From<[CrossTransformAsArrayItem; 2usize]> for CrossTransformAs {
fn from(value: [CrossTransformAsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for CrossTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`CrossTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CrossTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for CrossTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`CrossTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CrossTransformType {
#[serde(rename = "cross")]
Cross,
}
impl ::std::fmt::Display for CrossTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Cross => f.write_str("cross"),
}
}
}
impl ::std::str::FromStr for CrossTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"cross" => Ok(Self::Cross),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CrossTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CrossTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CrossfilterTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CrossfilterTransform {
pub fields: CrossfilterTransformFields,
pub query: CrossfilterTransformQuery,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: CrossfilterTransformType,
}
#[doc = "`CrossfilterTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CrossfilterTransformFields {
Array(::std::vec::Vec<CrossfilterTransformFieldsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<CrossfilterTransformFieldsArrayItem>>
for CrossfilterTransformFields
{
fn from(value: ::std::vec::Vec<CrossfilterTransformFieldsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for CrossfilterTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`CrossfilterTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CrossfilterTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for CrossfilterTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for CrossfilterTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for CrossfilterTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`CrossfilterTransformQuery`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CrossfilterTransformQuery {
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for CrossfilterTransformQuery {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for CrossfilterTransformQuery {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`CrossfilterTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CrossfilterTransformType {
#[serde(rename = "crossfilter")]
Crossfilter,
}
impl ::std::fmt::Display for CrossfilterTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Crossfilter => f.write_str("crossfilter"),
}
}
}
impl ::std::str::FromStr for CrossfilterTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"crossfilter" => Ok(Self::Crossfilter),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CrossfilterTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CrossfilterTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Data`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Data {
Variant0 {
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
on: ::std::option::Option<OnTrigger>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
transform: ::std::vec::Vec<Transform>,
},
Variant1 {
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
on: ::std::option::Option<OnTrigger>,
source: DataVariant1Source,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
transform: ::std::vec::Vec<Transform>,
},
Variant2 {
#[serde(
rename = "async",
skip_serializing_if = "::std::option::Option::is_none"
)]
async_: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
format: ::std::option::Option<DataVariant2Format>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
on: ::std::option::Option<OnTrigger>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
transform: ::std::vec::Vec<Transform>,
url: StringOrSignal,
},
Variant3 {
#[serde(
rename = "async",
skip_serializing_if = "::std::option::Option::is_none"
)]
async_: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
format: ::std::option::Option<DataVariant3Format>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
on: ::std::option::Option<OnTrigger>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
transform: ::std::vec::Vec<Transform>,
values: DataVariant3Values,
},
}
#[doc = "`DataVariant1Source`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant1Source {
String(::std::string::String),
Array(::std::vec::Vec<::std::string::String>),
}
impl ::std::convert::From<::std::vec::Vec<::std::string::String>> for DataVariant1Source {
fn from(value: ::std::vec::Vec<::std::string::String>) -> Self {
Self::Array(value)
}
}
#[doc = "`DataVariant2Format`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant2Format {
Variant0 {
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_0: ::std::option::Option<DataVariant2FormatVariant0Subtype0>,
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_1: ::std::option::Option<DataVariant2FormatVariant0Subtype1>,
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_2: ::std::option::Option<DataVariant2FormatVariant0Subtype2>,
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_3: ::std::option::Option<DataVariant2FormatVariant0Subtype3>,
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_4: ::std::option::Option<DataVariant2FormatVariant0Subtype4>,
},
Variant1(SignalRef),
}
impl ::std::convert::From<SignalRef> for DataVariant2Format {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant2FormatVariant0Subtype0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct DataVariant2FormatVariant0Subtype0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parse: ::std::option::Option<DataVariant2FormatVariant0Subtype0Parse>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub type_: ::std::option::Option<StringOrSignal>,
}
#[doc = "`DataVariant2FormatVariant0Subtype0Parse`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant2FormatVariant0Subtype0Parse {
Variant0(DataVariant2FormatVariant0Subtype0ParseVariant0),
Variant1(
::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype0ParseVariant1Value,
>,
),
Variant2(SignalRef),
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype0ParseVariant0>
for DataVariant2FormatVariant0Subtype0Parse
{
fn from(value: DataVariant2FormatVariant0Subtype0ParseVariant0) -> Self {
Self::Variant0(value)
}
}
impl
::std::convert::From<
::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype0ParseVariant1Value,
>,
> for DataVariant2FormatVariant0Subtype0Parse
{
fn from(
value: ::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype0ParseVariant1Value,
>,
) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for DataVariant2FormatVariant0Subtype0Parse {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DataVariant2FormatVariant0Subtype0ParseVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype0ParseVariant0 {
#[serde(rename = "auto")]
Auto,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype0ParseVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Auto => f.write_str("auto"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype0ParseVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto" => Ok(Self::Auto),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype0ParseVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype0ParseVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype0ParseVariant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant2FormatVariant0Subtype0ParseVariant1Value {
Variant0(DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant0),
Variant1(DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1),
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype0ParseVariant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Variant0(x) => x.fmt(f),
Self::Variant1(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype0ParseVariant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Variant0(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Variant1(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype0ParseVariant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype0ParseVariant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant0>
for DataVariant2FormatVariant0Subtype0ParseVariant1Value
{
fn from(value: DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1>
for DataVariant2FormatVariant0Subtype0ParseVariant1Value
{
fn from(value: DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant0 {
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "number")]
Number,
#[serde(rename = "date")]
Date,
#[serde(rename = "string")]
String,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Boolean => f.write_str("boolean"),
Self::Number => f.write_str("number"),
Self::Date => f.write_str("date"),
Self::String => f.write_str("string"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"boolean" => Ok(Self::Boolean),
"number" => Ok(Self::Number),
"date" => Ok(Self::Date),
"string" => Ok(Self::String),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1(::std::string::String);
impl ::std::ops::Deref for DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1 {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1>
for ::std::string::String
{
fn from(value: DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1) -> Self {
value.0
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| ::regress::Regex::new("^(date|utc):.*$").unwrap());
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^(date|utc):.*$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de>
for DataVariant2FormatVariant0Subtype0ParseVariant1ValueVariant1
{
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`DataVariant2FormatVariant0Subtype1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct DataVariant2FormatVariant0Subtype1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub copy: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parse: ::std::option::Option<DataVariant2FormatVariant0Subtype1Parse>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub property: ::std::option::Option<StringOrSignal>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub type_: ::std::option::Option<DataVariant2FormatVariant0Subtype1Type>,
}
#[doc = "`DataVariant2FormatVariant0Subtype1Parse`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant2FormatVariant0Subtype1Parse {
Variant0(DataVariant2FormatVariant0Subtype1ParseVariant0),
Variant1(
::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype1ParseVariant1Value,
>,
),
Variant2(SignalRef),
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype1ParseVariant0>
for DataVariant2FormatVariant0Subtype1Parse
{
fn from(value: DataVariant2FormatVariant0Subtype1ParseVariant0) -> Self {
Self::Variant0(value)
}
}
impl
::std::convert::From<
::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype1ParseVariant1Value,
>,
> for DataVariant2FormatVariant0Subtype1Parse
{
fn from(
value: ::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype1ParseVariant1Value,
>,
) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for DataVariant2FormatVariant0Subtype1Parse {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DataVariant2FormatVariant0Subtype1ParseVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype1ParseVariant0 {
#[serde(rename = "auto")]
Auto,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype1ParseVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Auto => f.write_str("auto"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype1ParseVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto" => Ok(Self::Auto),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype1ParseVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype1ParseVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype1ParseVariant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant2FormatVariant0Subtype1ParseVariant1Value {
Variant0(DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant0),
Variant1(DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1),
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype1ParseVariant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Variant0(x) => x.fmt(f),
Self::Variant1(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype1ParseVariant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Variant0(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Variant1(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype1ParseVariant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype1ParseVariant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant0>
for DataVariant2FormatVariant0Subtype1ParseVariant1Value
{
fn from(value: DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1>
for DataVariant2FormatVariant0Subtype1ParseVariant1Value
{
fn from(value: DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant0 {
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "number")]
Number,
#[serde(rename = "date")]
Date,
#[serde(rename = "string")]
String,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Boolean => f.write_str("boolean"),
Self::Number => f.write_str("number"),
Self::Date => f.write_str("date"),
Self::String => f.write_str("string"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"boolean" => Ok(Self::Boolean),
"number" => Ok(Self::Number),
"date" => Ok(Self::Date),
"string" => Ok(Self::String),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1(::std::string::String);
impl ::std::ops::Deref for DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1 {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1>
for ::std::string::String
{
fn from(value: DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1) -> Self {
value.0
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| ::regress::Regex::new("^(date|utc):.*$").unwrap());
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^(date|utc):.*$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de>
for DataVariant2FormatVariant0Subtype1ParseVariant1ValueVariant1
{
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`DataVariant2FormatVariant0Subtype1Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype1Type {
#[serde(rename = "json")]
Json,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype1Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Json => f.write_str("json"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype1Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"json" => Ok(Self::Json),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype1Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DataVariant2FormatVariant0Subtype1Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype2`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DataVariant2FormatVariant0Subtype2 {
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub header: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parse: ::std::option::Option<DataVariant2FormatVariant0Subtype2Parse>,
#[serde(rename = "type")]
pub type_: DataVariant2FormatVariant0Subtype2Type,
}
#[doc = "`DataVariant2FormatVariant0Subtype2Parse`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant2FormatVariant0Subtype2Parse {
Variant0(DataVariant2FormatVariant0Subtype2ParseVariant0),
Variant1(
::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype2ParseVariant1Value,
>,
),
Variant2(SignalRef),
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype2ParseVariant0>
for DataVariant2FormatVariant0Subtype2Parse
{
fn from(value: DataVariant2FormatVariant0Subtype2ParseVariant0) -> Self {
Self::Variant0(value)
}
}
impl
::std::convert::From<
::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype2ParseVariant1Value,
>,
> for DataVariant2FormatVariant0Subtype2Parse
{
fn from(
value: ::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype2ParseVariant1Value,
>,
) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for DataVariant2FormatVariant0Subtype2Parse {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DataVariant2FormatVariant0Subtype2ParseVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype2ParseVariant0 {
#[serde(rename = "auto")]
Auto,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype2ParseVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Auto => f.write_str("auto"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype2ParseVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto" => Ok(Self::Auto),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype2ParseVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype2ParseVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype2ParseVariant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant2FormatVariant0Subtype2ParseVariant1Value {
Variant0(DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant0),
Variant1(DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1),
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype2ParseVariant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Variant0(x) => x.fmt(f),
Self::Variant1(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype2ParseVariant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Variant0(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Variant1(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype2ParseVariant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype2ParseVariant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant0>
for DataVariant2FormatVariant0Subtype2ParseVariant1Value
{
fn from(value: DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1>
for DataVariant2FormatVariant0Subtype2ParseVariant1Value
{
fn from(value: DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant0 {
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "number")]
Number,
#[serde(rename = "date")]
Date,
#[serde(rename = "string")]
String,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Boolean => f.write_str("boolean"),
Self::Number => f.write_str("number"),
Self::Date => f.write_str("date"),
Self::String => f.write_str("string"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"boolean" => Ok(Self::Boolean),
"number" => Ok(Self::Number),
"date" => Ok(Self::Date),
"string" => Ok(Self::String),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1(::std::string::String);
impl ::std::ops::Deref for DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1 {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1>
for ::std::string::String
{
fn from(value: DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1) -> Self {
value.0
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| ::regress::Regex::new("^(date|utc):.*$").unwrap());
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^(date|utc):.*$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de>
for DataVariant2FormatVariant0Subtype2ParseVariant1ValueVariant1
{
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`DataVariant2FormatVariant0Subtype2Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype2Type {
#[serde(rename = "csv")]
Csv,
#[serde(rename = "tsv")]
Tsv,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype2Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Csv => f.write_str("csv"),
Self::Tsv => f.write_str("tsv"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype2Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"csv" => Ok(Self::Csv),
"tsv" => Ok(Self::Tsv),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype2Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DataVariant2FormatVariant0Subtype2Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype3`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DataVariant2FormatVariant0Subtype3 {
pub delimiter: ::std::string::String,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub header: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parse: ::std::option::Option<DataVariant2FormatVariant0Subtype3Parse>,
#[serde(rename = "type")]
pub type_: DataVariant2FormatVariant0Subtype3Type,
}
#[doc = "`DataVariant2FormatVariant0Subtype3Parse`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant2FormatVariant0Subtype3Parse {
Variant0(DataVariant2FormatVariant0Subtype3ParseVariant0),
Variant1(
::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype3ParseVariant1Value,
>,
),
Variant2(SignalRef),
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype3ParseVariant0>
for DataVariant2FormatVariant0Subtype3Parse
{
fn from(value: DataVariant2FormatVariant0Subtype3ParseVariant0) -> Self {
Self::Variant0(value)
}
}
impl
::std::convert::From<
::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype3ParseVariant1Value,
>,
> for DataVariant2FormatVariant0Subtype3Parse
{
fn from(
value: ::std::collections::HashMap<
::std::string::String,
DataVariant2FormatVariant0Subtype3ParseVariant1Value,
>,
) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for DataVariant2FormatVariant0Subtype3Parse {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DataVariant2FormatVariant0Subtype3ParseVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype3ParseVariant0 {
#[serde(rename = "auto")]
Auto,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype3ParseVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Auto => f.write_str("auto"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype3ParseVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto" => Ok(Self::Auto),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype3ParseVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype3ParseVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype3ParseVariant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant2FormatVariant0Subtype3ParseVariant1Value {
Variant0(DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant0),
Variant1(DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1),
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype3ParseVariant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Variant0(x) => x.fmt(f),
Self::Variant1(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype3ParseVariant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Variant0(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Variant1(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype3ParseVariant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype3ParseVariant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant0>
for DataVariant2FormatVariant0Subtype3ParseVariant1Value
{
fn from(value: DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1>
for DataVariant2FormatVariant0Subtype3ParseVariant1Value
{
fn from(value: DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant0 {
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "number")]
Number,
#[serde(rename = "date")]
Date,
#[serde(rename = "string")]
String,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Boolean => f.write_str("boolean"),
Self::Number => f.write_str("number"),
Self::Date => f.write_str("date"),
Self::String => f.write_str("string"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"boolean" => Ok(Self::Boolean),
"number" => Ok(Self::Number),
"date" => Ok(Self::Date),
"string" => Ok(Self::String),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1(::std::string::String);
impl ::std::ops::Deref for DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1 {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1>
for ::std::string::String
{
fn from(value: DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1) -> Self {
value.0
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| ::regress::Regex::new("^(date|utc):.*$").unwrap());
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^(date|utc):.*$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de>
for DataVariant2FormatVariant0Subtype3ParseVariant1ValueVariant1
{
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`DataVariant2FormatVariant0Subtype3Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype3Type {
#[serde(rename = "dsv")]
Dsv,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype3Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Dsv => f.write_str("dsv"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype3Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"dsv" => Ok(Self::Dsv),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype3Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DataVariant2FormatVariant0Subtype3Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype4`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum DataVariant2FormatVariant0Subtype4 {
Variant0 {
feature: StringOrSignal,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
property: ::std::option::Option<StringOrSignal>,
#[serde(rename = "type")]
type_: DataVariant2FormatVariant0Subtype4Variant0Type,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
filter: ::std::option::Option<DataVariant2FormatVariant0Subtype4Variant1Filter>,
mesh: StringOrSignal,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
property: ::std::option::Option<StringOrSignal>,
#[serde(rename = "type")]
type_: DataVariant2FormatVariant0Subtype4Variant1Type,
},
}
#[doc = "`DataVariant2FormatVariant0Subtype4Variant0Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype4Variant0Type {
#[serde(rename = "topojson")]
Topojson,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype4Variant0Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Topojson => f.write_str("topojson"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype4Variant0Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"topojson" => Ok(Self::Topojson),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype4Variant0Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype4Variant0Type
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype4Variant1Filter`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype4Variant1Filter {
#[serde(rename = "interior")]
Interior,
#[serde(rename = "exterior")]
Exterior,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype4Variant1Filter {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Interior => f.write_str("interior"),
Self::Exterior => f.write_str("exterior"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype4Variant1Filter {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"interior" => Ok(Self::Interior),
"exterior" => Ok(Self::Exterior),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype4Variant1Filter {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype4Variant1Filter
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant2FormatVariant0Subtype4Variant1Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant2FormatVariant0Subtype4Variant1Type {
#[serde(rename = "topojson")]
Topojson,
}
impl ::std::fmt::Display for DataVariant2FormatVariant0Subtype4Variant1Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Topojson => f.write_str("topojson"),
}
}
}
impl ::std::str::FromStr for DataVariant2FormatVariant0Subtype4Variant1Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"topojson" => Ok(Self::Topojson),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant2FormatVariant0Subtype4Variant1Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant2FormatVariant0Subtype4Variant1Type
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3Format`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3Format {
Variant0 {
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_0: ::std::option::Option<DataVariant3FormatVariant0Subtype0>,
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_1: ::std::option::Option<DataVariant3FormatVariant0Subtype1>,
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_2: ::std::option::Option<DataVariant3FormatVariant0Subtype2>,
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_3: ::std::option::Option<DataVariant3FormatVariant0Subtype3>,
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
subtype_4: ::std::option::Option<DataVariant3FormatVariant0Subtype4>,
},
Variant1(SignalRef),
}
impl ::std::convert::From<SignalRef> for DataVariant3Format {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant3FormatVariant0Subtype0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct DataVariant3FormatVariant0Subtype0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parse: ::std::option::Option<DataVariant3FormatVariant0Subtype0Parse>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub type_: ::std::option::Option<StringOrSignal>,
}
#[doc = "`DataVariant3FormatVariant0Subtype0Parse`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3FormatVariant0Subtype0Parse {
Variant0(DataVariant3FormatVariant0Subtype0ParseVariant0),
Variant1(
::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype0ParseVariant1Value,
>,
),
Variant2(SignalRef),
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype0ParseVariant0>
for DataVariant3FormatVariant0Subtype0Parse
{
fn from(value: DataVariant3FormatVariant0Subtype0ParseVariant0) -> Self {
Self::Variant0(value)
}
}
impl
::std::convert::From<
::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype0ParseVariant1Value,
>,
> for DataVariant3FormatVariant0Subtype0Parse
{
fn from(
value: ::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype0ParseVariant1Value,
>,
) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for DataVariant3FormatVariant0Subtype0Parse {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DataVariant3FormatVariant0Subtype0ParseVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype0ParseVariant0 {
#[serde(rename = "auto")]
Auto,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype0ParseVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Auto => f.write_str("auto"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype0ParseVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto" => Ok(Self::Auto),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype0ParseVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype0ParseVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype0ParseVariant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3FormatVariant0Subtype0ParseVariant1Value {
Variant0(DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant0),
Variant1(DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1),
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype0ParseVariant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Variant0(x) => x.fmt(f),
Self::Variant1(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype0ParseVariant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Variant0(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Variant1(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype0ParseVariant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype0ParseVariant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant0>
for DataVariant3FormatVariant0Subtype0ParseVariant1Value
{
fn from(value: DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1>
for DataVariant3FormatVariant0Subtype0ParseVariant1Value
{
fn from(value: DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant0 {
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "number")]
Number,
#[serde(rename = "date")]
Date,
#[serde(rename = "string")]
String,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Boolean => f.write_str("boolean"),
Self::Number => f.write_str("number"),
Self::Date => f.write_str("date"),
Self::String => f.write_str("string"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"boolean" => Ok(Self::Boolean),
"number" => Ok(Self::Number),
"date" => Ok(Self::Date),
"string" => Ok(Self::String),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1(::std::string::String);
impl ::std::ops::Deref for DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1 {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1>
for ::std::string::String
{
fn from(value: DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1) -> Self {
value.0
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| ::regress::Regex::new("^(date|utc):.*$").unwrap());
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^(date|utc):.*$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de>
for DataVariant3FormatVariant0Subtype0ParseVariant1ValueVariant1
{
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`DataVariant3FormatVariant0Subtype1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct DataVariant3FormatVariant0Subtype1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub copy: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parse: ::std::option::Option<DataVariant3FormatVariant0Subtype1Parse>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub property: ::std::option::Option<StringOrSignal>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub type_: ::std::option::Option<DataVariant3FormatVariant0Subtype1Type>,
}
#[doc = "`DataVariant3FormatVariant0Subtype1Parse`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3FormatVariant0Subtype1Parse {
Variant0(DataVariant3FormatVariant0Subtype1ParseVariant0),
Variant1(
::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype1ParseVariant1Value,
>,
),
Variant2(SignalRef),
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype1ParseVariant0>
for DataVariant3FormatVariant0Subtype1Parse
{
fn from(value: DataVariant3FormatVariant0Subtype1ParseVariant0) -> Self {
Self::Variant0(value)
}
}
impl
::std::convert::From<
::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype1ParseVariant1Value,
>,
> for DataVariant3FormatVariant0Subtype1Parse
{
fn from(
value: ::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype1ParseVariant1Value,
>,
) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for DataVariant3FormatVariant0Subtype1Parse {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DataVariant3FormatVariant0Subtype1ParseVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype1ParseVariant0 {
#[serde(rename = "auto")]
Auto,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype1ParseVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Auto => f.write_str("auto"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype1ParseVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto" => Ok(Self::Auto),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype1ParseVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype1ParseVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype1ParseVariant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3FormatVariant0Subtype1ParseVariant1Value {
Variant0(DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant0),
Variant1(DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1),
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype1ParseVariant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Variant0(x) => x.fmt(f),
Self::Variant1(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype1ParseVariant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Variant0(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Variant1(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype1ParseVariant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype1ParseVariant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant0>
for DataVariant3FormatVariant0Subtype1ParseVariant1Value
{
fn from(value: DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1>
for DataVariant3FormatVariant0Subtype1ParseVariant1Value
{
fn from(value: DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant0 {
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "number")]
Number,
#[serde(rename = "date")]
Date,
#[serde(rename = "string")]
String,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Boolean => f.write_str("boolean"),
Self::Number => f.write_str("number"),
Self::Date => f.write_str("date"),
Self::String => f.write_str("string"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"boolean" => Ok(Self::Boolean),
"number" => Ok(Self::Number),
"date" => Ok(Self::Date),
"string" => Ok(Self::String),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1(::std::string::String);
impl ::std::ops::Deref for DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1 {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1>
for ::std::string::String
{
fn from(value: DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1) -> Self {
value.0
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| ::regress::Regex::new("^(date|utc):.*$").unwrap());
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^(date|utc):.*$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de>
for DataVariant3FormatVariant0Subtype1ParseVariant1ValueVariant1
{
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`DataVariant3FormatVariant0Subtype1Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype1Type {
#[serde(rename = "json")]
Json,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype1Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Json => f.write_str("json"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype1Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"json" => Ok(Self::Json),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype1Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DataVariant3FormatVariant0Subtype1Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype2`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DataVariant3FormatVariant0Subtype2 {
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub header: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parse: ::std::option::Option<DataVariant3FormatVariant0Subtype2Parse>,
#[serde(rename = "type")]
pub type_: DataVariant3FormatVariant0Subtype2Type,
}
#[doc = "`DataVariant3FormatVariant0Subtype2Parse`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3FormatVariant0Subtype2Parse {
Variant0(DataVariant3FormatVariant0Subtype2ParseVariant0),
Variant1(
::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype2ParseVariant1Value,
>,
),
Variant2(SignalRef),
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype2ParseVariant0>
for DataVariant3FormatVariant0Subtype2Parse
{
fn from(value: DataVariant3FormatVariant0Subtype2ParseVariant0) -> Self {
Self::Variant0(value)
}
}
impl
::std::convert::From<
::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype2ParseVariant1Value,
>,
> for DataVariant3FormatVariant0Subtype2Parse
{
fn from(
value: ::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype2ParseVariant1Value,
>,
) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for DataVariant3FormatVariant0Subtype2Parse {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DataVariant3FormatVariant0Subtype2ParseVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype2ParseVariant0 {
#[serde(rename = "auto")]
Auto,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype2ParseVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Auto => f.write_str("auto"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype2ParseVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto" => Ok(Self::Auto),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype2ParseVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype2ParseVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype2ParseVariant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3FormatVariant0Subtype2ParseVariant1Value {
Variant0(DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant0),
Variant1(DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1),
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype2ParseVariant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Variant0(x) => x.fmt(f),
Self::Variant1(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype2ParseVariant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Variant0(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Variant1(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype2ParseVariant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype2ParseVariant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant0>
for DataVariant3FormatVariant0Subtype2ParseVariant1Value
{
fn from(value: DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1>
for DataVariant3FormatVariant0Subtype2ParseVariant1Value
{
fn from(value: DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant0 {
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "number")]
Number,
#[serde(rename = "date")]
Date,
#[serde(rename = "string")]
String,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Boolean => f.write_str("boolean"),
Self::Number => f.write_str("number"),
Self::Date => f.write_str("date"),
Self::String => f.write_str("string"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"boolean" => Ok(Self::Boolean),
"number" => Ok(Self::Number),
"date" => Ok(Self::Date),
"string" => Ok(Self::String),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1(::std::string::String);
impl ::std::ops::Deref for DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1 {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1>
for ::std::string::String
{
fn from(value: DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1) -> Self {
value.0
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| ::regress::Regex::new("^(date|utc):.*$").unwrap());
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^(date|utc):.*$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de>
for DataVariant3FormatVariant0Subtype2ParseVariant1ValueVariant1
{
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`DataVariant3FormatVariant0Subtype2Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype2Type {
#[serde(rename = "csv")]
Csv,
#[serde(rename = "tsv")]
Tsv,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype2Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Csv => f.write_str("csv"),
Self::Tsv => f.write_str("tsv"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype2Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"csv" => Ok(Self::Csv),
"tsv" => Ok(Self::Tsv),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype2Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DataVariant3FormatVariant0Subtype2Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype3`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DataVariant3FormatVariant0Subtype3 {
pub delimiter: ::std::string::String,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub header: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parse: ::std::option::Option<DataVariant3FormatVariant0Subtype3Parse>,
#[serde(rename = "type")]
pub type_: DataVariant3FormatVariant0Subtype3Type,
}
#[doc = "`DataVariant3FormatVariant0Subtype3Parse`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3FormatVariant0Subtype3Parse {
Variant0(DataVariant3FormatVariant0Subtype3ParseVariant0),
Variant1(
::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype3ParseVariant1Value,
>,
),
Variant2(SignalRef),
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype3ParseVariant0>
for DataVariant3FormatVariant0Subtype3Parse
{
fn from(value: DataVariant3FormatVariant0Subtype3ParseVariant0) -> Self {
Self::Variant0(value)
}
}
impl
::std::convert::From<
::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype3ParseVariant1Value,
>,
> for DataVariant3FormatVariant0Subtype3Parse
{
fn from(
value: ::std::collections::HashMap<
::std::string::String,
DataVariant3FormatVariant0Subtype3ParseVariant1Value,
>,
) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for DataVariant3FormatVariant0Subtype3Parse {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DataVariant3FormatVariant0Subtype3ParseVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype3ParseVariant0 {
#[serde(rename = "auto")]
Auto,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype3ParseVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Auto => f.write_str("auto"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype3ParseVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto" => Ok(Self::Auto),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype3ParseVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype3ParseVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype3ParseVariant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3FormatVariant0Subtype3ParseVariant1Value {
Variant0(DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant0),
Variant1(DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1),
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype3ParseVariant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Variant0(x) => x.fmt(f),
Self::Variant1(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype3ParseVariant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Variant0(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Variant1(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype3ParseVariant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype3ParseVariant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant0>
for DataVariant3FormatVariant0Subtype3ParseVariant1Value
{
fn from(value: DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1>
for DataVariant3FormatVariant0Subtype3ParseVariant1Value
{
fn from(value: DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant0 {
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "number")]
Number,
#[serde(rename = "date")]
Date,
#[serde(rename = "string")]
String,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Boolean => f.write_str("boolean"),
Self::Number => f.write_str("number"),
Self::Date => f.write_str("date"),
Self::String => f.write_str("string"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"boolean" => Ok(Self::Boolean),
"number" => Ok(Self::Number),
"date" => Ok(Self::Date),
"string" => Ok(Self::String),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1(::std::string::String);
impl ::std::ops::Deref for DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1 {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1>
for ::std::string::String
{
fn from(value: DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1) -> Self {
value.0
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| ::regress::Regex::new("^(date|utc):.*$").unwrap());
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^(date|utc):.*$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str>
for DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de>
for DataVariant3FormatVariant0Subtype3ParseVariant1ValueVariant1
{
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`DataVariant3FormatVariant0Subtype3Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype3Type {
#[serde(rename = "dsv")]
Dsv,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype3Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Dsv => f.write_str("dsv"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype3Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"dsv" => Ok(Self::Dsv),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype3Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DataVariant3FormatVariant0Subtype3Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype4`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum DataVariant3FormatVariant0Subtype4 {
Variant0 {
feature: StringOrSignal,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
property: ::std::option::Option<StringOrSignal>,
#[serde(rename = "type")]
type_: DataVariant3FormatVariant0Subtype4Variant0Type,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
filter: ::std::option::Option<DataVariant3FormatVariant0Subtype4Variant1Filter>,
mesh: StringOrSignal,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
property: ::std::option::Option<StringOrSignal>,
#[serde(rename = "type")]
type_: DataVariant3FormatVariant0Subtype4Variant1Type,
},
}
#[doc = "`DataVariant3FormatVariant0Subtype4Variant0Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype4Variant0Type {
#[serde(rename = "topojson")]
Topojson,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype4Variant0Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Topojson => f.write_str("topojson"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype4Variant0Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"topojson" => Ok(Self::Topojson),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype4Variant0Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype4Variant0Type
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype4Variant1Filter`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype4Variant1Filter {
#[serde(rename = "interior")]
Interior,
#[serde(rename = "exterior")]
Exterior,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype4Variant1Filter {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Interior => f.write_str("interior"),
Self::Exterior => f.write_str("exterior"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype4Variant1Filter {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"interior" => Ok(Self::Interior),
"exterior" => Ok(Self::Exterior),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype4Variant1Filter {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype4Variant1Filter
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3FormatVariant0Subtype4Variant1Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DataVariant3FormatVariant0Subtype4Variant1Type {
#[serde(rename = "topojson")]
Topojson,
}
impl ::std::fmt::Display for DataVariant3FormatVariant0Subtype4Variant1Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Topojson => f.write_str("topojson"),
}
}
}
impl ::std::str::FromStr for DataVariant3FormatVariant0Subtype4Variant1Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"topojson" => Ok(Self::Topojson),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DataVariant3FormatVariant0Subtype4Variant1Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DataVariant3FormatVariant0Subtype4Variant1Type
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DataVariant3Values`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DataVariant3Values {
Variant0(::serde_json::Value),
Variant1(SignalRef),
}
impl ::std::convert::From<::serde_json::Value> for DataVariant3Values {
fn from(value: ::serde_json::Value) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for DataVariant3Values {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DensityTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DensityTransform {
#[serde(rename = "as", default = "defaults::density_transform_as")]
pub as_: DensityTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub distribution: ::std::option::Option<DensityTransformDistribution>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub extent: ::std::option::Option<DensityTransformExtent>,
#[serde(default = "defaults::density_transform_maxsteps")]
pub maxsteps: DensityTransformMaxsteps,
#[serde(default = "defaults::density_transform_method")]
pub method: DensityTransformMethod,
#[serde(default = "defaults::density_transform_minsteps")]
pub minsteps: DensityTransformMinsteps,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub steps: ::std::option::Option<DensityTransformSteps>,
#[serde(rename = "type")]
pub type_: DensityTransformType,
}
#[doc = "`DensityTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformAs {
Array(::std::vec::Vec<DensityTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::default::Default for DensityTransformAs {
fn default() -> Self {
DensityTransformAs::Array(vec![
DensityTransformAsArrayItem::String("value".to_string()),
DensityTransformAsArrayItem::String("density".to_string()),
])
}
}
impl ::std::convert::From<::std::vec::Vec<DensityTransformAsArrayItem>> for DensityTransformAs {
fn from(value: ::std::vec::Vec<DensityTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for DensityTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformDistribution`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(tag = "function", deny_unknown_fields)]
pub enum DensityTransformDistribution {
#[serde(rename = "normal")]
Normal {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mean: ::std::option::Option<DensityTransformDistributionMean>,
#[serde(default = "defaults::density_transform_distribution_normal_stdev")]
stdev: DensityTransformDistributionStdev,
},
#[serde(rename = "lognormal")]
Lognormal {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mean: ::std::option::Option<DensityTransformDistributionMean>,
#[serde(default = "defaults::density_transform_distribution_lognormal_stdev")]
stdev: DensityTransformDistributionStdev,
},
#[serde(rename = "uniform")]
Uniform {
#[serde(default = "defaults::density_transform_distribution_uniform_max")]
max: DensityTransformDistributionMax,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
min: ::std::option::Option<DensityTransformDistributionMin>,
},
#[serde(rename = "kde")]
Kde {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bandwidth: ::std::option::Option<DensityTransformDistributionBandwidth>,
field: DensityTransformDistributionField,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
from: ::std::option::Option<::std::string::String>,
},
#[serde(rename = "mixture")]
Mixture {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
distributions: ::std::option::Option<DensityTransformDistributionDistributions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
weights: ::std::option::Option<DensityTransformDistributionWeights>,
},
}
#[doc = "`DensityTransformDistributionBandwidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformDistributionBandwidth {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for DensityTransformDistributionBandwidth {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformDistributionBandwidth {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformDistributionDistributions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformDistributionDistributions {
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>>
for DensityTransformDistributionDistributions
{
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformDistributionDistributions {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformDistributionField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformDistributionField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for DensityTransformDistributionField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for DensityTransformDistributionField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for DensityTransformDistributionField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`DensityTransformDistributionMax`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformDistributionMax {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for DensityTransformDistributionMax {
fn default() -> Self {
DensityTransformDistributionMax::Number(1_f64)
}
}
impl ::std::convert::From<f64> for DensityTransformDistributionMax {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformDistributionMax {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformDistributionMean`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformDistributionMean {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for DensityTransformDistributionMean {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformDistributionMean {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformDistributionMin`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformDistributionMin {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for DensityTransformDistributionMin {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformDistributionMin {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformDistributionStdev`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformDistributionStdev {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for DensityTransformDistributionStdev {
fn default() -> Self {
DensityTransformDistributionStdev::Number(1_f64)
}
}
impl ::std::convert::From<f64> for DensityTransformDistributionStdev {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformDistributionStdev {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformDistributionWeights`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformDistributionWeights {
Array(::std::vec::Vec<DensityTransformDistributionWeightsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<DensityTransformDistributionWeightsArrayItem>>
for DensityTransformDistributionWeights
{
fn from(value: ::std::vec::Vec<DensityTransformDistributionWeightsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformDistributionWeights {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformDistributionWeightsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformDistributionWeightsArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for DensityTransformDistributionWeightsArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformDistributionWeightsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformExtent {
Array([DensityTransformExtentArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[DensityTransformExtentArrayItem; 2usize]> for DensityTransformExtent {
fn from(value: [DensityTransformExtentArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformExtent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformExtentArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformExtentArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for DensityTransformExtentArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformExtentArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformMaxsteps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformMaxsteps {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for DensityTransformMaxsteps {
fn default() -> Self {
DensityTransformMaxsteps::Number(200_f64)
}
}
impl ::std::convert::From<f64> for DensityTransformMaxsteps {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformMaxsteps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformMethod`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformMethod {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for DensityTransformMethod {
fn default() -> Self {
DensityTransformMethod::String("pdf".to_string())
}
}
impl ::std::convert::From<SignalRef> for DensityTransformMethod {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformMinsteps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformMinsteps {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for DensityTransformMinsteps {
fn default() -> Self {
DensityTransformMinsteps::Number(25_f64)
}
}
impl ::std::convert::From<f64> for DensityTransformMinsteps {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformMinsteps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformSteps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DensityTransformSteps {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for DensityTransformSteps {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DensityTransformSteps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DensityTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DensityTransformType {
#[serde(rename = "density")]
Density,
}
impl ::std::fmt::Display for DensityTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Density => f.write_str("density"),
}
}
}
impl ::std::str::FromStr for DensityTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"density" => Ok(Self::Density),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DensityTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DensityTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DirectionValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DirectionValue {
Variant0(::std::vec::Vec<DirectionValueVariant0Item>),
Variant1(DirectionValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<DirectionValueVariant0Item>> for DirectionValue {
fn from(value: ::std::vec::Vec<DirectionValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DirectionValueVariant1> for DirectionValue {
fn from(value: DirectionValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`DirectionValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DirectionValueVariant0Item {
Variant0(DirectionValueVariant0ItemVariant0),
Variant1(DirectionValueVariant0ItemVariant1),
Variant2(DirectionValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<DirectionValueVariant0ItemVariant0> for DirectionValueVariant0Item {
fn from(value: DirectionValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DirectionValueVariant0ItemVariant1> for DirectionValueVariant0Item {
fn from(value: DirectionValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<DirectionValueVariant0ItemVariant2> for DirectionValueVariant0Item {
fn from(value: DirectionValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DirectionValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DirectionValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: DirectionValueVariant0ItemVariant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: DirectionValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`DirectionValueVariant0ItemVariant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DirectionValueVariant0ItemVariant0Variant1Value {
#[serde(rename = "horizontal")]
Horizontal,
#[serde(rename = "vertical")]
Vertical,
}
impl ::std::fmt::Display for DirectionValueVariant0ItemVariant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Horizontal => f.write_str("horizontal"),
Self::Vertical => f.write_str("vertical"),
}
}
}
impl ::std::str::FromStr for DirectionValueVariant0ItemVariant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"horizontal" => Ok(Self::Horizontal),
"vertical" => Ok(Self::Vertical),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DirectionValueVariant0ItemVariant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DirectionValueVariant0ItemVariant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DirectionValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DirectionValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for DirectionValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DirectionValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DirectionValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DirectionValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for DirectionValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for DirectionValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`DirectionValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum DirectionValueVariant0ItemVariant1 {}
#[doc = "`DirectionValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum DirectionValueVariant0ItemVariant2 {}
#[doc = "`DirectionValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DirectionValueVariant1 {
Variant0(DirectionValueVariant1Variant0),
Variant1(DirectionValueVariant1Variant1),
Variant2(DirectionValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<DirectionValueVariant1Variant0> for DirectionValueVariant1 {
fn from(value: DirectionValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<DirectionValueVariant1Variant1> for DirectionValueVariant1 {
fn from(value: DirectionValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<DirectionValueVariant1Variant2> for DirectionValueVariant1 {
fn from(value: DirectionValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`DirectionValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DirectionValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: DirectionValueVariant1Variant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: DirectionValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`DirectionValueVariant1Variant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DirectionValueVariant1Variant0Variant1Value {
#[serde(rename = "horizontal")]
Horizontal,
#[serde(rename = "vertical")]
Vertical,
}
impl ::std::fmt::Display for DirectionValueVariant1Variant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Horizontal => f.write_str("horizontal"),
Self::Vertical => f.write_str("vertical"),
}
}
}
impl ::std::str::FromStr for DirectionValueVariant1Variant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"horizontal" => Ok(Self::Horizontal),
"vertical" => Ok(Self::Vertical),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DirectionValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DirectionValueVariant1Variant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DirectionValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DirectionValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for DirectionValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for DirectionValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for DirectionValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DirectionValueVariant1Variant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for DirectionValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for DirectionValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`DirectionValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum DirectionValueVariant1Variant1 {}
#[doc = "`DirectionValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum DirectionValueVariant1Variant2 {}
#[doc = "`DotbinTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DotbinTransform {
#[serde(rename = "as", default = "defaults::dotbin_transform_as")]
pub as_: DotbinTransformAs,
pub field: DotbinTransformField,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<DotbinTransformGroupby>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub smooth: ::std::option::Option<DotbinTransformSmooth>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub step: ::std::option::Option<DotbinTransformStep>,
#[serde(rename = "type")]
pub type_: DotbinTransformType,
}
#[doc = "`DotbinTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DotbinTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for DotbinTransformAs {
fn default() -> Self {
DotbinTransformAs::String("bin".to_string())
}
}
impl ::std::convert::From<SignalRef> for DotbinTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DotbinTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DotbinTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for DotbinTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for DotbinTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for DotbinTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`DotbinTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DotbinTransformGroupby {
Array(::std::vec::Vec<DotbinTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<DotbinTransformGroupbyArrayItem>>
for DotbinTransformGroupby
{
fn from(value: ::std::vec::Vec<DotbinTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for DotbinTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DotbinTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DotbinTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for DotbinTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for DotbinTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for DotbinTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`DotbinTransformSmooth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DotbinTransformSmooth {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for DotbinTransformSmooth {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for DotbinTransformSmooth {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DotbinTransformStep`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DotbinTransformStep {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for DotbinTransformStep {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for DotbinTransformStep {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`DotbinTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DotbinTransformType {
#[serde(rename = "dotbin")]
Dotbin,
}
impl ::std::fmt::Display for DotbinTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Dotbin => f.write_str("dotbin"),
}
}
}
impl ::std::str::FromStr for DotbinTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"dotbin" => Ok(Self::Dotbin),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DotbinTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DotbinTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Element`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(transparent)]
pub struct Element(pub ::std::string::String);
impl ::std::ops::Deref for Element {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<Element> for ::std::string::String {
fn from(value: Element) -> Self {
value.0
}
}
impl ::std::convert::From<::std::string::String> for Element {
fn from(value: ::std::string::String) -> Self {
Self(value)
}
}
impl ::std::fmt::Display for Element {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
self.0.fmt(f)
}
}
impl ::std::str::FromStr for Element {
type Err = ::std::convert::Infallible;
fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
Ok(Self(value.to_string()))
}
}
#[doc = "`Encode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct Encode(pub ::std::collections::HashMap<EncodeKey, EncodeEntry>);
impl ::std::ops::Deref for Encode {
type Target = ::std::collections::HashMap<EncodeKey, EncodeEntry>;
fn deref(&self) -> &::std::collections::HashMap<EncodeKey, EncodeEntry> {
&self.0
}
}
impl ::std::convert::From<Encode> for ::std::collections::HashMap<EncodeKey, EncodeEntry> {
fn from(value: Encode) -> Self {
value.0
}
}
impl ::std::convert::From<::std::collections::HashMap<EncodeKey, EncodeEntry>> for Encode {
fn from(value: ::std::collections::HashMap<EncodeKey, EncodeEntry>) -> Self {
Self(value)
}
}
#[doc = "`EncodeEntry`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct EncodeEntry {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub align: ::std::option::Option<AlignValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub angle: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub aria: ::std::option::Option<BooleanValue>,
#[serde(
rename = "ariaRole",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub aria_role: ::std::option::Option<StringValue>,
#[serde(
rename = "ariaRoleDescription",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub aria_role_description: ::std::option::Option<StringValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub aspect: ::std::option::Option<BooleanValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub baseline: ::std::option::Option<BaselineValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub blend: ::std::option::Option<BlendValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub clip: ::std::option::Option<BooleanValue>,
#[serde(
rename = "cornerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub corner_radius: ::std::option::Option<NumberValue>,
#[serde(
rename = "cornerRadiusBottomLeft",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub corner_radius_bottom_left: ::std::option::Option<NumberValue>,
#[serde(
rename = "cornerRadiusBottomRight",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub corner_radius_bottom_right: ::std::option::Option<NumberValue>,
#[serde(
rename = "cornerRadiusTopLeft",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub corner_radius_top_left: ::std::option::Option<NumberValue>,
#[serde(
rename = "cornerRadiusTopRight",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub corner_radius_top_right: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub cursor: ::std::option::Option<StringValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub defined: ::std::option::Option<BooleanValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<StringValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub dir: ::std::option::Option<StringValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub dx: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub dy: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub ellipsis: ::std::option::Option<StringValue>,
#[serde(
rename = "endAngle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub end_angle: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub fill: ::std::option::Option<ColorValue>,
#[serde(
rename = "fillOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub fill_opacity: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub font: ::std::option::Option<StringValue>,
#[serde(
rename = "fontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub font_size: ::std::option::Option<NumberValue>,
#[serde(
rename = "fontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub font_style: ::std::option::Option<StringValue>,
#[serde(
rename = "fontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub font_weight: ::std::option::Option<FontWeightValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub height: ::std::option::Option<NumberValue>,
#[serde(
rename = "innerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub inner_radius: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub interpolate: ::std::option::Option<StringValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub limit: ::std::option::Option<NumberValue>,
#[serde(
rename = "lineBreak",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub line_break: ::std::option::Option<StringValue>,
#[serde(
rename = "lineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub line_height: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub opacity: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub orient: ::std::option::Option<DirectionValue>,
#[serde(
rename = "outerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub outer_radius: ::std::option::Option<NumberValue>,
#[serde(
rename = "padAngle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub pad_angle: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub path: ::std::option::Option<StringValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub radius: ::std::option::Option<NumberValue>,
#[serde(
rename = "scaleX",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub scale_x: ::std::option::Option<NumberValue>,
#[serde(
rename = "scaleY",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub scale_y: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub shape: ::std::option::Option<StringValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub size: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub smooth: ::std::option::Option<BooleanValue>,
#[serde(
rename = "startAngle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub start_angle: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub stroke: ::std::option::Option<ColorValue>,
#[serde(
rename = "strokeCap",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub stroke_cap: ::std::option::Option<StrokeCapValue>,
#[serde(
rename = "strokeDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub stroke_dash: ::std::option::Option<ArrayValue>,
#[serde(
rename = "strokeDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub stroke_dash_offset: ::std::option::Option<NumberValue>,
#[serde(
rename = "strokeForeground",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub stroke_foreground: ::std::option::Option<BooleanValue>,
#[serde(
rename = "strokeJoin",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub stroke_join: ::std::option::Option<StrokeJoinValue>,
#[serde(
rename = "strokeMiterLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub stroke_miter_limit: ::std::option::Option<NumberValue>,
#[serde(
rename = "strokeOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub stroke_offset: ::std::option::Option<NumberValue>,
#[serde(
rename = "strokeOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub stroke_opacity: ::std::option::Option<NumberValue>,
#[serde(
rename = "strokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub stroke_width: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub tension: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub text: ::std::option::Option<TextValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub theta: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub tooltip: ::std::option::Option<AnyValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<StringValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub width: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub x: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub x2: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub xc: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub y: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub y2: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub yc: ::std::option::Option<NumberValue>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub zindex: ::std::option::Option<NumberValue>,
}
#[doc = "`EncodeKey`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct EncodeKey(::std::string::String);
impl ::std::ops::Deref for EncodeKey {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<EncodeKey> for ::std::string::String {
fn from(value: EncodeKey) -> Self {
value.0
}
}
impl ::std::str::FromStr for EncodeKey {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| ::regress::Regex::new("^.+$").unwrap());
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^.+$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str> for EncodeKey {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for EncodeKey {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de> for EncodeKey {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`Everything`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct Everything {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub autosize: ::std::option::Option<Autosize>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub axes: ::std::vec::Vec<Axis>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub background: ::std::option::Option<Background>,
#[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
pub config: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub data: ::std::vec::Vec<Data>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub encode: ::std::option::Option<Encode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub height: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub layout: ::std::option::Option<Layout>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub legends: ::std::vec::Vec<Legend>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub marks: ::std::vec::Vec<EverythingMarksItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub padding: ::std::option::Option<Padding>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub projections: ::std::vec::Vec<Projection>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub scales: ::std::vec::Vec<Scale>,
#[serde(
rename = "$schema",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub schema: ::std::option::Option<::std::string::String>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub signals: ::std::vec::Vec<Signal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub style: ::std::option::Option<Style>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<Title>,
#[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
pub usermeta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub width: ::std::option::Option<NumberOrSignal>,
}
#[doc = "`EverythingMarksItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum EverythingMarksItem {
Group(MarkGroup),
Visual(MarkVisual),
}
impl ::std::convert::From<MarkGroup> for EverythingMarksItem {
fn from(value: MarkGroup) -> Self {
Self::Group(value)
}
}
impl ::std::convert::From<MarkVisual> for EverythingMarksItem {
fn from(value: MarkVisual) -> Self {
Self::Visual(value)
}
}
#[doc = "`Expr`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct Expr {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<::std::string::String>,
pub expr: ::std::string::String,
}
#[doc = "`ExprString`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(transparent)]
pub struct ExprString(pub ::std::string::String);
impl ::std::ops::Deref for ExprString {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<ExprString> for ::std::string::String {
fn from(value: ExprString) -> Self {
value.0
}
}
impl ::std::convert::From<::std::string::String> for ExprString {
fn from(value: ::std::string::String) -> Self {
Self(value)
}
}
impl ::std::fmt::Display for ExprString {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
self.0.fmt(f)
}
}
impl ::std::str::FromStr for ExprString {
type Err = ::std::convert::Infallible;
fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
Ok(Self(value.to_string()))
}
}
#[doc = "`ExtentTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ExtentTransform {
pub field: ExtentTransformField,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: ExtentTransformType,
}
#[doc = "`ExtentTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ExtentTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for ExtentTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for ExtentTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for ExtentTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ExtentTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ExtentTransformType {
#[serde(rename = "extent")]
Extent,
}
impl ::std::fmt::Display for ExtentTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Extent => f.write_str("extent"),
}
}
}
impl ::std::str::FromStr for ExtentTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"extent" => Ok(Self::Extent),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ExtentTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ExtentTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Facet`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Facet {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub data: ::std::option::Option<::std::string::String>,
pub facet: FacetFacet,
}
#[doc = "`FacetFacet`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum FacetFacet {
Variant0 {
data: ::std::string::String,
field: ::std::string::String,
name: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
aggregate: ::std::option::Option<FacetFacetVariant1Aggregate>,
data: ::std::string::String,
groupby: FacetFacetVariant1Groupby,
name: ::std::string::String,
},
}
#[doc = "`FacetFacetVariant1Aggregate`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct FacetFacetVariant1Aggregate {
#[serde(
rename = "as",
default,
skip_serializing_if = "::std::vec::Vec::is_empty"
)]
pub as_: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub cross: ::std::option::Option<bool>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub fields: ::std::vec::Vec<::std::string::String>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub ops: ::std::vec::Vec<::std::string::String>,
}
#[doc = "`FacetFacetVariant1Groupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FacetFacetVariant1Groupby {
String(::std::string::String),
Array(::std::vec::Vec<::std::string::String>),
}
impl ::std::convert::From<::std::vec::Vec<::std::string::String>> for FacetFacetVariant1Groupby {
fn from(value: ::std::vec::Vec<::std::string::String>) -> Self {
Self::Array(value)
}
}
#[doc = "`Field`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Field {
Variant0(::std::string::String),
Variant1(SignalRef),
Variant2 {
datum: ::std::boxed::Box<Field>,
},
Variant3 {
group: ::std::boxed::Box<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
level: ::std::option::Option<f64>,
},
Variant4 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
level: ::std::option::Option<f64>,
parent: ::std::boxed::Box<Field>,
},
}
impl ::std::convert::From<SignalRef> for Field {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`FilterTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct FilterTransform {
pub expr: ExprString,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: FilterTransformType,
}
#[doc = "`FilterTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum FilterTransformType {
#[serde(rename = "filter")]
Filter,
}
impl ::std::fmt::Display for FilterTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Filter => f.write_str("filter"),
}
}
}
impl ::std::str::FromStr for FilterTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"filter" => Ok(Self::Filter),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for FilterTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for FilterTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`FlattenTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct FlattenTransform {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<FlattenTransformAs>,
pub fields: FlattenTransformFields,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub index: ::std::option::Option<FlattenTransformIndex>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: FlattenTransformType,
}
#[doc = "`FlattenTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FlattenTransformAs {
Array(::std::vec::Vec<FlattenTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<FlattenTransformAsArrayItem>> for FlattenTransformAs {
fn from(value: ::std::vec::Vec<FlattenTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for FlattenTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FlattenTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FlattenTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for FlattenTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FlattenTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FlattenTransformFields {
Array(::std::vec::Vec<FlattenTransformFieldsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<FlattenTransformFieldsArrayItem>>
for FlattenTransformFields
{
fn from(value: ::std::vec::Vec<FlattenTransformFieldsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for FlattenTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FlattenTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FlattenTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for FlattenTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for FlattenTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for FlattenTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`FlattenTransformIndex`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FlattenTransformIndex {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for FlattenTransformIndex {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FlattenTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum FlattenTransformType {
#[serde(rename = "flatten")]
Flatten,
}
impl ::std::fmt::Display for FlattenTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Flatten => f.write_str("flatten"),
}
}
}
impl ::std::str::FromStr for FlattenTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"flatten" => Ok(Self::Flatten),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for FlattenTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for FlattenTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`FoldTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct FoldTransform {
#[serde(rename = "as", default = "defaults::fold_transform_as")]
pub as_: FoldTransformAs,
pub fields: FoldTransformFields,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: FoldTransformType,
}
#[doc = "`FoldTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FoldTransformAs {
Array([FoldTransformAsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for FoldTransformAs {
fn default() -> Self {
FoldTransformAs::Array([
FoldTransformAsArrayItem::String("key".to_string()),
FoldTransformAsArrayItem::String("value".to_string()),
])
}
}
impl ::std::convert::From<[FoldTransformAsArrayItem; 2usize]> for FoldTransformAs {
fn from(value: [FoldTransformAsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for FoldTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FoldTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FoldTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for FoldTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FoldTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FoldTransformFields {
Array(::std::vec::Vec<FoldTransformFieldsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<FoldTransformFieldsArrayItem>> for FoldTransformFields {
fn from(value: ::std::vec::Vec<FoldTransformFieldsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for FoldTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FoldTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FoldTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for FoldTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for FoldTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for FoldTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`FoldTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum FoldTransformType {
#[serde(rename = "fold")]
Fold,
}
impl ::std::fmt::Display for FoldTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Fold => f.write_str("fold"),
}
}
}
impl ::std::str::FromStr for FoldTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"fold" => Ok(Self::Fold),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for FoldTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for FoldTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`FontWeightValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FontWeightValue {
Variant0(::std::vec::Vec<FontWeightValueVariant0Item>),
Variant1(FontWeightValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<FontWeightValueVariant0Item>> for FontWeightValue {
fn from(value: ::std::vec::Vec<FontWeightValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValueVariant1> for FontWeightValue {
fn from(value: FontWeightValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`FontWeightValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FontWeightValueVariant0Item {
Variant0(FontWeightValueVariant0ItemVariant0),
Variant1(FontWeightValueVariant0ItemVariant1),
Variant2(FontWeightValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<FontWeightValueVariant0ItemVariant0> for FontWeightValueVariant0Item {
fn from(value: FontWeightValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValueVariant0ItemVariant1> for FontWeightValueVariant0Item {
fn from(value: FontWeightValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<FontWeightValueVariant0ItemVariant2> for FontWeightValueVariant0Item {
fn from(value: FontWeightValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`FontWeightValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FontWeightValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: MyEnum,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: FontWeightValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`FontWeightValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FontWeightValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for FontWeightValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for FontWeightValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for FontWeightValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for FontWeightValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for FontWeightValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for FontWeightValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`FontWeightValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum FontWeightValueVariant0ItemVariant1 {}
#[doc = "`FontWeightValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum FontWeightValueVariant0ItemVariant2 {}
#[doc = "`FontWeightValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FontWeightValueVariant1 {
Variant0(FontWeightValueVariant1Variant0),
Variant1(FontWeightValueVariant1Variant1),
Variant2(FontWeightValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<FontWeightValueVariant1Variant0> for FontWeightValueVariant1 {
fn from(value: FontWeightValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValueVariant1Variant1> for FontWeightValueVariant1 {
fn from(value: FontWeightValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<FontWeightValueVariant1Variant2> for FontWeightValueVariant1 {
fn from(value: FontWeightValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`FontWeightValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FontWeightValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: MyEnum,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: FontWeightValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`FontWeightValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FontWeightValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for FontWeightValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for FontWeightValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for FontWeightValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for FontWeightValueVariant1Variant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for FontWeightValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for FontWeightValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`FontWeightValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum FontWeightValueVariant1Variant1 {}
#[doc = "`FontWeightValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum FontWeightValueVariant1Variant2 {}
#[doc = "`ForceTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ForceTransform {
#[serde(default = "defaults::force_transform_alpha")]
pub alpha: ForceTransformAlpha,
#[serde(rename = "alphaMin", default = "defaults::force_transform_alpha_min")]
pub alpha_min: ForceTransformAlphaMin,
#[serde(
rename = "alphaTarget",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub alpha_target: ::std::option::Option<ForceTransformAlphaTarget>,
#[serde(rename = "as", default = "defaults::force_transform_as")]
pub as_: ForceTransformAs,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub forces: ::std::vec::Vec<ForceTransformForcesItem>,
#[serde(default = "defaults::force_transform_iterations")]
pub iterations: ForceTransformIterations,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub restart: ::std::option::Option<ForceTransformRestart>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(
rename = "static",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub static_: ::std::option::Option<ForceTransformStatic>,
#[serde(rename = "type")]
pub type_: ForceTransformType,
#[serde(
rename = "velocityDecay",
default = "defaults::force_transform_velocity_decay"
)]
pub velocity_decay: ForceTransformVelocityDecay,
}
#[doc = "`ForceTransformAlpha`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformAlpha {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for ForceTransformAlpha {
fn default() -> Self {
ForceTransformAlpha::Number(1_f64)
}
}
impl ::std::convert::From<f64> for ForceTransformAlpha {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformAlpha {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformAlphaMin`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformAlphaMin {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for ForceTransformAlphaMin {
fn default() -> Self {
ForceTransformAlphaMin::Number(0.001_f64)
}
}
impl ::std::convert::From<f64> for ForceTransformAlphaMin {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformAlphaMin {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformAlphaTarget`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformAlphaTarget {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ForceTransformAlphaTarget {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformAlphaTarget {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformAs {
Array(::std::vec::Vec<ForceTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::default::Default for ForceTransformAs {
fn default() -> Self {
ForceTransformAs::Array(vec![
ForceTransformAsArrayItem::String("x".to_string()),
ForceTransformAsArrayItem::String("y".to_string()),
ForceTransformAsArrayItem::String("vx".to_string()),
ForceTransformAsArrayItem::String("vy".to_string()),
])
}
}
impl ::std::convert::From<::std::vec::Vec<ForceTransformAsArrayItem>> for ForceTransformAs {
fn from(value: ::std::vec::Vec<ForceTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ForceTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformForcesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(tag = "force", deny_unknown_fields)]
pub enum ForceTransformForcesItem {
#[serde(rename = "center")]
Center {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
x: ::std::option::Option<ForceTransformForcesItemX>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
y: ::std::option::Option<ForceTransformForcesItemY>,
},
#[serde(rename = "collide")]
Collide {
#[serde(default = "defaults::force_transform_forces_item_collide_iterations")]
iterations: ForceTransformForcesItemIterations,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
radius: ::std::option::Option<ForceTransformForcesItemRadius>,
#[serde(default = "defaults::force_transform_forces_item_collide_strength")]
strength: ForceTransformForcesItemStrength,
},
#[serde(rename = "nbody")]
Nbody {
#[serde(
rename = "distanceMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
distance_max: ::std::option::Option<ForceTransformForcesItemDistanceMax>,
#[serde(
rename = "distanceMin",
default = "defaults::force_transform_forces_item_nbody_distance_min"
)]
distance_min: ForceTransformForcesItemDistanceMin,
#[serde(default = "defaults::force_transform_forces_item_nbody_strength")]
strength: ForceTransformForcesItemStrength,
#[serde(default = "defaults::force_transform_forces_item_nbody_theta")]
theta: ForceTransformForcesItemTheta,
},
#[serde(rename = "link")]
Link {
#[serde(default = "defaults::force_transform_forces_item_link_distance")]
distance: ForceTransformForcesItemDistance,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
id: ::std::option::Option<ForceTransformForcesItemId>,
#[serde(default = "defaults::force_transform_forces_item_link_iterations")]
iterations: ForceTransformForcesItemIterations,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
links: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
strength: ::std::option::Option<ForceTransformForcesItemStrength>,
},
#[serde(rename = "x")]
X {
#[serde(default = "defaults::force_transform_forces_item_x_strength")]
strength: ForceTransformForcesItemStrength,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
x: ::std::option::Option<ForceTransformForcesItemX>,
},
#[serde(rename = "y")]
Y {
#[serde(default = "defaults::force_transform_forces_item_y_strength")]
strength: ForceTransformForcesItemStrength,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
y: ::std::option::Option<ForceTransformForcesItemY>,
},
}
#[doc = "`ForceTransformForcesItemDistance`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemDistance {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::default::Default for ForceTransformForcesItemDistance {
fn default() -> Self {
ForceTransformForcesItemDistance::Number(30_f64)
}
}
impl ::std::convert::From<f64> for ForceTransformForcesItemDistance {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformForcesItemDistance {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for ForceTransformForcesItemDistance {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for ForceTransformForcesItemDistance {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`ForceTransformForcesItemDistanceMax`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemDistanceMax {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ForceTransformForcesItemDistanceMax {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformForcesItemDistanceMax {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformForcesItemDistanceMin`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemDistanceMin {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for ForceTransformForcesItemDistanceMin {
fn default() -> Self {
ForceTransformForcesItemDistanceMin::Number(1_f64)
}
}
impl ::std::convert::From<f64> for ForceTransformForcesItemDistanceMin {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformForcesItemDistanceMin {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformForcesItemId`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemId {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for ForceTransformForcesItemId {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for ForceTransformForcesItemId {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for ForceTransformForcesItemId {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ForceTransformForcesItemIterations`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemIterations {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for ForceTransformForcesItemIterations {
fn default() -> Self {
ForceTransformForcesItemIterations::Number(1_f64)
}
}
impl ::std::convert::From<f64> for ForceTransformForcesItemIterations {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformForcesItemIterations {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformForcesItemRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemRadius {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::convert::From<f64> for ForceTransformForcesItemRadius {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformForcesItemRadius {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for ForceTransformForcesItemRadius {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for ForceTransformForcesItemRadius {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`ForceTransformForcesItemStrength`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemStrength {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for ForceTransformForcesItemStrength {
fn default() -> Self {
ForceTransformForcesItemStrength::Number(0.7_f64)
}
}
impl ::std::convert::From<f64> for ForceTransformForcesItemStrength {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformForcesItemStrength {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformForcesItemTheta`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemTheta {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for ForceTransformForcesItemTheta {
fn default() -> Self {
ForceTransformForcesItemTheta::Number(0.9_f64)
}
}
impl ::std::convert::From<f64> for ForceTransformForcesItemTheta {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformForcesItemTheta {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformForcesItemX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemX {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ForceTransformForcesItemX {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformForcesItemX {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformForcesItemY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformForcesItemY {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ForceTransformForcesItemY {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformForcesItemY {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformIterations`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformIterations {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for ForceTransformIterations {
fn default() -> Self {
ForceTransformIterations::Number(300_f64)
}
}
impl ::std::convert::From<f64> for ForceTransformIterations {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformIterations {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformRestart`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformRestart {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for ForceTransformRestart {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformRestart {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformStatic`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformStatic {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for ForceTransformStatic {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformStatic {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ForceTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ForceTransformType {
#[serde(rename = "force")]
Force,
}
impl ::std::fmt::Display for ForceTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Force => f.write_str("force"),
}
}
}
impl ::std::str::FromStr for ForceTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"force" => Ok(Self::Force),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ForceTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ForceTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ForceTransformVelocityDecay`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForceTransformVelocityDecay {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for ForceTransformVelocityDecay {
fn default() -> Self {
ForceTransformVelocityDecay::Number(0.4_f64)
}
}
impl ::std::convert::From<f64> for ForceTransformVelocityDecay {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ForceTransformVelocityDecay {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FormulaTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct FormulaTransform {
#[serde(rename = "as")]
pub as_: FormulaTransformAs,
pub expr: ExprString,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub initonly: ::std::option::Option<FormulaTransformInitonly>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: FormulaTransformType,
}
#[doc = "`FormulaTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FormulaTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for FormulaTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FormulaTransformInitonly`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FormulaTransformInitonly {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for FormulaTransformInitonly {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for FormulaTransformInitonly {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`FormulaTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum FormulaTransformType {
#[serde(rename = "formula")]
Formula,
}
impl ::std::fmt::Display for FormulaTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Formula => f.write_str("formula"),
}
}
}
impl ::std::str::FromStr for FormulaTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"formula" => Ok(Self::Formula),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for FormulaTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for FormulaTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`From`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct From {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub data: ::std::option::Option<::std::string::String>,
}
#[doc = "`GeojsonTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GeojsonTransform {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub fields: ::std::option::Option<GeojsonTransformFields>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub geojson: ::std::option::Option<GeojsonTransformGeojson>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: GeojsonTransformType,
}
#[doc = "`GeojsonTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeojsonTransformFields {
Array([GeojsonTransformFieldsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[GeojsonTransformFieldsArrayItem; 2usize]> for GeojsonTransformFields {
fn from(value: [GeojsonTransformFieldsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for GeojsonTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GeojsonTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeojsonTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for GeojsonTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for GeojsonTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for GeojsonTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`GeojsonTransformGeojson`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeojsonTransformGeojson {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for GeojsonTransformGeojson {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for GeojsonTransformGeojson {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for GeojsonTransformGeojson {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`GeojsonTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum GeojsonTransformType {
#[serde(rename = "geojson")]
Geojson,
}
impl ::std::fmt::Display for GeojsonTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Geojson => f.write_str("geojson"),
}
}
}
impl ::std::str::FromStr for GeojsonTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"geojson" => Ok(Self::Geojson),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for GeojsonTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for GeojsonTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`GeopathTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GeopathTransform {
#[serde(rename = "as", default = "defaults::geopath_transform_as")]
pub as_: GeopathTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub field: ::std::option::Option<GeopathTransformField>,
#[serde(
rename = "pointRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub point_radius: ::std::option::Option<GeopathTransformPointRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub projection: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: GeopathTransformType,
}
#[doc = "`GeopathTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeopathTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for GeopathTransformAs {
fn default() -> Self {
GeopathTransformAs::String("path".to_string())
}
}
impl ::std::convert::From<SignalRef> for GeopathTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GeopathTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeopathTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for GeopathTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for GeopathTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for GeopathTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`GeopathTransformPointRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeopathTransformPointRadius {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::convert::From<f64> for GeopathTransformPointRadius {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for GeopathTransformPointRadius {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for GeopathTransformPointRadius {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for GeopathTransformPointRadius {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`GeopathTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum GeopathTransformType {
#[serde(rename = "geopath")]
Geopath,
}
impl ::std::fmt::Display for GeopathTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Geopath => f.write_str("geopath"),
}
}
}
impl ::std::str::FromStr for GeopathTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"geopath" => Ok(Self::Geopath),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for GeopathTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for GeopathTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`GeopointTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GeopointTransform {
#[serde(rename = "as", default = "defaults::geopoint_transform_as")]
pub as_: GeopointTransformAs,
pub fields: GeopointTransformFields,
pub projection: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: GeopointTransformType,
}
#[doc = "`GeopointTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeopointTransformAs {
Array([GeopointTransformAsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for GeopointTransformAs {
fn default() -> Self {
GeopointTransformAs::Array([
GeopointTransformAsArrayItem::String("x".to_string()),
GeopointTransformAsArrayItem::String("y".to_string()),
])
}
}
impl ::std::convert::From<[GeopointTransformAsArrayItem; 2usize]> for GeopointTransformAs {
fn from(value: [GeopointTransformAsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for GeopointTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GeopointTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeopointTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for GeopointTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GeopointTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeopointTransformFields {
Array([GeopointTransformFieldsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[GeopointTransformFieldsArrayItem; 2usize]> for GeopointTransformFields {
fn from(value: [GeopointTransformFieldsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for GeopointTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GeopointTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeopointTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for GeopointTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for GeopointTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for GeopointTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`GeopointTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum GeopointTransformType {
#[serde(rename = "geopoint")]
Geopoint,
}
impl ::std::fmt::Display for GeopointTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Geopoint => f.write_str("geopoint"),
}
}
}
impl ::std::str::FromStr for GeopointTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"geopoint" => Ok(Self::Geopoint),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for GeopointTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for GeopointTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`GeoshapeTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GeoshapeTransform {
#[serde(rename = "as", default = "defaults::geoshape_transform_as")]
pub as_: GeoshapeTransformAs,
#[serde(default = "defaults::geoshape_transform_field")]
pub field: GeoshapeTransformField,
#[serde(
rename = "pointRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub point_radius: ::std::option::Option<GeoshapeTransformPointRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub projection: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: GeoshapeTransformType,
}
#[doc = "`GeoshapeTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeoshapeTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for GeoshapeTransformAs {
fn default() -> Self {
GeoshapeTransformAs::String("shape".to_string())
}
}
impl ::std::convert::From<SignalRef> for GeoshapeTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GeoshapeTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeoshapeTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::default::Default for GeoshapeTransformField {
fn default() -> Self {
GeoshapeTransformField::ScaleField(ScaleField(StringOrSignal::String("datum".to_string())))
}
}
impl ::std::convert::From<ScaleField> for GeoshapeTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for GeoshapeTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for GeoshapeTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`GeoshapeTransformPointRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GeoshapeTransformPointRadius {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::convert::From<f64> for GeoshapeTransformPointRadius {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for GeoshapeTransformPointRadius {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for GeoshapeTransformPointRadius {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for GeoshapeTransformPointRadius {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`GeoshapeTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum GeoshapeTransformType {
#[serde(rename = "geoshape")]
Geoshape,
}
impl ::std::fmt::Display for GeoshapeTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Geoshape => f.write_str("geoshape"),
}
}
}
impl ::std::str::FromStr for GeoshapeTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"geoshape" => Ok(Self::Geoshape),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for GeoshapeTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for GeoshapeTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`GradientStops`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct GradientStops(pub ::std::vec::Vec<GradientStopsItem>);
impl ::std::ops::Deref for GradientStops {
type Target = ::std::vec::Vec<GradientStopsItem>;
fn deref(&self) -> &::std::vec::Vec<GradientStopsItem> {
&self.0
}
}
impl ::std::convert::From<GradientStops> for ::std::vec::Vec<GradientStopsItem> {
fn from(value: GradientStops) -> Self {
value.0
}
}
impl ::std::convert::From<::std::vec::Vec<GradientStopsItem>> for GradientStops {
fn from(value: ::std::vec::Vec<GradientStopsItem>) -> Self {
Self(value)
}
}
#[doc = "`GradientStopsItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GradientStopsItem {
pub color: ::std::string::String,
pub offset: f64,
}
#[doc = "`GraticuleTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GraticuleTransform {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub extent: ::std::option::Option<GraticuleTransformExtent>,
#[serde(
rename = "extentMajor",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub extent_major: ::std::option::Option<GraticuleTransformExtentMajor>,
#[serde(
rename = "extentMinor",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub extent_minor: ::std::option::Option<GraticuleTransformExtentMinor>,
#[serde(default = "defaults::graticule_transform_precision")]
pub precision: GraticuleTransformPrecision,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub step: ::std::option::Option<GraticuleTransformStep>,
#[serde(
rename = "stepMajor",
default = "defaults::graticule_transform_step_major"
)]
pub step_major: GraticuleTransformStepMajor,
#[serde(
rename = "stepMinor",
default = "defaults::graticule_transform_step_minor"
)]
pub step_minor: GraticuleTransformStepMinor,
#[serde(rename = "type")]
pub type_: GraticuleTransformType,
}
#[doc = "`GraticuleTransformExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformExtent {
Array([::serde_json::Value; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[::serde_json::Value; 2usize]> for GraticuleTransformExtent {
fn from(value: [::serde_json::Value; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformExtent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformExtentMajor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformExtentMajor {
Array([::serde_json::Value; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[::serde_json::Value; 2usize]> for GraticuleTransformExtentMajor {
fn from(value: [::serde_json::Value; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformExtentMajor {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformExtentMinor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformExtentMinor {
Array([::serde_json::Value; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[::serde_json::Value; 2usize]> for GraticuleTransformExtentMinor {
fn from(value: [::serde_json::Value; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformExtentMinor {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformPrecision`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformPrecision {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for GraticuleTransformPrecision {
fn default() -> Self {
GraticuleTransformPrecision::Number(2.5_f64)
}
}
impl ::std::convert::From<f64> for GraticuleTransformPrecision {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformPrecision {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformStep`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformStep {
Array([GraticuleTransformStepArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[GraticuleTransformStepArrayItem; 2usize]> for GraticuleTransformStep {
fn from(value: [GraticuleTransformStepArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformStep {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformStepArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformStepArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for GraticuleTransformStepArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformStepArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformStepMajor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformStepMajor {
Array([GraticuleTransformStepMajorArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for GraticuleTransformStepMajor {
fn default() -> Self {
GraticuleTransformStepMajor::Array([
GraticuleTransformStepMajorArrayItem::Number(90_f64),
GraticuleTransformStepMajorArrayItem::Number(360_f64),
])
}
}
impl ::std::convert::From<[GraticuleTransformStepMajorArrayItem; 2usize]>
for GraticuleTransformStepMajor
{
fn from(value: [GraticuleTransformStepMajorArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformStepMajor {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformStepMajorArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformStepMajorArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for GraticuleTransformStepMajorArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformStepMajorArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformStepMinor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformStepMinor {
Array([GraticuleTransformStepMinorArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for GraticuleTransformStepMinor {
fn default() -> Self {
GraticuleTransformStepMinor::Array([
GraticuleTransformStepMinorArrayItem::Number(10_f64),
GraticuleTransformStepMinorArrayItem::Number(10_f64),
])
}
}
impl ::std::convert::From<[GraticuleTransformStepMinorArrayItem; 2usize]>
for GraticuleTransformStepMinor
{
fn from(value: [GraticuleTransformStepMinorArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformStepMinor {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformStepMinorArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum GraticuleTransformStepMinorArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for GraticuleTransformStepMinorArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for GraticuleTransformStepMinorArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`GraticuleTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum GraticuleTransformType {
#[serde(rename = "graticule")]
Graticule,
}
impl ::std::fmt::Display for GraticuleTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Graticule => f.write_str("graticule"),
}
}
}
impl ::std::str::FromStr for GraticuleTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"graticule" => Ok(Self::Graticule),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for GraticuleTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for GraticuleTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`GuideEncode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct GuideEncode {
#[serde(default)]
pub interactive: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub style: ::std::option::Option<Style>,
}
#[doc = "`HeatmapTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct HeatmapTransform {
#[serde(rename = "as", default = "defaults::heatmap_transform_as")]
pub as_: HeatmapTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub color: ::std::option::Option<HeatmapTransformColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub field: ::std::option::Option<HeatmapTransformField>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub opacity: ::std::option::Option<HeatmapTransformOpacity>,
#[serde(default = "defaults::heatmap_transform_resolve")]
pub resolve: HeatmapTransformResolve,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: HeatmapTransformType,
}
#[doc = "`HeatmapTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum HeatmapTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for HeatmapTransformAs {
fn default() -> Self {
HeatmapTransformAs::String("image".to_string())
}
}
impl ::std::convert::From<SignalRef> for HeatmapTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`HeatmapTransformColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum HeatmapTransformColor {
String(::std::string::String),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::convert::From<SignalRef> for HeatmapTransformColor {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for HeatmapTransformColor {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for HeatmapTransformColor {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`HeatmapTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum HeatmapTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for HeatmapTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for HeatmapTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for HeatmapTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`HeatmapTransformOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum HeatmapTransformOpacity {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::convert::From<f64> for HeatmapTransformOpacity {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for HeatmapTransformOpacity {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for HeatmapTransformOpacity {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for HeatmapTransformOpacity {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`HeatmapTransformResolve`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum HeatmapTransformResolve {
Variant0(HeatmapTransformResolveVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for HeatmapTransformResolve {
fn default() -> Self {
HeatmapTransformResolve::Variant0(HeatmapTransformResolveVariant0::Independent)
}
}
impl ::std::convert::From<HeatmapTransformResolveVariant0> for HeatmapTransformResolve {
fn from(value: HeatmapTransformResolveVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for HeatmapTransformResolve {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`HeatmapTransformResolveVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum HeatmapTransformResolveVariant0 {
#[serde(rename = "shared")]
Shared,
#[serde(rename = "independent")]
Independent,
}
impl ::std::fmt::Display for HeatmapTransformResolveVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Shared => f.write_str("shared"),
Self::Independent => f.write_str("independent"),
}
}
}
impl ::std::str::FromStr for HeatmapTransformResolveVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"shared" => Ok(Self::Shared),
"independent" => Ok(Self::Independent),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for HeatmapTransformResolveVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for HeatmapTransformResolveVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`HeatmapTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum HeatmapTransformType {
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for HeatmapTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for HeatmapTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for HeatmapTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for HeatmapTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IdentifierTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IdentifierTransform {
#[serde(rename = "as")]
pub as_: IdentifierTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: IdentifierTransformType,
}
#[doc = "`IdentifierTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IdentifierTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for IdentifierTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`IdentifierTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IdentifierTransformType {
#[serde(rename = "identifier")]
Identifier,
}
impl ::std::fmt::Display for IdentifierTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Identifier => f.write_str("identifier"),
}
}
}
impl ::std::str::FromStr for IdentifierTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"identifier" => Ok(Self::Identifier),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IdentifierTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IdentifierTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ImputeTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ImputeTransform {
pub field: ImputeTransformField,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<ImputeTransformGroupby>,
pub key: ImputeTransformKey,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub keyvals: ::std::option::Option<ImputeTransformKeyvals>,
#[serde(default = "defaults::impute_transform_method")]
pub method: ImputeTransformMethod,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: ImputeTransformType,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub value: ::std::option::Option<::serde_json::Value>,
}
#[doc = "`ImputeTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ImputeTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for ImputeTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for ImputeTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for ImputeTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ImputeTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ImputeTransformGroupby {
Array(::std::vec::Vec<ImputeTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ImputeTransformGroupbyArrayItem>>
for ImputeTransformGroupby
{
fn from(value: ::std::vec::Vec<ImputeTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ImputeTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ImputeTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ImputeTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for ImputeTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for ImputeTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for ImputeTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ImputeTransformKey`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ImputeTransformKey {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for ImputeTransformKey {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for ImputeTransformKey {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for ImputeTransformKey {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ImputeTransformKeyvals`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ImputeTransformKeyvals {
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ImputeTransformKeyvals {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ImputeTransformKeyvals {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ImputeTransformMethod`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ImputeTransformMethod {
Variant0(ImputeTransformMethodVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for ImputeTransformMethod {
fn default() -> Self {
ImputeTransformMethod::Variant0(ImputeTransformMethodVariant0::Value)
}
}
impl ::std::convert::From<ImputeTransformMethodVariant0> for ImputeTransformMethod {
fn from(value: ImputeTransformMethodVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for ImputeTransformMethod {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`ImputeTransformMethodVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ImputeTransformMethodVariant0 {
#[serde(rename = "value")]
Value,
#[serde(rename = "mean")]
Mean,
#[serde(rename = "median")]
Median,
#[serde(rename = "max")]
Max,
#[serde(rename = "min")]
Min,
}
impl ::std::fmt::Display for ImputeTransformMethodVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Value => f.write_str("value"),
Self::Mean => f.write_str("mean"),
Self::Median => f.write_str("median"),
Self::Max => f.write_str("max"),
Self::Min => f.write_str("min"),
}
}
}
impl ::std::str::FromStr for ImputeTransformMethodVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"value" => Ok(Self::Value),
"mean" => Ok(Self::Mean),
"median" => Ok(Self::Median),
"max" => Ok(Self::Max),
"min" => Ok(Self::Min),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ImputeTransformMethodVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ImputeTransformMethodVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ImputeTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ImputeTransformType {
#[serde(rename = "impute")]
Impute,
}
impl ::std::fmt::Display for ImputeTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Impute => f.write_str("impute"),
}
}
}
impl ::std::str::FromStr for ImputeTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"impute" => Ok(Self::Impute),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ImputeTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ImputeTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IsocontourTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IsocontourTransform {
#[serde(rename = "as", default = "defaults::isocontour_transform_as")]
pub as_: IsocontourTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub field: ::std::option::Option<IsocontourTransformField>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub levels: ::std::option::Option<IsocontourTransformLevels>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub nice: ::std::option::Option<IsocontourTransformNice>,
#[serde(default = "defaults::isocontour_transform_resolve")]
pub resolve: IsocontourTransformResolve,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub scale: ::std::option::Option<IsocontourTransformScale>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(default = "defaults::isocontour_transform_smooth")]
pub smooth: IsocontourTransformSmooth,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub thresholds: ::std::option::Option<IsocontourTransformThresholds>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub translate: ::std::option::Option<IsocontourTransformTranslate>,
#[serde(rename = "type")]
pub type_: IsocontourTransformType,
#[serde(default = "defaults::isocontour_transform_zero")]
pub zero: IsocontourTransformZero,
}
#[doc = "`IsocontourTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
Null,
}
impl ::std::default::Default for IsocontourTransformAs {
fn default() -> Self {
IsocontourTransformAs::String("contour".to_string())
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`IsocontourTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for IsocontourTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for IsocontourTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for IsocontourTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`IsocontourTransformLevels`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformLevels {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for IsocontourTransformLevels {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformLevels {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`IsocontourTransformNice`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformNice {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for IsocontourTransformNice {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformNice {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`IsocontourTransformResolve`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformResolve {
Variant0(IsocontourTransformResolveVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for IsocontourTransformResolve {
fn default() -> Self {
IsocontourTransformResolve::Variant0(IsocontourTransformResolveVariant0::Independent)
}
}
impl ::std::convert::From<IsocontourTransformResolveVariant0> for IsocontourTransformResolve {
fn from(value: IsocontourTransformResolveVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformResolve {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`IsocontourTransformResolveVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IsocontourTransformResolveVariant0 {
#[serde(rename = "shared")]
Shared,
#[serde(rename = "independent")]
Independent,
}
impl ::std::fmt::Display for IsocontourTransformResolveVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Shared => f.write_str("shared"),
Self::Independent => f.write_str("independent"),
}
}
}
impl ::std::str::FromStr for IsocontourTransformResolveVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"shared" => Ok(Self::Shared),
"independent" => Ok(Self::Independent),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IsocontourTransformResolveVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IsocontourTransformResolveVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IsocontourTransformScale`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformScale {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::convert::From<f64> for IsocontourTransformScale {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformScale {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for IsocontourTransformScale {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for IsocontourTransformScale {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`IsocontourTransformSmooth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformSmooth {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::default::Default for IsocontourTransformSmooth {
fn default() -> Self {
IsocontourTransformSmooth::Boolean(true)
}
}
impl ::std::convert::From<bool> for IsocontourTransformSmooth {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformSmooth {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`IsocontourTransformThresholds`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformThresholds {
Array(::std::vec::Vec<IsocontourTransformThresholdsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<IsocontourTransformThresholdsArrayItem>>
for IsocontourTransformThresholds
{
fn from(value: ::std::vec::Vec<IsocontourTransformThresholdsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformThresholds {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`IsocontourTransformThresholdsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformThresholdsArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for IsocontourTransformThresholdsArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformThresholdsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`IsocontourTransformTranslate`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformTranslate {
Array(::std::vec::Vec<IsocontourTransformTranslateArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<IsocontourTransformTranslateArrayItem>>
for IsocontourTransformTranslate
{
fn from(value: ::std::vec::Vec<IsocontourTransformTranslateArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformTranslate {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`IsocontourTransformTranslateArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformTranslateArrayItem {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::convert::From<f64> for IsocontourTransformTranslateArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformTranslateArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for IsocontourTransformTranslateArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for IsocontourTransformTranslateArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`IsocontourTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IsocontourTransformType {
#[serde(rename = "isocontour")]
Isocontour,
}
impl ::std::fmt::Display for IsocontourTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Isocontour => f.write_str("isocontour"),
}
}
}
impl ::std::str::FromStr for IsocontourTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"isocontour" => Ok(Self::Isocontour),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IsocontourTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IsocontourTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IsocontourTransformZero`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IsocontourTransformZero {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::default::Default for IsocontourTransformZero {
fn default() -> Self {
IsocontourTransformZero::Boolean(true)
}
}
impl ::std::convert::From<bool> for IsocontourTransformZero {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for IsocontourTransformZero {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`JoinaggregateTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct JoinaggregateTransform {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<JoinaggregateTransformAs>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub fields: ::std::option::Option<JoinaggregateTransformFields>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<JoinaggregateTransformGroupby>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub key: ::std::option::Option<JoinaggregateTransformKey>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub ops: ::std::option::Option<JoinaggregateTransformOps>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: JoinaggregateTransformType,
}
#[doc = "`JoinaggregateTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum JoinaggregateTransformAs {
Array(::std::vec::Vec<JoinaggregateTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<JoinaggregateTransformAsArrayItem>>
for JoinaggregateTransformAs
{
fn from(value: ::std::vec::Vec<JoinaggregateTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for JoinaggregateTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`JoinaggregateTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum JoinaggregateTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
Null,
}
impl ::std::convert::From<SignalRef> for JoinaggregateTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`JoinaggregateTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum JoinaggregateTransformFields {
Array(::std::vec::Vec<JoinaggregateTransformFieldsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<JoinaggregateTransformFieldsArrayItem>>
for JoinaggregateTransformFields
{
fn from(value: ::std::vec::Vec<JoinaggregateTransformFieldsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for JoinaggregateTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`JoinaggregateTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum JoinaggregateTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
Null,
}
impl ::std::convert::From<ScaleField> for JoinaggregateTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for JoinaggregateTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for JoinaggregateTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`JoinaggregateTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum JoinaggregateTransformGroupby {
Array(::std::vec::Vec<JoinaggregateTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<JoinaggregateTransformGroupbyArrayItem>>
for JoinaggregateTransformGroupby
{
fn from(value: ::std::vec::Vec<JoinaggregateTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for JoinaggregateTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`JoinaggregateTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum JoinaggregateTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for JoinaggregateTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for JoinaggregateTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for JoinaggregateTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`JoinaggregateTransformKey`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum JoinaggregateTransformKey {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for JoinaggregateTransformKey {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for JoinaggregateTransformKey {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for JoinaggregateTransformKey {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`JoinaggregateTransformOps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum JoinaggregateTransformOps {
Array(::std::vec::Vec<JoinaggregateTransformOpsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<JoinaggregateTransformOpsArrayItem>>
for JoinaggregateTransformOps
{
fn from(value: ::std::vec::Vec<JoinaggregateTransformOpsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for JoinaggregateTransformOps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`JoinaggregateTransformOpsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum JoinaggregateTransformOpsArrayItem {
Variant0(JoinaggregateTransformOpsArrayItemVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<JoinaggregateTransformOpsArrayItemVariant0>
for JoinaggregateTransformOpsArrayItem
{
fn from(value: JoinaggregateTransformOpsArrayItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for JoinaggregateTransformOpsArrayItem {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`JoinaggregateTransformOpsArrayItemVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum JoinaggregateTransformOpsArrayItemVariant0 {
#[serde(rename = "values")]
Values,
#[serde(rename = "count")]
Count,
#[serde(rename = "__count__")]
XXcountXx,
#[serde(rename = "missing")]
Missing,
#[serde(rename = "valid")]
Valid,
#[serde(rename = "sum")]
Sum,
#[serde(rename = "product")]
Product,
#[serde(rename = "mean")]
Mean,
#[serde(rename = "average")]
Average,
#[serde(rename = "variance")]
Variance,
#[serde(rename = "variancep")]
Variancep,
#[serde(rename = "stdev")]
Stdev,
#[serde(rename = "stdevp")]
Stdevp,
#[serde(rename = "stderr")]
Stderr,
#[serde(rename = "distinct")]
Distinct,
#[serde(rename = "ci0")]
Ci0,
#[serde(rename = "ci1")]
Ci1,
#[serde(rename = "median")]
Median,
#[serde(rename = "q1")]
Q1,
#[serde(rename = "q3")]
Q3,
#[serde(rename = "min")]
Min,
#[serde(rename = "max")]
Max,
#[serde(rename = "argmin")]
Argmin,
#[serde(rename = "argmax")]
Argmax,
}
impl ::std::fmt::Display for JoinaggregateTransformOpsArrayItemVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Values => f.write_str("values"),
Self::Count => f.write_str("count"),
Self::XXcountXx => f.write_str("__count__"),
Self::Missing => f.write_str("missing"),
Self::Valid => f.write_str("valid"),
Self::Sum => f.write_str("sum"),
Self::Product => f.write_str("product"),
Self::Mean => f.write_str("mean"),
Self::Average => f.write_str("average"),
Self::Variance => f.write_str("variance"),
Self::Variancep => f.write_str("variancep"),
Self::Stdev => f.write_str("stdev"),
Self::Stdevp => f.write_str("stdevp"),
Self::Stderr => f.write_str("stderr"),
Self::Distinct => f.write_str("distinct"),
Self::Ci0 => f.write_str("ci0"),
Self::Ci1 => f.write_str("ci1"),
Self::Median => f.write_str("median"),
Self::Q1 => f.write_str("q1"),
Self::Q3 => f.write_str("q3"),
Self::Min => f.write_str("min"),
Self::Max => f.write_str("max"),
Self::Argmin => f.write_str("argmin"),
Self::Argmax => f.write_str("argmax"),
}
}
}
impl ::std::str::FromStr for JoinaggregateTransformOpsArrayItemVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"values" => Ok(Self::Values),
"count" => Ok(Self::Count),
"__count__" => Ok(Self::XXcountXx),
"missing" => Ok(Self::Missing),
"valid" => Ok(Self::Valid),
"sum" => Ok(Self::Sum),
"product" => Ok(Self::Product),
"mean" => Ok(Self::Mean),
"average" => Ok(Self::Average),
"variance" => Ok(Self::Variance),
"variancep" => Ok(Self::Variancep),
"stdev" => Ok(Self::Stdev),
"stdevp" => Ok(Self::Stdevp),
"stderr" => Ok(Self::Stderr),
"distinct" => Ok(Self::Distinct),
"ci0" => Ok(Self::Ci0),
"ci1" => Ok(Self::Ci1),
"median" => Ok(Self::Median),
"q1" => Ok(Self::Q1),
"q3" => Ok(Self::Q3),
"min" => Ok(Self::Min),
"max" => Ok(Self::Max),
"argmin" => Ok(Self::Argmin),
"argmax" => Ok(Self::Argmax),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for JoinaggregateTransformOpsArrayItemVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for JoinaggregateTransformOpsArrayItemVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`JoinaggregateTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum JoinaggregateTransformType {
#[serde(rename = "joinaggregate")]
Joinaggregate,
}
impl ::std::fmt::Display for JoinaggregateTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Joinaggregate => f.write_str("joinaggregate"),
}
}
}
impl ::std::str::FromStr for JoinaggregateTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"joinaggregate" => Ok(Self::Joinaggregate),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for JoinaggregateTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for JoinaggregateTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Kde2dTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Kde2dTransform {
#[serde(rename = "as", default = "defaults::kde2d_transform_as")]
pub as_: Kde2dTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub bandwidth: ::std::option::Option<Kde2dTransformBandwidth>,
#[serde(
rename = "cellSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub cell_size: ::std::option::Option<Kde2dTransformCellSize>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub counts: ::std::option::Option<Kde2dTransformCounts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<Kde2dTransformGroupby>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
pub size: Kde2dTransformSize,
#[serde(rename = "type")]
pub type_: Kde2dTransformType,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub weight: ::std::option::Option<Kde2dTransformWeight>,
pub x: Kde2dTransformX,
pub y: Kde2dTransformY,
}
#[doc = "`Kde2dTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for Kde2dTransformAs {
fn default() -> Self {
Kde2dTransformAs::String("grid".to_string())
}
}
impl ::std::convert::From<SignalRef> for Kde2dTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`Kde2dTransformBandwidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformBandwidth {
Array([Kde2dTransformBandwidthArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[Kde2dTransformBandwidthArrayItem; 2usize]> for Kde2dTransformBandwidth {
fn from(value: [Kde2dTransformBandwidthArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for Kde2dTransformBandwidth {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`Kde2dTransformBandwidthArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformBandwidthArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for Kde2dTransformBandwidthArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for Kde2dTransformBandwidthArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`Kde2dTransformCellSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformCellSize {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for Kde2dTransformCellSize {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for Kde2dTransformCellSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`Kde2dTransformCounts`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformCounts {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for Kde2dTransformCounts {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for Kde2dTransformCounts {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`Kde2dTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformGroupby {
Array(::std::vec::Vec<Kde2dTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<Kde2dTransformGroupbyArrayItem>>
for Kde2dTransformGroupby
{
fn from(value: ::std::vec::Vec<Kde2dTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for Kde2dTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`Kde2dTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for Kde2dTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for Kde2dTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for Kde2dTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`Kde2dTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformSize {
Array([Kde2dTransformSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[Kde2dTransformSizeArrayItem; 2usize]> for Kde2dTransformSize {
fn from(value: [Kde2dTransformSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for Kde2dTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`Kde2dTransformSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for Kde2dTransformSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for Kde2dTransformSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`Kde2dTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum Kde2dTransformType {
#[serde(rename = "kde2d")]
Kde2d,
}
impl ::std::fmt::Display for Kde2dTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Kde2d => f.write_str("kde2d"),
}
}
}
impl ::std::str::FromStr for Kde2dTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"kde2d" => Ok(Self::Kde2d),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for Kde2dTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for Kde2dTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Kde2dTransformWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformWeight {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for Kde2dTransformWeight {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for Kde2dTransformWeight {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for Kde2dTransformWeight {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`Kde2dTransformX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformX {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for Kde2dTransformX {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for Kde2dTransformX {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for Kde2dTransformX {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`Kde2dTransformY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Kde2dTransformY {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for Kde2dTransformY {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for Kde2dTransformY {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for Kde2dTransformY {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`KdeTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct KdeTransform {
#[serde(rename = "as", default = "defaults::kde_transform_as")]
pub as_: KdeTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub bandwidth: ::std::option::Option<KdeTransformBandwidth>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub counts: ::std::option::Option<KdeTransformCounts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub cumulative: ::std::option::Option<KdeTransformCumulative>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub extent: ::std::option::Option<KdeTransformExtent>,
pub field: KdeTransformField,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<KdeTransformGroupby>,
#[serde(default = "defaults::kde_transform_maxsteps")]
pub maxsteps: KdeTransformMaxsteps,
#[serde(default = "defaults::kde_transform_minsteps")]
pub minsteps: KdeTransformMinsteps,
#[serde(default = "defaults::kde_transform_resolve")]
pub resolve: KdeTransformResolve,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub steps: ::std::option::Option<KdeTransformSteps>,
#[serde(rename = "type")]
pub type_: KdeTransformType,
}
#[doc = "`KdeTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformAs {
Array(::std::vec::Vec<KdeTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::default::Default for KdeTransformAs {
fn default() -> Self {
KdeTransformAs::Array(vec![
KdeTransformAsArrayItem::String("value".to_string()),
KdeTransformAsArrayItem::String("density".to_string()),
])
}
}
impl ::std::convert::From<::std::vec::Vec<KdeTransformAsArrayItem>> for KdeTransformAs {
fn from(value: ::std::vec::Vec<KdeTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for KdeTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformBandwidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformBandwidth {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for KdeTransformBandwidth {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformBandwidth {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformCounts`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformCounts {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for KdeTransformCounts {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformCounts {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformCumulative`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformCumulative {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for KdeTransformCumulative {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformCumulative {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformExtent {
Array([KdeTransformExtentArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[KdeTransformExtentArrayItem; 2usize]> for KdeTransformExtent {
fn from(value: [KdeTransformExtentArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformExtent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformExtentArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformExtentArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for KdeTransformExtentArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformExtentArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for KdeTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for KdeTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for KdeTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`KdeTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformGroupby {
Array(::std::vec::Vec<KdeTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<KdeTransformGroupbyArrayItem>> for KdeTransformGroupby {
fn from(value: ::std::vec::Vec<KdeTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for KdeTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for KdeTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for KdeTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`KdeTransformMaxsteps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformMaxsteps {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for KdeTransformMaxsteps {
fn default() -> Self {
KdeTransformMaxsteps::Number(200_f64)
}
}
impl ::std::convert::From<f64> for KdeTransformMaxsteps {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformMaxsteps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformMinsteps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformMinsteps {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for KdeTransformMinsteps {
fn default() -> Self {
KdeTransformMinsteps::Number(25_f64)
}
}
impl ::std::convert::From<f64> for KdeTransformMinsteps {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformMinsteps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformResolve`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformResolve {
Variant0(KdeTransformResolveVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for KdeTransformResolve {
fn default() -> Self {
KdeTransformResolve::Variant0(KdeTransformResolveVariant0::Independent)
}
}
impl ::std::convert::From<KdeTransformResolveVariant0> for KdeTransformResolve {
fn from(value: KdeTransformResolveVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformResolve {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`KdeTransformResolveVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum KdeTransformResolveVariant0 {
#[serde(rename = "shared")]
Shared,
#[serde(rename = "independent")]
Independent,
}
impl ::std::fmt::Display for KdeTransformResolveVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Shared => f.write_str("shared"),
Self::Independent => f.write_str("independent"),
}
}
}
impl ::std::str::FromStr for KdeTransformResolveVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"shared" => Ok(Self::Shared),
"independent" => Ok(Self::Independent),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for KdeTransformResolveVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for KdeTransformResolveVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`KdeTransformSteps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum KdeTransformSteps {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for KdeTransformSteps {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for KdeTransformSteps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`KdeTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum KdeTransformType {
#[serde(rename = "kde")]
Kde,
}
impl ::std::fmt::Display for KdeTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Kde => f.write_str("kde"),
}
}
}
impl ::std::str::FromStr for KdeTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"kde" => Ok(Self::Kde),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for KdeTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for KdeTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LabelOverlap`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelOverlap {
Variant0(bool),
Variant1(LabelOverlapVariant1),
Variant2(SignalRef),
}
impl ::std::convert::From<bool> for LabelOverlap {
fn from(value: bool) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<LabelOverlapVariant1> for LabelOverlap {
fn from(value: LabelOverlapVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for LabelOverlap {
fn from(value: SignalRef) -> Self {
Self::Variant2(value)
}
}
#[doc = "`LabelOverlapVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LabelOverlapVariant1 {
#[serde(rename = "parity")]
Parity,
#[serde(rename = "greedy")]
Greedy,
}
impl ::std::fmt::Display for LabelOverlapVariant1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Parity => f.write_str("parity"),
Self::Greedy => f.write_str("greedy"),
}
}
}
impl ::std::str::FromStr for LabelOverlapVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"parity" => Ok(Self::Parity),
"greedy" => Ok(Self::Greedy),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LabelOverlapVariant1 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LabelOverlapVariant1 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LabelTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LabelTransform {
#[serde(default = "defaults::label_transform_anchor")]
pub anchor: LabelTransformAnchor,
#[serde(rename = "as", default = "defaults::label_transform_as")]
pub as_: LabelTransformAs,
#[serde(
rename = "avoidBaseMark",
default = "defaults::label_transform_avoid_base_mark"
)]
pub avoid_base_mark: LabelTransformAvoidBaseMark,
#[serde(
rename = "avoidMarks",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub avoid_marks: ::std::option::Option<LabelTransformAvoidMarks>,
#[serde(
rename = "lineAnchor",
default = "defaults::label_transform_line_anchor"
)]
pub line_anchor: LabelTransformLineAnchor,
#[serde(
rename = "markIndex",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub mark_index: ::std::option::Option<LabelTransformMarkIndex>,
#[serde(default = "defaults::label_transform_method")]
pub method: LabelTransformMethod,
#[serde(default = "defaults::label_transform_offset")]
pub offset: LabelTransformOffset,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub padding: ::std::option::Option<LabelTransformPadding>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
pub size: LabelTransformSize,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(rename = "type")]
pub type_: LabelTransformType,
}
#[doc = "`LabelTransformAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformAnchor {
Array(::std::vec::Vec<LabelTransformAnchorArrayItem>),
SignalRef(SignalRef),
}
impl ::std::default::Default for LabelTransformAnchor {
fn default() -> Self {
LabelTransformAnchor::Array(vec![
LabelTransformAnchorArrayItem::String("top-left".to_string()),
LabelTransformAnchorArrayItem::String("left".to_string()),
LabelTransformAnchorArrayItem::String("bottom-left".to_string()),
LabelTransformAnchorArrayItem::String("top".to_string()),
LabelTransformAnchorArrayItem::String("bottom".to_string()),
LabelTransformAnchorArrayItem::String("top-right".to_string()),
LabelTransformAnchorArrayItem::String("right".to_string()),
LabelTransformAnchorArrayItem::String("bottom-right".to_string()),
])
}
}
impl ::std::convert::From<::std::vec::Vec<LabelTransformAnchorArrayItem>> for LabelTransformAnchor {
fn from(value: ::std::vec::Vec<LabelTransformAnchorArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformAnchor {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformAnchorArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformAnchorArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LabelTransformAnchorArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformAs {
Array([LabelTransformAsArrayItem; 5usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for LabelTransformAs {
fn default() -> Self {
LabelTransformAs::Array([
LabelTransformAsArrayItem::String("x".to_string()),
LabelTransformAsArrayItem::String("y".to_string()),
LabelTransformAsArrayItem::String("opacity".to_string()),
LabelTransformAsArrayItem::String("align".to_string()),
LabelTransformAsArrayItem::String("baseline".to_string()),
])
}
}
impl ::std::convert::From<[LabelTransformAsArrayItem; 5usize]> for LabelTransformAs {
fn from(value: [LabelTransformAsArrayItem; 5usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LabelTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformAvoidBaseMark`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformAvoidBaseMark {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::default::Default for LabelTransformAvoidBaseMark {
fn default() -> Self {
LabelTransformAvoidBaseMark::Boolean(true)
}
}
impl ::std::convert::From<bool> for LabelTransformAvoidBaseMark {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformAvoidBaseMark {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformAvoidMarks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformAvoidMarks {
Array(::std::vec::Vec<::std::string::String>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::std::string::String>> for LabelTransformAvoidMarks {
fn from(value: ::std::vec::Vec<::std::string::String>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformAvoidMarks {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformLineAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformLineAnchor {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for LabelTransformLineAnchor {
fn default() -> Self {
LabelTransformLineAnchor::String("end".to_string())
}
}
impl ::std::convert::From<SignalRef> for LabelTransformLineAnchor {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformMarkIndex`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformMarkIndex {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for LabelTransformMarkIndex {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformMarkIndex {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformMethod`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformMethod {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for LabelTransformMethod {
fn default() -> Self {
LabelTransformMethod::String("naive".to_string())
}
}
impl ::std::convert::From<SignalRef> for LabelTransformMethod {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformOffset {
Array(::std::vec::Vec<LabelTransformOffsetArrayItem>),
SignalRef(SignalRef),
}
impl ::std::default::Default for LabelTransformOffset {
fn default() -> Self {
LabelTransformOffset::Array(vec![LabelTransformOffsetArrayItem::Number(1_f64)])
}
}
impl ::std::convert::From<::std::vec::Vec<LabelTransformOffsetArrayItem>> for LabelTransformOffset {
fn from(value: ::std::vec::Vec<LabelTransformOffsetArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformOffset {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformOffsetArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformOffsetArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for LabelTransformOffsetArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformOffsetArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformPadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformPadding {
Number(f64),
SignalRef(SignalRef),
Null,
}
impl ::std::convert::From<f64> for LabelTransformPadding {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformPadding {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformSize {
Array([LabelTransformSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[LabelTransformSizeArrayItem; 2usize]> for LabelTransformSize {
fn from(value: [LabelTransformSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelTransformSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for LabelTransformSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for LabelTransformSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LabelTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LabelTransformType {
#[serde(rename = "label")]
Label,
}
impl ::std::fmt::Display for LabelTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Label => f.write_str("label"),
}
}
}
impl ::std::str::FromStr for LabelTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"label" => Ok(Self::Label),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LabelTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LabelTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Layout`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Layout {
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
align: ::std::option::Option<LayoutObjectAlign>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bounds: ::std::option::Option<LayoutObjectBounds>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
center: ::std::option::Option<LayoutObjectCenter>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
columns: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "footerBand",
skip_serializing_if = "::std::option::Option::is_none"
)]
footer_band: ::std::option::Option<LayoutObjectFooterBand>,
#[serde(
rename = "headerBand",
skip_serializing_if = "::std::option::Option::is_none"
)]
header_band: ::std::option::Option<LayoutObjectHeaderBand>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<LayoutObjectOffset>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<LayoutObjectPadding>,
#[serde(
rename = "titleAnchor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_anchor: ::std::option::Option<LayoutObjectTitleAnchor>,
#[serde(
rename = "titleBand",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_band: ::std::option::Option<LayoutObjectTitleBand>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for Layout {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LayoutObjectAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LayoutObjectAlign {
Variant0(LayoutObjectAlignVariant0),
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
column: ::std::option::Option<LayoutObjectAlignVariant1Column>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
row: ::std::option::Option<LayoutObjectAlignVariant1Row>,
},
}
impl ::std::convert::From<LayoutObjectAlignVariant0> for LayoutObjectAlign {
fn from(value: LayoutObjectAlignVariant0) -> Self {
Self::Variant0(value)
}
}
#[doc = "`LayoutObjectAlignVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LayoutObjectAlignVariant0 {
Variant0(LayoutObjectAlignVariant0Variant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LayoutObjectAlignVariant0Variant0> for LayoutObjectAlignVariant0 {
fn from(value: LayoutObjectAlignVariant0Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectAlignVariant0 {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LayoutObjectAlignVariant0Variant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LayoutObjectAlignVariant0Variant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LayoutObjectAlignVariant0Variant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LayoutObjectAlignVariant0Variant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LayoutObjectAlignVariant0Variant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LayoutObjectAlignVariant0Variant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LayoutObjectAlignVariant1Column`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LayoutObjectAlignVariant1Column {
Variant0(LayoutObjectAlignVariant1ColumnVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LayoutObjectAlignVariant1ColumnVariant0>
for LayoutObjectAlignVariant1Column
{
fn from(value: LayoutObjectAlignVariant1ColumnVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectAlignVariant1Column {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LayoutObjectAlignVariant1ColumnVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LayoutObjectAlignVariant1ColumnVariant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LayoutObjectAlignVariant1ColumnVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LayoutObjectAlignVariant1ColumnVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LayoutObjectAlignVariant1ColumnVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LayoutObjectAlignVariant1ColumnVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LayoutObjectAlignVariant1Row`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LayoutObjectAlignVariant1Row {
Variant0(LayoutObjectAlignVariant1RowVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LayoutObjectAlignVariant1RowVariant0> for LayoutObjectAlignVariant1Row {
fn from(value: LayoutObjectAlignVariant1RowVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectAlignVariant1Row {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LayoutObjectAlignVariant1RowVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LayoutObjectAlignVariant1RowVariant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LayoutObjectAlignVariant1RowVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LayoutObjectAlignVariant1RowVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LayoutObjectAlignVariant1RowVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LayoutObjectAlignVariant1RowVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LayoutObjectBounds`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LayoutObjectBounds {
Variant0(LayoutObjectBoundsVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LayoutObjectBoundsVariant0> for LayoutObjectBounds {
fn from(value: LayoutObjectBoundsVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectBounds {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LayoutObjectBoundsVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LayoutObjectBoundsVariant0 {
#[serde(rename = "full")]
Full,
#[serde(rename = "flush")]
Flush,
}
impl ::std::fmt::Display for LayoutObjectBoundsVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Full => f.write_str("full"),
Self::Flush => f.write_str("flush"),
}
}
}
impl ::std::str::FromStr for LayoutObjectBoundsVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"full" => Ok(Self::Full),
"flush" => Ok(Self::Flush),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LayoutObjectBoundsVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LayoutObjectBoundsVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LayoutObjectCenter`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LayoutObjectCenter {
Boolean(bool),
SignalRef(SignalRef),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
column: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
row: ::std::option::Option<BooleanOrSignal>,
},
}
impl ::std::convert::From<bool> for LayoutObjectCenter {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectCenter {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LayoutObjectFooterBand`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LayoutObjectFooterBand {
NumberOrSignal(NumberOrSignal),
Null,
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
column: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
row: ::std::option::Option<NumberOrSignal>,
},
}
impl ::std::convert::From<NumberOrSignal> for LayoutObjectFooterBand {
fn from(value: NumberOrSignal) -> Self {
Self::NumberOrSignal(value)
}
}
#[doc = "`LayoutObjectHeaderBand`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LayoutObjectHeaderBand {
NumberOrSignal(NumberOrSignal),
Null,
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
column: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
row: ::std::option::Option<NumberOrSignal>,
},
}
impl ::std::convert::From<NumberOrSignal> for LayoutObjectHeaderBand {
fn from(value: NumberOrSignal) -> Self {
Self::NumberOrSignal(value)
}
}
#[doc = "`LayoutObjectOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LayoutObjectOffset {
Number(f64),
SignalRef(SignalRef),
Object {
#[serde(
rename = "columnFooter",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_footer: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "columnHeader",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_header: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "columnTitle",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_title: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "rowFooter",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_footer: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "rowHeader",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_header: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "rowTitle",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_title: ::std::option::Option<NumberOrSignal>,
},
}
impl ::std::convert::From<f64> for LayoutObjectOffset {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectOffset {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LayoutObjectPadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LayoutObjectPadding {
Number(f64),
SignalRef(SignalRef),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
column: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
row: ::std::option::Option<NumberOrSignal>,
},
}
impl ::std::convert::From<f64> for LayoutObjectPadding {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectPadding {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LayoutObjectTitleAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LayoutObjectTitleAnchor {
Variant0(LayoutObjectTitleAnchorVariant0),
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
column: ::std::option::Option<LayoutObjectTitleAnchorVariant1Column>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
row: ::std::option::Option<LayoutObjectTitleAnchorVariant1Row>,
},
}
impl ::std::convert::From<LayoutObjectTitleAnchorVariant0> for LayoutObjectTitleAnchor {
fn from(value: LayoutObjectTitleAnchorVariant0) -> Self {
Self::Variant0(value)
}
}
#[doc = "`LayoutObjectTitleAnchorVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LayoutObjectTitleAnchorVariant0 {
Variant0(LayoutObjectTitleAnchorVariant0Variant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LayoutObjectTitleAnchorVariant0Variant0>
for LayoutObjectTitleAnchorVariant0
{
fn from(value: LayoutObjectTitleAnchorVariant0Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectTitleAnchorVariant0 {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LayoutObjectTitleAnchorVariant0Variant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LayoutObjectTitleAnchorVariant0Variant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LayoutObjectTitleAnchorVariant0Variant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LayoutObjectTitleAnchorVariant0Variant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LayoutObjectTitleAnchorVariant0Variant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LayoutObjectTitleAnchorVariant0Variant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LayoutObjectTitleAnchorVariant1Column`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LayoutObjectTitleAnchorVariant1Column {
Variant0(LayoutObjectTitleAnchorVariant1ColumnVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LayoutObjectTitleAnchorVariant1ColumnVariant0>
for LayoutObjectTitleAnchorVariant1Column
{
fn from(value: LayoutObjectTitleAnchorVariant1ColumnVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectTitleAnchorVariant1Column {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LayoutObjectTitleAnchorVariant1ColumnVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LayoutObjectTitleAnchorVariant1ColumnVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LayoutObjectTitleAnchorVariant1ColumnVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LayoutObjectTitleAnchorVariant1ColumnVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LayoutObjectTitleAnchorVariant1ColumnVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for LayoutObjectTitleAnchorVariant1ColumnVariant0
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LayoutObjectTitleAnchorVariant1Row`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LayoutObjectTitleAnchorVariant1Row {
Variant0(LayoutObjectTitleAnchorVariant1RowVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LayoutObjectTitleAnchorVariant1RowVariant0>
for LayoutObjectTitleAnchorVariant1Row
{
fn from(value: LayoutObjectTitleAnchorVariant1RowVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LayoutObjectTitleAnchorVariant1Row {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LayoutObjectTitleAnchorVariant1RowVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LayoutObjectTitleAnchorVariant1RowVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LayoutObjectTitleAnchorVariant1RowVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LayoutObjectTitleAnchorVariant1RowVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LayoutObjectTitleAnchorVariant1RowVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LayoutObjectTitleAnchorVariant1RowVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LayoutObjectTitleBand`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LayoutObjectTitleBand {
NumberOrSignal(NumberOrSignal),
Null,
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
column: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
row: ::std::option::Option<NumberOrSignal>,
},
}
impl ::std::convert::From<NumberOrSignal> for LayoutObjectTitleBand {
fn from(value: NumberOrSignal) -> Self {
Self::NumberOrSignal(value)
}
}
#[doc = "`Legend`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Legend {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
aria: ::std::option::Option<bool>,
#[serde(
rename = "clipHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
clip_height: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "columnPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
columns: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "cornerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
corner_radius: ::std::option::Option<LegendVariant0CornerRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
direction: ::std::option::Option<LegendVariant0Direction>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
encode: ::std::option::Option<LegendVariant0Encode>,
#[serde(
rename = "fillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
fill_color: ::std::option::Option<LegendVariant0FillColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
format: ::std::option::Option<LegendVariant0Format>,
#[serde(
rename = "formatType",
skip_serializing_if = "::std::option::Option::is_none"
)]
format_type: ::std::option::Option<LegendVariant0FormatType>,
#[serde(
rename = "gradientLength",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_length: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gradientOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_opacity: ::std::option::Option<LegendVariant0GradientOpacity>,
#[serde(
rename = "gradientStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_color: ::std::option::Option<LegendVariant0GradientStrokeColor>,
#[serde(
rename = "gradientStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_width: ::std::option::Option<LegendVariant0GradientStrokeWidth>,
#[serde(
rename = "gradientThickness",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_thickness: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gridAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
grid_align: ::std::option::Option<LegendVariant0GridAlign>,
#[serde(
rename = "labelAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_align: ::std::option::Option<LegendVariant0LabelAlign>,
#[serde(
rename = "labelBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_baseline: ::std::option::Option<LegendVariant0LabelBaseline>,
#[serde(
rename = "labelColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_color: ::std::option::Option<LegendVariant0LabelColor>,
#[serde(
rename = "labelFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font: ::std::option::Option<LegendVariant0LabelFont>,
#[serde(
rename = "labelFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_size: ::std::option::Option<LegendVariant0LabelFontSize>,
#[serde(
rename = "labelFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_style: ::std::option::Option<LegendVariant0LabelFontStyle>,
#[serde(
rename = "labelFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_weight: ::std::option::Option<LegendVariant0LabelFontWeight>,
#[serde(
rename = "labelLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_limit: ::std::option::Option<LegendVariant0LabelLimit>,
#[serde(
rename = "labelOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_offset: ::std::option::Option<LegendVariant0LabelOffset>,
#[serde(
rename = "labelOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_opacity: ::std::option::Option<LegendVariant0LabelOpacity>,
#[serde(
rename = "labelOverlap",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_overlap: ::std::option::Option<LabelOverlap>,
#[serde(
rename = "labelSeparation",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_separation: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "legendX",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_x: ::std::option::Option<LegendVariant0LegendX>,
#[serde(
rename = "legendY",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_y: ::std::option::Option<LegendVariant0LegendY>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<LegendVariant0Offset>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
orient: ::std::option::Option<LegendVariant0Orient>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<LegendVariant0Padding>,
#[serde(
rename = "rowPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_padding: ::std::option::Option<NumberOrSignal>,
size: ::std::string::String,
#[serde(
rename = "strokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
stroke_color: ::std::option::Option<LegendVariant0StrokeColor>,
#[serde(
rename = "symbolDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash: ::std::option::Option<LegendVariant0SymbolDash>,
#[serde(
rename = "symbolDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash_offset: ::std::option::Option<LegendVariant0SymbolDashOffset>,
#[serde(
rename = "symbolFillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_fill_color: ::std::option::Option<LegendVariant0SymbolFillColor>,
#[serde(
rename = "symbolLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_limit: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "symbolOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_offset: ::std::option::Option<LegendVariant0SymbolOffset>,
#[serde(
rename = "symbolOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_opacity: ::std::option::Option<LegendVariant0SymbolOpacity>,
#[serde(
rename = "symbolSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_size: ::std::option::Option<LegendVariant0SymbolSize>,
#[serde(
rename = "symbolStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_color: ::std::option::Option<LegendVariant0SymbolStrokeColor>,
#[serde(
rename = "symbolStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_width: ::std::option::Option<LegendVariant0SymbolStrokeWidth>,
#[serde(
rename = "symbolType",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_type: ::std::option::Option<LegendVariant0SymbolType>,
#[serde(
rename = "tickCount",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_count: ::std::option::Option<TickCount>,
#[serde(
rename = "tickMinStep",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_min_step: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
title: ::std::option::Option<TextOrSignal>,
#[serde(
rename = "titleAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_align: ::std::option::Option<LegendVariant0TitleAlign>,
#[serde(
rename = "titleAnchor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_anchor: ::std::option::Option<LegendVariant0TitleAnchor>,
#[serde(
rename = "titleBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_baseline: ::std::option::Option<LegendVariant0TitleBaseline>,
#[serde(
rename = "titleColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_color: ::std::option::Option<LegendVariant0TitleColor>,
#[serde(
rename = "titleFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font: ::std::option::Option<LegendVariant0TitleFont>,
#[serde(
rename = "titleFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_size: ::std::option::Option<LegendVariant0TitleFontSize>,
#[serde(
rename = "titleFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_style: ::std::option::Option<LegendVariant0TitleFontStyle>,
#[serde(
rename = "titleFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_weight: ::std::option::Option<LegendVariant0TitleFontWeight>,
#[serde(
rename = "titleLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_limit: ::std::option::Option<LegendVariant0TitleLimit>,
#[serde(
rename = "titleLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_line_height: ::std::option::Option<LegendVariant0TitleLineHeight>,
#[serde(
rename = "titleOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_opacity: ::std::option::Option<LegendVariant0TitleOpacity>,
#[serde(
rename = "titleOrient",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_orient: ::std::option::Option<LegendVariant0TitleOrient>,
#[serde(
rename = "titlePadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_padding: ::std::option::Option<LegendVariant0TitlePadding>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
type_: ::std::option::Option<LegendVariant0Type>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
values: ::std::option::Option<ArrayOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zindex: ::std::option::Option<f64>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
aria: ::std::option::Option<bool>,
#[serde(
rename = "clipHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
clip_height: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "columnPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
columns: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "cornerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
corner_radius: ::std::option::Option<LegendVariant1CornerRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
direction: ::std::option::Option<LegendVariant1Direction>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
encode: ::std::option::Option<LegendVariant1Encode>,
#[serde(
rename = "fillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
fill_color: ::std::option::Option<LegendVariant1FillColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
format: ::std::option::Option<LegendVariant1Format>,
#[serde(
rename = "formatType",
skip_serializing_if = "::std::option::Option::is_none"
)]
format_type: ::std::option::Option<LegendVariant1FormatType>,
#[serde(
rename = "gradientLength",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_length: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gradientOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_opacity: ::std::option::Option<LegendVariant1GradientOpacity>,
#[serde(
rename = "gradientStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_color: ::std::option::Option<LegendVariant1GradientStrokeColor>,
#[serde(
rename = "gradientStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_width: ::std::option::Option<LegendVariant1GradientStrokeWidth>,
#[serde(
rename = "gradientThickness",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_thickness: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gridAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
grid_align: ::std::option::Option<LegendVariant1GridAlign>,
#[serde(
rename = "labelAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_align: ::std::option::Option<LegendVariant1LabelAlign>,
#[serde(
rename = "labelBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_baseline: ::std::option::Option<LegendVariant1LabelBaseline>,
#[serde(
rename = "labelColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_color: ::std::option::Option<LegendVariant1LabelColor>,
#[serde(
rename = "labelFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font: ::std::option::Option<LegendVariant1LabelFont>,
#[serde(
rename = "labelFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_size: ::std::option::Option<LegendVariant1LabelFontSize>,
#[serde(
rename = "labelFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_style: ::std::option::Option<LegendVariant1LabelFontStyle>,
#[serde(
rename = "labelFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_weight: ::std::option::Option<LegendVariant1LabelFontWeight>,
#[serde(
rename = "labelLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_limit: ::std::option::Option<LegendVariant1LabelLimit>,
#[serde(
rename = "labelOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_offset: ::std::option::Option<LegendVariant1LabelOffset>,
#[serde(
rename = "labelOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_opacity: ::std::option::Option<LegendVariant1LabelOpacity>,
#[serde(
rename = "labelOverlap",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_overlap: ::std::option::Option<LabelOverlap>,
#[serde(
rename = "labelSeparation",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_separation: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "legendX",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_x: ::std::option::Option<LegendVariant1LegendX>,
#[serde(
rename = "legendY",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_y: ::std::option::Option<LegendVariant1LegendY>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<LegendVariant1Offset>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
orient: ::std::option::Option<LegendVariant1Orient>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<LegendVariant1Padding>,
#[serde(
rename = "rowPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_padding: ::std::option::Option<NumberOrSignal>,
shape: ::std::string::String,
#[serde(
rename = "strokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
stroke_color: ::std::option::Option<LegendVariant1StrokeColor>,
#[serde(
rename = "symbolDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash: ::std::option::Option<LegendVariant1SymbolDash>,
#[serde(
rename = "symbolDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash_offset: ::std::option::Option<LegendVariant1SymbolDashOffset>,
#[serde(
rename = "symbolFillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_fill_color: ::std::option::Option<LegendVariant1SymbolFillColor>,
#[serde(
rename = "symbolLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_limit: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "symbolOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_offset: ::std::option::Option<LegendVariant1SymbolOffset>,
#[serde(
rename = "symbolOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_opacity: ::std::option::Option<LegendVariant1SymbolOpacity>,
#[serde(
rename = "symbolSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_size: ::std::option::Option<LegendVariant1SymbolSize>,
#[serde(
rename = "symbolStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_color: ::std::option::Option<LegendVariant1SymbolStrokeColor>,
#[serde(
rename = "symbolStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_width: ::std::option::Option<LegendVariant1SymbolStrokeWidth>,
#[serde(
rename = "symbolType",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_type: ::std::option::Option<LegendVariant1SymbolType>,
#[serde(
rename = "tickCount",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_count: ::std::option::Option<TickCount>,
#[serde(
rename = "tickMinStep",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_min_step: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
title: ::std::option::Option<TextOrSignal>,
#[serde(
rename = "titleAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_align: ::std::option::Option<LegendVariant1TitleAlign>,
#[serde(
rename = "titleAnchor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_anchor: ::std::option::Option<LegendVariant1TitleAnchor>,
#[serde(
rename = "titleBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_baseline: ::std::option::Option<LegendVariant1TitleBaseline>,
#[serde(
rename = "titleColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_color: ::std::option::Option<LegendVariant1TitleColor>,
#[serde(
rename = "titleFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font: ::std::option::Option<LegendVariant1TitleFont>,
#[serde(
rename = "titleFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_size: ::std::option::Option<LegendVariant1TitleFontSize>,
#[serde(
rename = "titleFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_style: ::std::option::Option<LegendVariant1TitleFontStyle>,
#[serde(
rename = "titleFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_weight: ::std::option::Option<LegendVariant1TitleFontWeight>,
#[serde(
rename = "titleLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_limit: ::std::option::Option<LegendVariant1TitleLimit>,
#[serde(
rename = "titleLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_line_height: ::std::option::Option<LegendVariant1TitleLineHeight>,
#[serde(
rename = "titleOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_opacity: ::std::option::Option<LegendVariant1TitleOpacity>,
#[serde(
rename = "titleOrient",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_orient: ::std::option::Option<LegendVariant1TitleOrient>,
#[serde(
rename = "titlePadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_padding: ::std::option::Option<LegendVariant1TitlePadding>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
type_: ::std::option::Option<LegendVariant1Type>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
values: ::std::option::Option<ArrayOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zindex: ::std::option::Option<f64>,
},
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
aria: ::std::option::Option<bool>,
#[serde(
rename = "clipHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
clip_height: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "columnPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
columns: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "cornerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
corner_radius: ::std::option::Option<LegendVariant2CornerRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
direction: ::std::option::Option<LegendVariant2Direction>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
encode: ::std::option::Option<LegendVariant2Encode>,
fill: ::std::string::String,
#[serde(
rename = "fillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
fill_color: ::std::option::Option<LegendVariant2FillColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
format: ::std::option::Option<LegendVariant2Format>,
#[serde(
rename = "formatType",
skip_serializing_if = "::std::option::Option::is_none"
)]
format_type: ::std::option::Option<LegendVariant2FormatType>,
#[serde(
rename = "gradientLength",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_length: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gradientOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_opacity: ::std::option::Option<LegendVariant2GradientOpacity>,
#[serde(
rename = "gradientStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_color: ::std::option::Option<LegendVariant2GradientStrokeColor>,
#[serde(
rename = "gradientStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_width: ::std::option::Option<LegendVariant2GradientStrokeWidth>,
#[serde(
rename = "gradientThickness",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_thickness: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gridAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
grid_align: ::std::option::Option<LegendVariant2GridAlign>,
#[serde(
rename = "labelAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_align: ::std::option::Option<LegendVariant2LabelAlign>,
#[serde(
rename = "labelBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_baseline: ::std::option::Option<LegendVariant2LabelBaseline>,
#[serde(
rename = "labelColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_color: ::std::option::Option<LegendVariant2LabelColor>,
#[serde(
rename = "labelFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font: ::std::option::Option<LegendVariant2LabelFont>,
#[serde(
rename = "labelFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_size: ::std::option::Option<LegendVariant2LabelFontSize>,
#[serde(
rename = "labelFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_style: ::std::option::Option<LegendVariant2LabelFontStyle>,
#[serde(
rename = "labelFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_weight: ::std::option::Option<LegendVariant2LabelFontWeight>,
#[serde(
rename = "labelLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_limit: ::std::option::Option<LegendVariant2LabelLimit>,
#[serde(
rename = "labelOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_offset: ::std::option::Option<LegendVariant2LabelOffset>,
#[serde(
rename = "labelOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_opacity: ::std::option::Option<LegendVariant2LabelOpacity>,
#[serde(
rename = "labelOverlap",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_overlap: ::std::option::Option<LabelOverlap>,
#[serde(
rename = "labelSeparation",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_separation: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "legendX",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_x: ::std::option::Option<LegendVariant2LegendX>,
#[serde(
rename = "legendY",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_y: ::std::option::Option<LegendVariant2LegendY>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<LegendVariant2Offset>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
orient: ::std::option::Option<LegendVariant2Orient>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<LegendVariant2Padding>,
#[serde(
rename = "rowPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_padding: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "strokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
stroke_color: ::std::option::Option<LegendVariant2StrokeColor>,
#[serde(
rename = "symbolDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash: ::std::option::Option<LegendVariant2SymbolDash>,
#[serde(
rename = "symbolDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash_offset: ::std::option::Option<LegendVariant2SymbolDashOffset>,
#[serde(
rename = "symbolFillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_fill_color: ::std::option::Option<LegendVariant2SymbolFillColor>,
#[serde(
rename = "symbolLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_limit: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "symbolOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_offset: ::std::option::Option<LegendVariant2SymbolOffset>,
#[serde(
rename = "symbolOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_opacity: ::std::option::Option<LegendVariant2SymbolOpacity>,
#[serde(
rename = "symbolSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_size: ::std::option::Option<LegendVariant2SymbolSize>,
#[serde(
rename = "symbolStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_color: ::std::option::Option<LegendVariant2SymbolStrokeColor>,
#[serde(
rename = "symbolStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_width: ::std::option::Option<LegendVariant2SymbolStrokeWidth>,
#[serde(
rename = "symbolType",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_type: ::std::option::Option<LegendVariant2SymbolType>,
#[serde(
rename = "tickCount",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_count: ::std::option::Option<TickCount>,
#[serde(
rename = "tickMinStep",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_min_step: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
title: ::std::option::Option<TextOrSignal>,
#[serde(
rename = "titleAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_align: ::std::option::Option<LegendVariant2TitleAlign>,
#[serde(
rename = "titleAnchor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_anchor: ::std::option::Option<LegendVariant2TitleAnchor>,
#[serde(
rename = "titleBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_baseline: ::std::option::Option<LegendVariant2TitleBaseline>,
#[serde(
rename = "titleColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_color: ::std::option::Option<LegendVariant2TitleColor>,
#[serde(
rename = "titleFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font: ::std::option::Option<LegendVariant2TitleFont>,
#[serde(
rename = "titleFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_size: ::std::option::Option<LegendVariant2TitleFontSize>,
#[serde(
rename = "titleFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_style: ::std::option::Option<LegendVariant2TitleFontStyle>,
#[serde(
rename = "titleFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_weight: ::std::option::Option<LegendVariant2TitleFontWeight>,
#[serde(
rename = "titleLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_limit: ::std::option::Option<LegendVariant2TitleLimit>,
#[serde(
rename = "titleLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_line_height: ::std::option::Option<LegendVariant2TitleLineHeight>,
#[serde(
rename = "titleOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_opacity: ::std::option::Option<LegendVariant2TitleOpacity>,
#[serde(
rename = "titleOrient",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_orient: ::std::option::Option<LegendVariant2TitleOrient>,
#[serde(
rename = "titlePadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_padding: ::std::option::Option<LegendVariant2TitlePadding>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
type_: ::std::option::Option<LegendVariant2Type>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
values: ::std::option::Option<ArrayOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zindex: ::std::option::Option<f64>,
},
Variant3 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
aria: ::std::option::Option<bool>,
#[serde(
rename = "clipHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
clip_height: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "columnPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
columns: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "cornerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
corner_radius: ::std::option::Option<LegendVariant3CornerRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
direction: ::std::option::Option<LegendVariant3Direction>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
encode: ::std::option::Option<LegendVariant3Encode>,
#[serde(
rename = "fillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
fill_color: ::std::option::Option<LegendVariant3FillColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
format: ::std::option::Option<LegendVariant3Format>,
#[serde(
rename = "formatType",
skip_serializing_if = "::std::option::Option::is_none"
)]
format_type: ::std::option::Option<LegendVariant3FormatType>,
#[serde(
rename = "gradientLength",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_length: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gradientOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_opacity: ::std::option::Option<LegendVariant3GradientOpacity>,
#[serde(
rename = "gradientStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_color: ::std::option::Option<LegendVariant3GradientStrokeColor>,
#[serde(
rename = "gradientStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_width: ::std::option::Option<LegendVariant3GradientStrokeWidth>,
#[serde(
rename = "gradientThickness",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_thickness: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gridAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
grid_align: ::std::option::Option<LegendVariant3GridAlign>,
#[serde(
rename = "labelAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_align: ::std::option::Option<LegendVariant3LabelAlign>,
#[serde(
rename = "labelBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_baseline: ::std::option::Option<LegendVariant3LabelBaseline>,
#[serde(
rename = "labelColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_color: ::std::option::Option<LegendVariant3LabelColor>,
#[serde(
rename = "labelFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font: ::std::option::Option<LegendVariant3LabelFont>,
#[serde(
rename = "labelFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_size: ::std::option::Option<LegendVariant3LabelFontSize>,
#[serde(
rename = "labelFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_style: ::std::option::Option<LegendVariant3LabelFontStyle>,
#[serde(
rename = "labelFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_weight: ::std::option::Option<LegendVariant3LabelFontWeight>,
#[serde(
rename = "labelLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_limit: ::std::option::Option<LegendVariant3LabelLimit>,
#[serde(
rename = "labelOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_offset: ::std::option::Option<LegendVariant3LabelOffset>,
#[serde(
rename = "labelOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_opacity: ::std::option::Option<LegendVariant3LabelOpacity>,
#[serde(
rename = "labelOverlap",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_overlap: ::std::option::Option<LabelOverlap>,
#[serde(
rename = "labelSeparation",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_separation: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "legendX",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_x: ::std::option::Option<LegendVariant3LegendX>,
#[serde(
rename = "legendY",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_y: ::std::option::Option<LegendVariant3LegendY>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<LegendVariant3Offset>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
orient: ::std::option::Option<LegendVariant3Orient>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<LegendVariant3Padding>,
#[serde(
rename = "rowPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_padding: ::std::option::Option<NumberOrSignal>,
stroke: ::std::string::String,
#[serde(
rename = "strokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
stroke_color: ::std::option::Option<LegendVariant3StrokeColor>,
#[serde(
rename = "symbolDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash: ::std::option::Option<LegendVariant3SymbolDash>,
#[serde(
rename = "symbolDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash_offset: ::std::option::Option<LegendVariant3SymbolDashOffset>,
#[serde(
rename = "symbolFillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_fill_color: ::std::option::Option<LegendVariant3SymbolFillColor>,
#[serde(
rename = "symbolLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_limit: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "symbolOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_offset: ::std::option::Option<LegendVariant3SymbolOffset>,
#[serde(
rename = "symbolOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_opacity: ::std::option::Option<LegendVariant3SymbolOpacity>,
#[serde(
rename = "symbolSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_size: ::std::option::Option<LegendVariant3SymbolSize>,
#[serde(
rename = "symbolStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_color: ::std::option::Option<LegendVariant3SymbolStrokeColor>,
#[serde(
rename = "symbolStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_width: ::std::option::Option<LegendVariant3SymbolStrokeWidth>,
#[serde(
rename = "symbolType",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_type: ::std::option::Option<LegendVariant3SymbolType>,
#[serde(
rename = "tickCount",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_count: ::std::option::Option<TickCount>,
#[serde(
rename = "tickMinStep",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_min_step: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
title: ::std::option::Option<TextOrSignal>,
#[serde(
rename = "titleAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_align: ::std::option::Option<LegendVariant3TitleAlign>,
#[serde(
rename = "titleAnchor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_anchor: ::std::option::Option<LegendVariant3TitleAnchor>,
#[serde(
rename = "titleBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_baseline: ::std::option::Option<LegendVariant3TitleBaseline>,
#[serde(
rename = "titleColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_color: ::std::option::Option<LegendVariant3TitleColor>,
#[serde(
rename = "titleFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font: ::std::option::Option<LegendVariant3TitleFont>,
#[serde(
rename = "titleFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_size: ::std::option::Option<LegendVariant3TitleFontSize>,
#[serde(
rename = "titleFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_style: ::std::option::Option<LegendVariant3TitleFontStyle>,
#[serde(
rename = "titleFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_weight: ::std::option::Option<LegendVariant3TitleFontWeight>,
#[serde(
rename = "titleLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_limit: ::std::option::Option<LegendVariant3TitleLimit>,
#[serde(
rename = "titleLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_line_height: ::std::option::Option<LegendVariant3TitleLineHeight>,
#[serde(
rename = "titleOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_opacity: ::std::option::Option<LegendVariant3TitleOpacity>,
#[serde(
rename = "titleOrient",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_orient: ::std::option::Option<LegendVariant3TitleOrient>,
#[serde(
rename = "titlePadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_padding: ::std::option::Option<LegendVariant3TitlePadding>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
type_: ::std::option::Option<LegendVariant3Type>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
values: ::std::option::Option<ArrayOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zindex: ::std::option::Option<f64>,
},
Variant4 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
aria: ::std::option::Option<bool>,
#[serde(
rename = "clipHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
clip_height: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "columnPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
columns: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "cornerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
corner_radius: ::std::option::Option<LegendVariant4CornerRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
direction: ::std::option::Option<LegendVariant4Direction>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
encode: ::std::option::Option<LegendVariant4Encode>,
#[serde(
rename = "fillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
fill_color: ::std::option::Option<LegendVariant4FillColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
format: ::std::option::Option<LegendVariant4Format>,
#[serde(
rename = "formatType",
skip_serializing_if = "::std::option::Option::is_none"
)]
format_type: ::std::option::Option<LegendVariant4FormatType>,
#[serde(
rename = "gradientLength",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_length: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gradientOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_opacity: ::std::option::Option<LegendVariant4GradientOpacity>,
#[serde(
rename = "gradientStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_color: ::std::option::Option<LegendVariant4GradientStrokeColor>,
#[serde(
rename = "gradientStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_width: ::std::option::Option<LegendVariant4GradientStrokeWidth>,
#[serde(
rename = "gradientThickness",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_thickness: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gridAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
grid_align: ::std::option::Option<LegendVariant4GridAlign>,
#[serde(
rename = "labelAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_align: ::std::option::Option<LegendVariant4LabelAlign>,
#[serde(
rename = "labelBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_baseline: ::std::option::Option<LegendVariant4LabelBaseline>,
#[serde(
rename = "labelColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_color: ::std::option::Option<LegendVariant4LabelColor>,
#[serde(
rename = "labelFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font: ::std::option::Option<LegendVariant4LabelFont>,
#[serde(
rename = "labelFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_size: ::std::option::Option<LegendVariant4LabelFontSize>,
#[serde(
rename = "labelFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_style: ::std::option::Option<LegendVariant4LabelFontStyle>,
#[serde(
rename = "labelFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_weight: ::std::option::Option<LegendVariant4LabelFontWeight>,
#[serde(
rename = "labelLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_limit: ::std::option::Option<LegendVariant4LabelLimit>,
#[serde(
rename = "labelOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_offset: ::std::option::Option<LegendVariant4LabelOffset>,
#[serde(
rename = "labelOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_opacity: ::std::option::Option<LegendVariant4LabelOpacity>,
#[serde(
rename = "labelOverlap",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_overlap: ::std::option::Option<LabelOverlap>,
#[serde(
rename = "labelSeparation",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_separation: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "legendX",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_x: ::std::option::Option<LegendVariant4LegendX>,
#[serde(
rename = "legendY",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_y: ::std::option::Option<LegendVariant4LegendY>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<LegendVariant4Offset>,
opacity: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
orient: ::std::option::Option<LegendVariant4Orient>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<LegendVariant4Padding>,
#[serde(
rename = "rowPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_padding: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "strokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
stroke_color: ::std::option::Option<LegendVariant4StrokeColor>,
#[serde(
rename = "symbolDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash: ::std::option::Option<LegendVariant4SymbolDash>,
#[serde(
rename = "symbolDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash_offset: ::std::option::Option<LegendVariant4SymbolDashOffset>,
#[serde(
rename = "symbolFillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_fill_color: ::std::option::Option<LegendVariant4SymbolFillColor>,
#[serde(
rename = "symbolLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_limit: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "symbolOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_offset: ::std::option::Option<LegendVariant4SymbolOffset>,
#[serde(
rename = "symbolOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_opacity: ::std::option::Option<LegendVariant4SymbolOpacity>,
#[serde(
rename = "symbolSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_size: ::std::option::Option<LegendVariant4SymbolSize>,
#[serde(
rename = "symbolStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_color: ::std::option::Option<LegendVariant4SymbolStrokeColor>,
#[serde(
rename = "symbolStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_width: ::std::option::Option<LegendVariant4SymbolStrokeWidth>,
#[serde(
rename = "symbolType",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_type: ::std::option::Option<LegendVariant4SymbolType>,
#[serde(
rename = "tickCount",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_count: ::std::option::Option<TickCount>,
#[serde(
rename = "tickMinStep",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_min_step: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
title: ::std::option::Option<TextOrSignal>,
#[serde(
rename = "titleAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_align: ::std::option::Option<LegendVariant4TitleAlign>,
#[serde(
rename = "titleAnchor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_anchor: ::std::option::Option<LegendVariant4TitleAnchor>,
#[serde(
rename = "titleBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_baseline: ::std::option::Option<LegendVariant4TitleBaseline>,
#[serde(
rename = "titleColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_color: ::std::option::Option<LegendVariant4TitleColor>,
#[serde(
rename = "titleFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font: ::std::option::Option<LegendVariant4TitleFont>,
#[serde(
rename = "titleFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_size: ::std::option::Option<LegendVariant4TitleFontSize>,
#[serde(
rename = "titleFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_style: ::std::option::Option<LegendVariant4TitleFontStyle>,
#[serde(
rename = "titleFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_weight: ::std::option::Option<LegendVariant4TitleFontWeight>,
#[serde(
rename = "titleLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_limit: ::std::option::Option<LegendVariant4TitleLimit>,
#[serde(
rename = "titleLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_line_height: ::std::option::Option<LegendVariant4TitleLineHeight>,
#[serde(
rename = "titleOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_opacity: ::std::option::Option<LegendVariant4TitleOpacity>,
#[serde(
rename = "titleOrient",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_orient: ::std::option::Option<LegendVariant4TitleOrient>,
#[serde(
rename = "titlePadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_padding: ::std::option::Option<LegendVariant4TitlePadding>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
type_: ::std::option::Option<LegendVariant4Type>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
values: ::std::option::Option<ArrayOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zindex: ::std::option::Option<f64>,
},
Variant5 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
aria: ::std::option::Option<bool>,
#[serde(
rename = "clipHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
clip_height: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "columnPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
columns: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "cornerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
corner_radius: ::std::option::Option<LegendVariant5CornerRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
direction: ::std::option::Option<LegendVariant5Direction>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
encode: ::std::option::Option<LegendVariant5Encode>,
#[serde(
rename = "fillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
fill_color: ::std::option::Option<LegendVariant5FillColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
format: ::std::option::Option<LegendVariant5Format>,
#[serde(
rename = "formatType",
skip_serializing_if = "::std::option::Option::is_none"
)]
format_type: ::std::option::Option<LegendVariant5FormatType>,
#[serde(
rename = "gradientLength",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_length: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gradientOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_opacity: ::std::option::Option<LegendVariant5GradientOpacity>,
#[serde(
rename = "gradientStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_color: ::std::option::Option<LegendVariant5GradientStrokeColor>,
#[serde(
rename = "gradientStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_width: ::std::option::Option<LegendVariant5GradientStrokeWidth>,
#[serde(
rename = "gradientThickness",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_thickness: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gridAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
grid_align: ::std::option::Option<LegendVariant5GridAlign>,
#[serde(
rename = "labelAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_align: ::std::option::Option<LegendVariant5LabelAlign>,
#[serde(
rename = "labelBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_baseline: ::std::option::Option<LegendVariant5LabelBaseline>,
#[serde(
rename = "labelColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_color: ::std::option::Option<LegendVariant5LabelColor>,
#[serde(
rename = "labelFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font: ::std::option::Option<LegendVariant5LabelFont>,
#[serde(
rename = "labelFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_size: ::std::option::Option<LegendVariant5LabelFontSize>,
#[serde(
rename = "labelFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_style: ::std::option::Option<LegendVariant5LabelFontStyle>,
#[serde(
rename = "labelFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_weight: ::std::option::Option<LegendVariant5LabelFontWeight>,
#[serde(
rename = "labelLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_limit: ::std::option::Option<LegendVariant5LabelLimit>,
#[serde(
rename = "labelOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_offset: ::std::option::Option<LegendVariant5LabelOffset>,
#[serde(
rename = "labelOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_opacity: ::std::option::Option<LegendVariant5LabelOpacity>,
#[serde(
rename = "labelOverlap",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_overlap: ::std::option::Option<LabelOverlap>,
#[serde(
rename = "labelSeparation",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_separation: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "legendX",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_x: ::std::option::Option<LegendVariant5LegendX>,
#[serde(
rename = "legendY",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_y: ::std::option::Option<LegendVariant5LegendY>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<LegendVariant5Offset>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
orient: ::std::option::Option<LegendVariant5Orient>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<LegendVariant5Padding>,
#[serde(
rename = "rowPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_padding: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "strokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
stroke_color: ::std::option::Option<LegendVariant5StrokeColor>,
#[serde(rename = "strokeDash")]
stroke_dash: ::std::string::String,
#[serde(
rename = "symbolDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash: ::std::option::Option<LegendVariant5SymbolDash>,
#[serde(
rename = "symbolDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash_offset: ::std::option::Option<LegendVariant5SymbolDashOffset>,
#[serde(
rename = "symbolFillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_fill_color: ::std::option::Option<LegendVariant5SymbolFillColor>,
#[serde(
rename = "symbolLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_limit: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "symbolOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_offset: ::std::option::Option<LegendVariant5SymbolOffset>,
#[serde(
rename = "symbolOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_opacity: ::std::option::Option<LegendVariant5SymbolOpacity>,
#[serde(
rename = "symbolSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_size: ::std::option::Option<LegendVariant5SymbolSize>,
#[serde(
rename = "symbolStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_color: ::std::option::Option<LegendVariant5SymbolStrokeColor>,
#[serde(
rename = "symbolStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_width: ::std::option::Option<LegendVariant5SymbolStrokeWidth>,
#[serde(
rename = "symbolType",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_type: ::std::option::Option<LegendVariant5SymbolType>,
#[serde(
rename = "tickCount",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_count: ::std::option::Option<TickCount>,
#[serde(
rename = "tickMinStep",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_min_step: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
title: ::std::option::Option<TextOrSignal>,
#[serde(
rename = "titleAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_align: ::std::option::Option<LegendVariant5TitleAlign>,
#[serde(
rename = "titleAnchor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_anchor: ::std::option::Option<LegendVariant5TitleAnchor>,
#[serde(
rename = "titleBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_baseline: ::std::option::Option<LegendVariant5TitleBaseline>,
#[serde(
rename = "titleColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_color: ::std::option::Option<LegendVariant5TitleColor>,
#[serde(
rename = "titleFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font: ::std::option::Option<LegendVariant5TitleFont>,
#[serde(
rename = "titleFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_size: ::std::option::Option<LegendVariant5TitleFontSize>,
#[serde(
rename = "titleFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_style: ::std::option::Option<LegendVariant5TitleFontStyle>,
#[serde(
rename = "titleFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_weight: ::std::option::Option<LegendVariant5TitleFontWeight>,
#[serde(
rename = "titleLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_limit: ::std::option::Option<LegendVariant5TitleLimit>,
#[serde(
rename = "titleLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_line_height: ::std::option::Option<LegendVariant5TitleLineHeight>,
#[serde(
rename = "titleOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_opacity: ::std::option::Option<LegendVariant5TitleOpacity>,
#[serde(
rename = "titleOrient",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_orient: ::std::option::Option<LegendVariant5TitleOrient>,
#[serde(
rename = "titlePadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_padding: ::std::option::Option<LegendVariant5TitlePadding>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
type_: ::std::option::Option<LegendVariant5Type>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
values: ::std::option::Option<ArrayOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zindex: ::std::option::Option<f64>,
},
Variant6 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
aria: ::std::option::Option<bool>,
#[serde(
rename = "clipHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
clip_height: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "columnPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
column_padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
columns: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "cornerRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
corner_radius: ::std::option::Option<LegendVariant6CornerRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
direction: ::std::option::Option<LegendVariant6Direction>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
encode: ::std::option::Option<LegendVariant6Encode>,
#[serde(
rename = "fillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
fill_color: ::std::option::Option<LegendVariant6FillColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
format: ::std::option::Option<LegendVariant6Format>,
#[serde(
rename = "formatType",
skip_serializing_if = "::std::option::Option::is_none"
)]
format_type: ::std::option::Option<LegendVariant6FormatType>,
#[serde(
rename = "gradientLength",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_length: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gradientOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_opacity: ::std::option::Option<LegendVariant6GradientOpacity>,
#[serde(
rename = "gradientStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_color: ::std::option::Option<LegendVariant6GradientStrokeColor>,
#[serde(
rename = "gradientStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_stroke_width: ::std::option::Option<LegendVariant6GradientStrokeWidth>,
#[serde(
rename = "gradientThickness",
skip_serializing_if = "::std::option::Option::is_none"
)]
gradient_thickness: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "gridAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
grid_align: ::std::option::Option<LegendVariant6GridAlign>,
#[serde(
rename = "labelAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_align: ::std::option::Option<LegendVariant6LabelAlign>,
#[serde(
rename = "labelBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_baseline: ::std::option::Option<LegendVariant6LabelBaseline>,
#[serde(
rename = "labelColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_color: ::std::option::Option<LegendVariant6LabelColor>,
#[serde(
rename = "labelFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font: ::std::option::Option<LegendVariant6LabelFont>,
#[serde(
rename = "labelFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_size: ::std::option::Option<LegendVariant6LabelFontSize>,
#[serde(
rename = "labelFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_style: ::std::option::Option<LegendVariant6LabelFontStyle>,
#[serde(
rename = "labelFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_font_weight: ::std::option::Option<LegendVariant6LabelFontWeight>,
#[serde(
rename = "labelLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_limit: ::std::option::Option<LegendVariant6LabelLimit>,
#[serde(
rename = "labelOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_offset: ::std::option::Option<LegendVariant6LabelOffset>,
#[serde(
rename = "labelOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_opacity: ::std::option::Option<LegendVariant6LabelOpacity>,
#[serde(
rename = "labelOverlap",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_overlap: ::std::option::Option<LabelOverlap>,
#[serde(
rename = "labelSeparation",
skip_serializing_if = "::std::option::Option::is_none"
)]
label_separation: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "legendX",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_x: ::std::option::Option<LegendVariant6LegendX>,
#[serde(
rename = "legendY",
skip_serializing_if = "::std::option::Option::is_none"
)]
legend_y: ::std::option::Option<LegendVariant6LegendY>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<LegendVariant6Offset>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
orient: ::std::option::Option<LegendVariant6Orient>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<LegendVariant6Padding>,
#[serde(
rename = "rowPadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
row_padding: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "strokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
stroke_color: ::std::option::Option<LegendVariant6StrokeColor>,
#[serde(rename = "strokeWidth")]
stroke_width: ::std::string::String,
#[serde(
rename = "symbolDash",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash: ::std::option::Option<LegendVariant6SymbolDash>,
#[serde(
rename = "symbolDashOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_dash_offset: ::std::option::Option<LegendVariant6SymbolDashOffset>,
#[serde(
rename = "symbolFillColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_fill_color: ::std::option::Option<LegendVariant6SymbolFillColor>,
#[serde(
rename = "symbolLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_limit: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "symbolOffset",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_offset: ::std::option::Option<LegendVariant6SymbolOffset>,
#[serde(
rename = "symbolOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_opacity: ::std::option::Option<LegendVariant6SymbolOpacity>,
#[serde(
rename = "symbolSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_size: ::std::option::Option<LegendVariant6SymbolSize>,
#[serde(
rename = "symbolStrokeColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_color: ::std::option::Option<LegendVariant6SymbolStrokeColor>,
#[serde(
rename = "symbolStrokeWidth",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_stroke_width: ::std::option::Option<LegendVariant6SymbolStrokeWidth>,
#[serde(
rename = "symbolType",
skip_serializing_if = "::std::option::Option::is_none"
)]
symbol_type: ::std::option::Option<LegendVariant6SymbolType>,
#[serde(
rename = "tickCount",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_count: ::std::option::Option<TickCount>,
#[serde(
rename = "tickMinStep",
skip_serializing_if = "::std::option::Option::is_none"
)]
tick_min_step: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
title: ::std::option::Option<TextOrSignal>,
#[serde(
rename = "titleAlign",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_align: ::std::option::Option<LegendVariant6TitleAlign>,
#[serde(
rename = "titleAnchor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_anchor: ::std::option::Option<LegendVariant6TitleAnchor>,
#[serde(
rename = "titleBaseline",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_baseline: ::std::option::Option<LegendVariant6TitleBaseline>,
#[serde(
rename = "titleColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_color: ::std::option::Option<LegendVariant6TitleColor>,
#[serde(
rename = "titleFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font: ::std::option::Option<LegendVariant6TitleFont>,
#[serde(
rename = "titleFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_size: ::std::option::Option<LegendVariant6TitleFontSize>,
#[serde(
rename = "titleFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_style: ::std::option::Option<LegendVariant6TitleFontStyle>,
#[serde(
rename = "titleFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_font_weight: ::std::option::Option<LegendVariant6TitleFontWeight>,
#[serde(
rename = "titleLimit",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_limit: ::std::option::Option<LegendVariant6TitleLimit>,
#[serde(
rename = "titleLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_line_height: ::std::option::Option<LegendVariant6TitleLineHeight>,
#[serde(
rename = "titleOpacity",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_opacity: ::std::option::Option<LegendVariant6TitleOpacity>,
#[serde(
rename = "titleOrient",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_orient: ::std::option::Option<LegendVariant6TitleOrient>,
#[serde(
rename = "titlePadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
title_padding: ::std::option::Option<LegendVariant6TitlePadding>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
type_: ::std::option::Option<LegendVariant6Type>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
values: ::std::option::Option<ArrayOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zindex: ::std::option::Option<f64>,
},
}
#[doc = "`LegendVariant0CornerRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0CornerRadius {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0CornerRadius {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0CornerRadius {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0Direction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0Direction {
#[serde(rename = "vertical")]
Vertical,
#[serde(rename = "horizontal")]
Horizontal,
}
impl ::std::fmt::Display for LegendVariant0Direction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Vertical => f.write_str("vertical"),
Self::Horizontal => f.write_str("horizontal"),
}
}
}
impl ::std::str::FromStr for LegendVariant0Direction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"vertical" => Ok(Self::Vertical),
"horizontal" => Ok(Self::Horizontal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0Direction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0Direction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0Encode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct LegendVariant0Encode {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub entries: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub gradient: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub labels: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub legend: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub symbols: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<GuideEncode>,
}
#[doc = "`LegendVariant0FillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0FillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant0FillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant0Format`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LegendVariant0Format {
String(::std::string::String),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
date: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
day: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
hours: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
milliseconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
minutes: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
month: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
quarter: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
seconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
week: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
year: ::std::option::Option<::std::string::String>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LegendVariant0Format {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LegendVariant0FormatType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0FormatType {
Variant0(LegendVariant0FormatTypeVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant0FormatTypeVariant0> for LegendVariant0FormatType {
fn from(value: LegendVariant0FormatTypeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant0FormatType {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0FormatTypeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0FormatTypeVariant0 {
#[serde(rename = "number")]
Number,
#[serde(rename = "time")]
Time,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for LegendVariant0FormatTypeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Number => f.write_str("number"),
Self::Time => f.write_str("time"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for LegendVariant0FormatTypeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"number" => Ok(Self::Number),
"time" => Ok(Self::Time),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0GradientOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0GradientOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0GradientOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0GradientOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0GradientStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0GradientStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant0GradientStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant0GradientStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0GradientStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0GradientStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0GradientStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0GridAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0GridAlign {
Variant0(LegendVariant0GridAlignVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant0GridAlignVariant0> for LegendVariant0GridAlign {
fn from(value: LegendVariant0GridAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant0GridAlign {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0GridAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0GridAlignVariant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LegendVariant0GridAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LegendVariant0GridAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0LabelAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelAlign {
Variant0(LegendVariant0LabelAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant0LabelAlignVariant0> for LegendVariant0LabelAlign {
fn from(value: LegendVariant0LabelAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant0LabelAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LabelAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0LabelAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant0LabelAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant0LabelAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0LabelBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelBaseline {
Variant0(LegendVariant0LabelBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant0LabelBaselineVariant0> for LegendVariant0LabelBaseline {
fn from(value: LegendVariant0LabelBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant0LabelBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LabelBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0LabelBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant0LabelBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant0LabelBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0LabelColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant0LabelColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant0LabelFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant0LabelFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LabelFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0LabelFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0LabelFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LabelFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant0LabelFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LabelFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant0LabelFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant0LabelFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LabelLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0LabelLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0LabelLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LabelOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0LabelOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0LabelOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LabelOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LabelOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0LabelOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0LabelOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LegendX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LegendX {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0LegendX {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0LegendX {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0LegendY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0LegendY {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0LegendY {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0LegendY {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0Orient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0Orient {
Variant0(LegendVariant0OrientVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant0OrientVariant0> for LegendVariant0Orient {
fn from(value: LegendVariant0OrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant0Orient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0OrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0OrientVariant0 {
#[serde(rename = "none")]
None,
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "top-left")]
TopLeft,
#[serde(rename = "top-right")]
TopRight,
#[serde(rename = "bottom-left")]
BottomLeft,
#[serde(rename = "bottom-right")]
BottomRight,
}
impl ::std::fmt::Display for LegendVariant0OrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
Self::TopLeft => f.write_str("top-left"),
Self::TopRight => f.write_str("top-right"),
Self::BottomLeft => f.write_str("bottom-left"),
Self::BottomRight => f.write_str("bottom-right"),
}
}
}
impl ::std::str::FromStr for LegendVariant0OrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
"top-left" => Ok(Self::TopLeft),
"top-right" => Ok(Self::TopRight),
"bottom-left" => Ok(Self::BottomLeft),
"bottom-right" => Ok(Self::BottomRight),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0Padding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0Padding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0Padding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0Padding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0StrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0StrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant0StrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant0SymbolDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0SymbolDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for LegendVariant0SymbolDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for LegendVariant0SymbolDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0SymbolDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0SymbolDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0SymbolDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0SymbolDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0SymbolFillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0SymbolFillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant0SymbolFillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant0SymbolOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0SymbolOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0SymbolOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0SymbolOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0SymbolOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0SymbolOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0SymbolOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0SymbolOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0SymbolSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0SymbolSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0SymbolSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0SymbolSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0SymbolStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0SymbolStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant0SymbolStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant0SymbolStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0SymbolStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0SymbolStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0SymbolStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0SymbolType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0SymbolType {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant0SymbolType {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleAlign {
Variant0(LegendVariant0TitleAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant0TitleAlignVariant0> for LegendVariant0TitleAlign {
fn from(value: LegendVariant0TitleAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant0TitleAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0TitleAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant0TitleAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant0TitleAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0TitleAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleAnchor {
Variant0(::std::option::Option<LegendVariant0TitleAnchorVariant0>),
Variant1(AnchorValue),
}
impl ::std::convert::From<::std::option::Option<LegendVariant0TitleAnchorVariant0>>
for LegendVariant0TitleAnchor
{
fn from(value: ::std::option::Option<LegendVariant0TitleAnchorVariant0>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValue> for LegendVariant0TitleAnchor {
fn from(value: AnchorValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleAnchorVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0TitleAnchorVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LegendVariant0TitleAnchorVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LegendVariant0TitleAnchorVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0TitleBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleBaseline {
Variant0(LegendVariant0TitleBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant0TitleBaselineVariant0> for LegendVariant0TitleBaseline {
fn from(value: LegendVariant0TitleBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant0TitleBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0TitleBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant0TitleBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant0TitleBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0TitleColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant0TitleColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant0TitleFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant0TitleFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0TitleFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0TitleFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant0TitleFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant0TitleFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant0TitleFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0TitleLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0TitleLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0TitleLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0TitleLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0TitleOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0TitleOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitleOrient {
Variant0(LegendVariant0TitleOrientVariant0),
Variant1(OrientValue),
}
impl ::std::convert::From<LegendVariant0TitleOrientVariant0> for LegendVariant0TitleOrient {
fn from(value: LegendVariant0TitleOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValue> for LegendVariant0TitleOrient {
fn from(value: OrientValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0TitleOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0TitleOrientVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for LegendVariant0TitleOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant0TitleOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant0TitlePadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant0TitlePadding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant0TitlePadding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant0TitlePadding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant0Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant0Type {
#[serde(rename = "gradient")]
Gradient,
#[serde(rename = "symbol")]
Symbol,
}
impl ::std::fmt::Display for LegendVariant0Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Gradient => f.write_str("gradient"),
Self::Symbol => f.write_str("symbol"),
}
}
}
impl ::std::str::FromStr for LegendVariant0Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"gradient" => Ok(Self::Gradient),
"symbol" => Ok(Self::Symbol),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant0Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant0Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1CornerRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1CornerRadius {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1CornerRadius {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1CornerRadius {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1Direction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1Direction {
#[serde(rename = "vertical")]
Vertical,
#[serde(rename = "horizontal")]
Horizontal,
}
impl ::std::fmt::Display for LegendVariant1Direction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Vertical => f.write_str("vertical"),
Self::Horizontal => f.write_str("horizontal"),
}
}
}
impl ::std::str::FromStr for LegendVariant1Direction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"vertical" => Ok(Self::Vertical),
"horizontal" => Ok(Self::Horizontal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1Direction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1Direction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1Encode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct LegendVariant1Encode {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub entries: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub gradient: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub labels: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub legend: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub symbols: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<GuideEncode>,
}
#[doc = "`LegendVariant1FillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1FillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant1FillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant1Format`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LegendVariant1Format {
String(::std::string::String),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
date: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
day: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
hours: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
milliseconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
minutes: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
month: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
quarter: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
seconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
week: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
year: ::std::option::Option<::std::string::String>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LegendVariant1Format {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LegendVariant1FormatType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1FormatType {
Variant0(LegendVariant1FormatTypeVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant1FormatTypeVariant0> for LegendVariant1FormatType {
fn from(value: LegendVariant1FormatTypeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant1FormatType {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1FormatTypeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1FormatTypeVariant0 {
#[serde(rename = "number")]
Number,
#[serde(rename = "time")]
Time,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for LegendVariant1FormatTypeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Number => f.write_str("number"),
Self::Time => f.write_str("time"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for LegendVariant1FormatTypeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"number" => Ok(Self::Number),
"time" => Ok(Self::Time),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1GradientOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1GradientOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1GradientOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1GradientOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1GradientStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1GradientStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant1GradientStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant1GradientStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1GradientStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1GradientStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1GradientStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1GridAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1GridAlign {
Variant0(LegendVariant1GridAlignVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant1GridAlignVariant0> for LegendVariant1GridAlign {
fn from(value: LegendVariant1GridAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant1GridAlign {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1GridAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1GridAlignVariant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LegendVariant1GridAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LegendVariant1GridAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1LabelAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelAlign {
Variant0(LegendVariant1LabelAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant1LabelAlignVariant0> for LegendVariant1LabelAlign {
fn from(value: LegendVariant1LabelAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant1LabelAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LabelAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1LabelAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant1LabelAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant1LabelAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1LabelBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelBaseline {
Variant0(LegendVariant1LabelBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant1LabelBaselineVariant0> for LegendVariant1LabelBaseline {
fn from(value: LegendVariant1LabelBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant1LabelBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LabelBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1LabelBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant1LabelBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant1LabelBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1LabelColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant1LabelColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant1LabelFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant1LabelFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LabelFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1LabelFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1LabelFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LabelFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant1LabelFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LabelFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant1LabelFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant1LabelFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LabelLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1LabelLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1LabelLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LabelOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1LabelOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1LabelOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LabelOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LabelOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1LabelOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1LabelOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LegendX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LegendX {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1LegendX {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1LegendX {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1LegendY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1LegendY {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1LegendY {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1LegendY {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1Orient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1Orient {
Variant0(LegendVariant1OrientVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant1OrientVariant0> for LegendVariant1Orient {
fn from(value: LegendVariant1OrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant1Orient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1OrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1OrientVariant0 {
#[serde(rename = "none")]
None,
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "top-left")]
TopLeft,
#[serde(rename = "top-right")]
TopRight,
#[serde(rename = "bottom-left")]
BottomLeft,
#[serde(rename = "bottom-right")]
BottomRight,
}
impl ::std::fmt::Display for LegendVariant1OrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
Self::TopLeft => f.write_str("top-left"),
Self::TopRight => f.write_str("top-right"),
Self::BottomLeft => f.write_str("bottom-left"),
Self::BottomRight => f.write_str("bottom-right"),
}
}
}
impl ::std::str::FromStr for LegendVariant1OrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
"top-left" => Ok(Self::TopLeft),
"top-right" => Ok(Self::TopRight),
"bottom-left" => Ok(Self::BottomLeft),
"bottom-right" => Ok(Self::BottomRight),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1Padding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1Padding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1Padding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1Padding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1StrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1StrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant1StrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant1SymbolDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1SymbolDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for LegendVariant1SymbolDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for LegendVariant1SymbolDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1SymbolDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1SymbolDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1SymbolDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1SymbolDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1SymbolFillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1SymbolFillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant1SymbolFillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant1SymbolOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1SymbolOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1SymbolOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1SymbolOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1SymbolOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1SymbolOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1SymbolOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1SymbolOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1SymbolSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1SymbolSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1SymbolSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1SymbolSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1SymbolStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1SymbolStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant1SymbolStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant1SymbolStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1SymbolStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1SymbolStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1SymbolStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1SymbolType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1SymbolType {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant1SymbolType {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleAlign {
Variant0(LegendVariant1TitleAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant1TitleAlignVariant0> for LegendVariant1TitleAlign {
fn from(value: LegendVariant1TitleAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant1TitleAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1TitleAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant1TitleAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant1TitleAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1TitleAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleAnchor {
Variant0(::std::option::Option<LegendVariant1TitleAnchorVariant0>),
Variant1(AnchorValue),
}
impl ::std::convert::From<::std::option::Option<LegendVariant1TitleAnchorVariant0>>
for LegendVariant1TitleAnchor
{
fn from(value: ::std::option::Option<LegendVariant1TitleAnchorVariant0>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValue> for LegendVariant1TitleAnchor {
fn from(value: AnchorValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleAnchorVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1TitleAnchorVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LegendVariant1TitleAnchorVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LegendVariant1TitleAnchorVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1TitleBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleBaseline {
Variant0(LegendVariant1TitleBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant1TitleBaselineVariant0> for LegendVariant1TitleBaseline {
fn from(value: LegendVariant1TitleBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant1TitleBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1TitleBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant1TitleBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant1TitleBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1TitleColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant1TitleColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant1TitleFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant1TitleFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1TitleFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1TitleFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant1TitleFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant1TitleFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant1TitleFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1TitleLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1TitleLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1TitleLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1TitleLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1TitleOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1TitleOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitleOrient {
Variant0(LegendVariant1TitleOrientVariant0),
Variant1(OrientValue),
}
impl ::std::convert::From<LegendVariant1TitleOrientVariant0> for LegendVariant1TitleOrient {
fn from(value: LegendVariant1TitleOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValue> for LegendVariant1TitleOrient {
fn from(value: OrientValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1TitleOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1TitleOrientVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for LegendVariant1TitleOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant1TitleOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant1TitlePadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant1TitlePadding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant1TitlePadding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant1TitlePadding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant1Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant1Type {
#[serde(rename = "gradient")]
Gradient,
#[serde(rename = "symbol")]
Symbol,
}
impl ::std::fmt::Display for LegendVariant1Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Gradient => f.write_str("gradient"),
Self::Symbol => f.write_str("symbol"),
}
}
}
impl ::std::str::FromStr for LegendVariant1Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"gradient" => Ok(Self::Gradient),
"symbol" => Ok(Self::Symbol),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant1Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant1Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2CornerRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2CornerRadius {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2CornerRadius {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2CornerRadius {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2Direction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2Direction {
#[serde(rename = "vertical")]
Vertical,
#[serde(rename = "horizontal")]
Horizontal,
}
impl ::std::fmt::Display for LegendVariant2Direction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Vertical => f.write_str("vertical"),
Self::Horizontal => f.write_str("horizontal"),
}
}
}
impl ::std::str::FromStr for LegendVariant2Direction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"vertical" => Ok(Self::Vertical),
"horizontal" => Ok(Self::Horizontal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2Direction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2Direction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2Encode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct LegendVariant2Encode {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub entries: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub gradient: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub labels: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub legend: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub symbols: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<GuideEncode>,
}
#[doc = "`LegendVariant2FillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2FillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant2FillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant2Format`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LegendVariant2Format {
String(::std::string::String),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
date: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
day: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
hours: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
milliseconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
minutes: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
month: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
quarter: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
seconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
week: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
year: ::std::option::Option<::std::string::String>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LegendVariant2Format {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LegendVariant2FormatType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2FormatType {
Variant0(LegendVariant2FormatTypeVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant2FormatTypeVariant0> for LegendVariant2FormatType {
fn from(value: LegendVariant2FormatTypeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant2FormatType {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2FormatTypeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2FormatTypeVariant0 {
#[serde(rename = "number")]
Number,
#[serde(rename = "time")]
Time,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for LegendVariant2FormatTypeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Number => f.write_str("number"),
Self::Time => f.write_str("time"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for LegendVariant2FormatTypeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"number" => Ok(Self::Number),
"time" => Ok(Self::Time),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2GradientOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2GradientOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2GradientOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2GradientOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2GradientStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2GradientStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant2GradientStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant2GradientStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2GradientStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2GradientStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2GradientStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2GridAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2GridAlign {
Variant0(LegendVariant2GridAlignVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant2GridAlignVariant0> for LegendVariant2GridAlign {
fn from(value: LegendVariant2GridAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant2GridAlign {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2GridAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2GridAlignVariant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LegendVariant2GridAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LegendVariant2GridAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2LabelAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelAlign {
Variant0(LegendVariant2LabelAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant2LabelAlignVariant0> for LegendVariant2LabelAlign {
fn from(value: LegendVariant2LabelAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant2LabelAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LabelAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2LabelAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant2LabelAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant2LabelAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2LabelBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelBaseline {
Variant0(LegendVariant2LabelBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant2LabelBaselineVariant0> for LegendVariant2LabelBaseline {
fn from(value: LegendVariant2LabelBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant2LabelBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LabelBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2LabelBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant2LabelBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant2LabelBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2LabelColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant2LabelColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant2LabelFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant2LabelFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LabelFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2LabelFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2LabelFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LabelFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant2LabelFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LabelFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant2LabelFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant2LabelFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LabelLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2LabelLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2LabelLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LabelOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2LabelOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2LabelOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LabelOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LabelOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2LabelOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2LabelOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LegendX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LegendX {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2LegendX {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2LegendX {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2LegendY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2LegendY {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2LegendY {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2LegendY {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2Orient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2Orient {
Variant0(LegendVariant2OrientVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant2OrientVariant0> for LegendVariant2Orient {
fn from(value: LegendVariant2OrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant2Orient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2OrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2OrientVariant0 {
#[serde(rename = "none")]
None,
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "top-left")]
TopLeft,
#[serde(rename = "top-right")]
TopRight,
#[serde(rename = "bottom-left")]
BottomLeft,
#[serde(rename = "bottom-right")]
BottomRight,
}
impl ::std::fmt::Display for LegendVariant2OrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
Self::TopLeft => f.write_str("top-left"),
Self::TopRight => f.write_str("top-right"),
Self::BottomLeft => f.write_str("bottom-left"),
Self::BottomRight => f.write_str("bottom-right"),
}
}
}
impl ::std::str::FromStr for LegendVariant2OrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
"top-left" => Ok(Self::TopLeft),
"top-right" => Ok(Self::TopRight),
"bottom-left" => Ok(Self::BottomLeft),
"bottom-right" => Ok(Self::BottomRight),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2Padding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2Padding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2Padding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2Padding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2StrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2StrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant2StrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant2SymbolDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2SymbolDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for LegendVariant2SymbolDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for LegendVariant2SymbolDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2SymbolDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2SymbolDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2SymbolDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2SymbolDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2SymbolFillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2SymbolFillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant2SymbolFillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant2SymbolOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2SymbolOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2SymbolOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2SymbolOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2SymbolOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2SymbolOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2SymbolOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2SymbolOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2SymbolSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2SymbolSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2SymbolSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2SymbolSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2SymbolStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2SymbolStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant2SymbolStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant2SymbolStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2SymbolStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2SymbolStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2SymbolStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2SymbolType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2SymbolType {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant2SymbolType {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleAlign {
Variant0(LegendVariant2TitleAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant2TitleAlignVariant0> for LegendVariant2TitleAlign {
fn from(value: LegendVariant2TitleAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant2TitleAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2TitleAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant2TitleAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant2TitleAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2TitleAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleAnchor {
Variant0(::std::option::Option<LegendVariant2TitleAnchorVariant0>),
Variant1(AnchorValue),
}
impl ::std::convert::From<::std::option::Option<LegendVariant2TitleAnchorVariant0>>
for LegendVariant2TitleAnchor
{
fn from(value: ::std::option::Option<LegendVariant2TitleAnchorVariant0>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValue> for LegendVariant2TitleAnchor {
fn from(value: AnchorValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleAnchorVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2TitleAnchorVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LegendVariant2TitleAnchorVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LegendVariant2TitleAnchorVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2TitleBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleBaseline {
Variant0(LegendVariant2TitleBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant2TitleBaselineVariant0> for LegendVariant2TitleBaseline {
fn from(value: LegendVariant2TitleBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant2TitleBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2TitleBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant2TitleBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant2TitleBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2TitleColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant2TitleColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant2TitleFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant2TitleFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2TitleFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2TitleFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant2TitleFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant2TitleFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant2TitleFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2TitleLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2TitleLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2TitleLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2TitleLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2TitleOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2TitleOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitleOrient {
Variant0(LegendVariant2TitleOrientVariant0),
Variant1(OrientValue),
}
impl ::std::convert::From<LegendVariant2TitleOrientVariant0> for LegendVariant2TitleOrient {
fn from(value: LegendVariant2TitleOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValue> for LegendVariant2TitleOrient {
fn from(value: OrientValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2TitleOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2TitleOrientVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for LegendVariant2TitleOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant2TitleOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant2TitlePadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant2TitlePadding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant2TitlePadding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant2TitlePadding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant2Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant2Type {
#[serde(rename = "gradient")]
Gradient,
#[serde(rename = "symbol")]
Symbol,
}
impl ::std::fmt::Display for LegendVariant2Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Gradient => f.write_str("gradient"),
Self::Symbol => f.write_str("symbol"),
}
}
}
impl ::std::str::FromStr for LegendVariant2Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"gradient" => Ok(Self::Gradient),
"symbol" => Ok(Self::Symbol),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant2Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant2Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3CornerRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3CornerRadius {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3CornerRadius {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3CornerRadius {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3Direction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3Direction {
#[serde(rename = "vertical")]
Vertical,
#[serde(rename = "horizontal")]
Horizontal,
}
impl ::std::fmt::Display for LegendVariant3Direction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Vertical => f.write_str("vertical"),
Self::Horizontal => f.write_str("horizontal"),
}
}
}
impl ::std::str::FromStr for LegendVariant3Direction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"vertical" => Ok(Self::Vertical),
"horizontal" => Ok(Self::Horizontal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3Direction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3Direction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3Encode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct LegendVariant3Encode {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub entries: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub gradient: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub labels: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub legend: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub symbols: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<GuideEncode>,
}
#[doc = "`LegendVariant3FillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3FillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant3FillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant3Format`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LegendVariant3Format {
String(::std::string::String),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
date: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
day: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
hours: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
milliseconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
minutes: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
month: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
quarter: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
seconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
week: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
year: ::std::option::Option<::std::string::String>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LegendVariant3Format {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LegendVariant3FormatType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3FormatType {
Variant0(LegendVariant3FormatTypeVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant3FormatTypeVariant0> for LegendVariant3FormatType {
fn from(value: LegendVariant3FormatTypeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant3FormatType {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3FormatTypeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3FormatTypeVariant0 {
#[serde(rename = "number")]
Number,
#[serde(rename = "time")]
Time,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for LegendVariant3FormatTypeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Number => f.write_str("number"),
Self::Time => f.write_str("time"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for LegendVariant3FormatTypeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"number" => Ok(Self::Number),
"time" => Ok(Self::Time),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3GradientOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3GradientOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3GradientOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3GradientOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3GradientStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3GradientStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant3GradientStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant3GradientStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3GradientStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3GradientStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3GradientStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3GridAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3GridAlign {
Variant0(LegendVariant3GridAlignVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant3GridAlignVariant0> for LegendVariant3GridAlign {
fn from(value: LegendVariant3GridAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant3GridAlign {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3GridAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3GridAlignVariant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LegendVariant3GridAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LegendVariant3GridAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3LabelAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelAlign {
Variant0(LegendVariant3LabelAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant3LabelAlignVariant0> for LegendVariant3LabelAlign {
fn from(value: LegendVariant3LabelAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant3LabelAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LabelAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3LabelAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant3LabelAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant3LabelAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3LabelBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelBaseline {
Variant0(LegendVariant3LabelBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant3LabelBaselineVariant0> for LegendVariant3LabelBaseline {
fn from(value: LegendVariant3LabelBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant3LabelBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LabelBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3LabelBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant3LabelBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant3LabelBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3LabelColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant3LabelColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant3LabelFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant3LabelFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LabelFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3LabelFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3LabelFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LabelFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant3LabelFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LabelFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant3LabelFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant3LabelFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LabelLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3LabelLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3LabelLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LabelOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3LabelOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3LabelOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LabelOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LabelOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3LabelOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3LabelOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LegendX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LegendX {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3LegendX {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3LegendX {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3LegendY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3LegendY {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3LegendY {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3LegendY {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3Orient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3Orient {
Variant0(LegendVariant3OrientVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant3OrientVariant0> for LegendVariant3Orient {
fn from(value: LegendVariant3OrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant3Orient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3OrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3OrientVariant0 {
#[serde(rename = "none")]
None,
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "top-left")]
TopLeft,
#[serde(rename = "top-right")]
TopRight,
#[serde(rename = "bottom-left")]
BottomLeft,
#[serde(rename = "bottom-right")]
BottomRight,
}
impl ::std::fmt::Display for LegendVariant3OrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
Self::TopLeft => f.write_str("top-left"),
Self::TopRight => f.write_str("top-right"),
Self::BottomLeft => f.write_str("bottom-left"),
Self::BottomRight => f.write_str("bottom-right"),
}
}
}
impl ::std::str::FromStr for LegendVariant3OrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
"top-left" => Ok(Self::TopLeft),
"top-right" => Ok(Self::TopRight),
"bottom-left" => Ok(Self::BottomLeft),
"bottom-right" => Ok(Self::BottomRight),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3Padding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3Padding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3Padding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3Padding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3StrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3StrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant3StrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant3SymbolDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3SymbolDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for LegendVariant3SymbolDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for LegendVariant3SymbolDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3SymbolDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3SymbolDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3SymbolDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3SymbolDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3SymbolFillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3SymbolFillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant3SymbolFillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant3SymbolOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3SymbolOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3SymbolOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3SymbolOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3SymbolOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3SymbolOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3SymbolOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3SymbolOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3SymbolSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3SymbolSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3SymbolSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3SymbolSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3SymbolStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3SymbolStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant3SymbolStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant3SymbolStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3SymbolStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3SymbolStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3SymbolStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3SymbolType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3SymbolType {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant3SymbolType {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleAlign {
Variant0(LegendVariant3TitleAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant3TitleAlignVariant0> for LegendVariant3TitleAlign {
fn from(value: LegendVariant3TitleAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant3TitleAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3TitleAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant3TitleAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant3TitleAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3TitleAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleAnchor {
Variant0(::std::option::Option<LegendVariant3TitleAnchorVariant0>),
Variant1(AnchorValue),
}
impl ::std::convert::From<::std::option::Option<LegendVariant3TitleAnchorVariant0>>
for LegendVariant3TitleAnchor
{
fn from(value: ::std::option::Option<LegendVariant3TitleAnchorVariant0>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValue> for LegendVariant3TitleAnchor {
fn from(value: AnchorValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleAnchorVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3TitleAnchorVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LegendVariant3TitleAnchorVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LegendVariant3TitleAnchorVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3TitleBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleBaseline {
Variant0(LegendVariant3TitleBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant3TitleBaselineVariant0> for LegendVariant3TitleBaseline {
fn from(value: LegendVariant3TitleBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant3TitleBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3TitleBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant3TitleBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant3TitleBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3TitleColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant3TitleColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant3TitleFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant3TitleFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3TitleFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3TitleFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant3TitleFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant3TitleFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant3TitleFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3TitleLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3TitleLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3TitleLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3TitleLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3TitleOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3TitleOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitleOrient {
Variant0(LegendVariant3TitleOrientVariant0),
Variant1(OrientValue),
}
impl ::std::convert::From<LegendVariant3TitleOrientVariant0> for LegendVariant3TitleOrient {
fn from(value: LegendVariant3TitleOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValue> for LegendVariant3TitleOrient {
fn from(value: OrientValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3TitleOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3TitleOrientVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for LegendVariant3TitleOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant3TitleOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant3TitlePadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant3TitlePadding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant3TitlePadding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant3TitlePadding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant3Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant3Type {
#[serde(rename = "gradient")]
Gradient,
#[serde(rename = "symbol")]
Symbol,
}
impl ::std::fmt::Display for LegendVariant3Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Gradient => f.write_str("gradient"),
Self::Symbol => f.write_str("symbol"),
}
}
}
impl ::std::str::FromStr for LegendVariant3Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"gradient" => Ok(Self::Gradient),
"symbol" => Ok(Self::Symbol),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant3Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant3Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4CornerRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4CornerRadius {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4CornerRadius {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4CornerRadius {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4Direction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4Direction {
#[serde(rename = "vertical")]
Vertical,
#[serde(rename = "horizontal")]
Horizontal,
}
impl ::std::fmt::Display for LegendVariant4Direction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Vertical => f.write_str("vertical"),
Self::Horizontal => f.write_str("horizontal"),
}
}
}
impl ::std::str::FromStr for LegendVariant4Direction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"vertical" => Ok(Self::Vertical),
"horizontal" => Ok(Self::Horizontal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4Direction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4Direction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4Encode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct LegendVariant4Encode {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub entries: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub gradient: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub labels: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub legend: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub symbols: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<GuideEncode>,
}
#[doc = "`LegendVariant4FillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4FillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant4FillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant4Format`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LegendVariant4Format {
String(::std::string::String),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
date: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
day: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
hours: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
milliseconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
minutes: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
month: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
quarter: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
seconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
week: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
year: ::std::option::Option<::std::string::String>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LegendVariant4Format {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LegendVariant4FormatType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4FormatType {
Variant0(LegendVariant4FormatTypeVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant4FormatTypeVariant0> for LegendVariant4FormatType {
fn from(value: LegendVariant4FormatTypeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant4FormatType {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4FormatTypeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4FormatTypeVariant0 {
#[serde(rename = "number")]
Number,
#[serde(rename = "time")]
Time,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for LegendVariant4FormatTypeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Number => f.write_str("number"),
Self::Time => f.write_str("time"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for LegendVariant4FormatTypeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"number" => Ok(Self::Number),
"time" => Ok(Self::Time),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4GradientOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4GradientOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4GradientOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4GradientOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4GradientStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4GradientStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant4GradientStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant4GradientStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4GradientStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4GradientStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4GradientStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4GridAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4GridAlign {
Variant0(LegendVariant4GridAlignVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant4GridAlignVariant0> for LegendVariant4GridAlign {
fn from(value: LegendVariant4GridAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant4GridAlign {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4GridAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4GridAlignVariant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LegendVariant4GridAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LegendVariant4GridAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4LabelAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelAlign {
Variant0(LegendVariant4LabelAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant4LabelAlignVariant0> for LegendVariant4LabelAlign {
fn from(value: LegendVariant4LabelAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant4LabelAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LabelAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4LabelAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant4LabelAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant4LabelAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4LabelBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelBaseline {
Variant0(LegendVariant4LabelBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant4LabelBaselineVariant0> for LegendVariant4LabelBaseline {
fn from(value: LegendVariant4LabelBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant4LabelBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LabelBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4LabelBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant4LabelBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant4LabelBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4LabelColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant4LabelColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant4LabelFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant4LabelFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LabelFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4LabelFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4LabelFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LabelFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant4LabelFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LabelFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant4LabelFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant4LabelFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LabelLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4LabelLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4LabelLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LabelOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4LabelOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4LabelOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LabelOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LabelOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4LabelOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4LabelOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LegendX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LegendX {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4LegendX {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4LegendX {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4LegendY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4LegendY {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4LegendY {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4LegendY {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4Orient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4Orient {
Variant0(LegendVariant4OrientVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant4OrientVariant0> for LegendVariant4Orient {
fn from(value: LegendVariant4OrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant4Orient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4OrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4OrientVariant0 {
#[serde(rename = "none")]
None,
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "top-left")]
TopLeft,
#[serde(rename = "top-right")]
TopRight,
#[serde(rename = "bottom-left")]
BottomLeft,
#[serde(rename = "bottom-right")]
BottomRight,
}
impl ::std::fmt::Display for LegendVariant4OrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
Self::TopLeft => f.write_str("top-left"),
Self::TopRight => f.write_str("top-right"),
Self::BottomLeft => f.write_str("bottom-left"),
Self::BottomRight => f.write_str("bottom-right"),
}
}
}
impl ::std::str::FromStr for LegendVariant4OrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
"top-left" => Ok(Self::TopLeft),
"top-right" => Ok(Self::TopRight),
"bottom-left" => Ok(Self::BottomLeft),
"bottom-right" => Ok(Self::BottomRight),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4Padding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4Padding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4Padding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4Padding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4StrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4StrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant4StrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant4SymbolDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4SymbolDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for LegendVariant4SymbolDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for LegendVariant4SymbolDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4SymbolDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4SymbolDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4SymbolDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4SymbolDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4SymbolFillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4SymbolFillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant4SymbolFillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant4SymbolOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4SymbolOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4SymbolOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4SymbolOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4SymbolOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4SymbolOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4SymbolOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4SymbolOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4SymbolSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4SymbolSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4SymbolSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4SymbolSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4SymbolStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4SymbolStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant4SymbolStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant4SymbolStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4SymbolStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4SymbolStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4SymbolStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4SymbolType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4SymbolType {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant4SymbolType {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleAlign {
Variant0(LegendVariant4TitleAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant4TitleAlignVariant0> for LegendVariant4TitleAlign {
fn from(value: LegendVariant4TitleAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant4TitleAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4TitleAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant4TitleAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant4TitleAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4TitleAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleAnchor {
Variant0(::std::option::Option<LegendVariant4TitleAnchorVariant0>),
Variant1(AnchorValue),
}
impl ::std::convert::From<::std::option::Option<LegendVariant4TitleAnchorVariant0>>
for LegendVariant4TitleAnchor
{
fn from(value: ::std::option::Option<LegendVariant4TitleAnchorVariant0>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValue> for LegendVariant4TitleAnchor {
fn from(value: AnchorValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleAnchorVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4TitleAnchorVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LegendVariant4TitleAnchorVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LegendVariant4TitleAnchorVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4TitleBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleBaseline {
Variant0(LegendVariant4TitleBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant4TitleBaselineVariant0> for LegendVariant4TitleBaseline {
fn from(value: LegendVariant4TitleBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant4TitleBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4TitleBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant4TitleBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant4TitleBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4TitleColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant4TitleColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant4TitleFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant4TitleFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4TitleFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4TitleFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant4TitleFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant4TitleFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant4TitleFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4TitleLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4TitleLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4TitleLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4TitleLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4TitleOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4TitleOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitleOrient {
Variant0(LegendVariant4TitleOrientVariant0),
Variant1(OrientValue),
}
impl ::std::convert::From<LegendVariant4TitleOrientVariant0> for LegendVariant4TitleOrient {
fn from(value: LegendVariant4TitleOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValue> for LegendVariant4TitleOrient {
fn from(value: OrientValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4TitleOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4TitleOrientVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for LegendVariant4TitleOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant4TitleOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant4TitlePadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant4TitlePadding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant4TitlePadding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant4TitlePadding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant4Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant4Type {
#[serde(rename = "gradient")]
Gradient,
#[serde(rename = "symbol")]
Symbol,
}
impl ::std::fmt::Display for LegendVariant4Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Gradient => f.write_str("gradient"),
Self::Symbol => f.write_str("symbol"),
}
}
}
impl ::std::str::FromStr for LegendVariant4Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"gradient" => Ok(Self::Gradient),
"symbol" => Ok(Self::Symbol),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant4Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant4Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5CornerRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5CornerRadius {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5CornerRadius {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5CornerRadius {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5Direction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5Direction {
#[serde(rename = "vertical")]
Vertical,
#[serde(rename = "horizontal")]
Horizontal,
}
impl ::std::fmt::Display for LegendVariant5Direction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Vertical => f.write_str("vertical"),
Self::Horizontal => f.write_str("horizontal"),
}
}
}
impl ::std::str::FromStr for LegendVariant5Direction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"vertical" => Ok(Self::Vertical),
"horizontal" => Ok(Self::Horizontal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5Direction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5Direction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5Encode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct LegendVariant5Encode {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub entries: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub gradient: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub labels: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub legend: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub symbols: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<GuideEncode>,
}
#[doc = "`LegendVariant5FillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5FillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant5FillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant5Format`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LegendVariant5Format {
String(::std::string::String),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
date: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
day: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
hours: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
milliseconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
minutes: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
month: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
quarter: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
seconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
week: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
year: ::std::option::Option<::std::string::String>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LegendVariant5Format {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LegendVariant5FormatType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5FormatType {
Variant0(LegendVariant5FormatTypeVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant5FormatTypeVariant0> for LegendVariant5FormatType {
fn from(value: LegendVariant5FormatTypeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant5FormatType {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5FormatTypeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5FormatTypeVariant0 {
#[serde(rename = "number")]
Number,
#[serde(rename = "time")]
Time,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for LegendVariant5FormatTypeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Number => f.write_str("number"),
Self::Time => f.write_str("time"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for LegendVariant5FormatTypeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"number" => Ok(Self::Number),
"time" => Ok(Self::Time),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5GradientOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5GradientOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5GradientOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5GradientOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5GradientStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5GradientStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant5GradientStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant5GradientStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5GradientStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5GradientStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5GradientStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5GridAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5GridAlign {
Variant0(LegendVariant5GridAlignVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant5GridAlignVariant0> for LegendVariant5GridAlign {
fn from(value: LegendVariant5GridAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant5GridAlign {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5GridAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5GridAlignVariant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LegendVariant5GridAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LegendVariant5GridAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5LabelAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelAlign {
Variant0(LegendVariant5LabelAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant5LabelAlignVariant0> for LegendVariant5LabelAlign {
fn from(value: LegendVariant5LabelAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant5LabelAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LabelAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5LabelAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant5LabelAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant5LabelAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5LabelBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelBaseline {
Variant0(LegendVariant5LabelBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant5LabelBaselineVariant0> for LegendVariant5LabelBaseline {
fn from(value: LegendVariant5LabelBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant5LabelBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LabelBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5LabelBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant5LabelBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant5LabelBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5LabelColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant5LabelColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant5LabelFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant5LabelFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LabelFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5LabelFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5LabelFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LabelFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant5LabelFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LabelFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant5LabelFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant5LabelFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LabelLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5LabelLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5LabelLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LabelOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5LabelOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5LabelOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LabelOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LabelOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5LabelOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5LabelOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LegendX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LegendX {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5LegendX {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5LegendX {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5LegendY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5LegendY {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5LegendY {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5LegendY {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5Orient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5Orient {
Variant0(LegendVariant5OrientVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant5OrientVariant0> for LegendVariant5Orient {
fn from(value: LegendVariant5OrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant5Orient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5OrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5OrientVariant0 {
#[serde(rename = "none")]
None,
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "top-left")]
TopLeft,
#[serde(rename = "top-right")]
TopRight,
#[serde(rename = "bottom-left")]
BottomLeft,
#[serde(rename = "bottom-right")]
BottomRight,
}
impl ::std::fmt::Display for LegendVariant5OrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
Self::TopLeft => f.write_str("top-left"),
Self::TopRight => f.write_str("top-right"),
Self::BottomLeft => f.write_str("bottom-left"),
Self::BottomRight => f.write_str("bottom-right"),
}
}
}
impl ::std::str::FromStr for LegendVariant5OrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
"top-left" => Ok(Self::TopLeft),
"top-right" => Ok(Self::TopRight),
"bottom-left" => Ok(Self::BottomLeft),
"bottom-right" => Ok(Self::BottomRight),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5Padding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5Padding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5Padding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5Padding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5StrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5StrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant5StrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant5SymbolDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5SymbolDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for LegendVariant5SymbolDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for LegendVariant5SymbolDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5SymbolDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5SymbolDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5SymbolDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5SymbolDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5SymbolFillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5SymbolFillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant5SymbolFillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant5SymbolOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5SymbolOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5SymbolOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5SymbolOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5SymbolOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5SymbolOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5SymbolOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5SymbolOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5SymbolSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5SymbolSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5SymbolSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5SymbolSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5SymbolStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5SymbolStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant5SymbolStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant5SymbolStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5SymbolStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5SymbolStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5SymbolStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5SymbolType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5SymbolType {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant5SymbolType {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleAlign {
Variant0(LegendVariant5TitleAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant5TitleAlignVariant0> for LegendVariant5TitleAlign {
fn from(value: LegendVariant5TitleAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant5TitleAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5TitleAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant5TitleAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant5TitleAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5TitleAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleAnchor {
Variant0(::std::option::Option<LegendVariant5TitleAnchorVariant0>),
Variant1(AnchorValue),
}
impl ::std::convert::From<::std::option::Option<LegendVariant5TitleAnchorVariant0>>
for LegendVariant5TitleAnchor
{
fn from(value: ::std::option::Option<LegendVariant5TitleAnchorVariant0>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValue> for LegendVariant5TitleAnchor {
fn from(value: AnchorValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleAnchorVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5TitleAnchorVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LegendVariant5TitleAnchorVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LegendVariant5TitleAnchorVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5TitleBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleBaseline {
Variant0(LegendVariant5TitleBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant5TitleBaselineVariant0> for LegendVariant5TitleBaseline {
fn from(value: LegendVariant5TitleBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant5TitleBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5TitleBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant5TitleBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant5TitleBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5TitleColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant5TitleColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant5TitleFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant5TitleFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5TitleFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5TitleFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant5TitleFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant5TitleFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant5TitleFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5TitleLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5TitleLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5TitleLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5TitleLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5TitleOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5TitleOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitleOrient {
Variant0(LegendVariant5TitleOrientVariant0),
Variant1(OrientValue),
}
impl ::std::convert::From<LegendVariant5TitleOrientVariant0> for LegendVariant5TitleOrient {
fn from(value: LegendVariant5TitleOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValue> for LegendVariant5TitleOrient {
fn from(value: OrientValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5TitleOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5TitleOrientVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for LegendVariant5TitleOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant5TitleOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant5TitlePadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant5TitlePadding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant5TitlePadding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant5TitlePadding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant5Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant5Type {
#[serde(rename = "gradient")]
Gradient,
#[serde(rename = "symbol")]
Symbol,
}
impl ::std::fmt::Display for LegendVariant5Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Gradient => f.write_str("gradient"),
Self::Symbol => f.write_str("symbol"),
}
}
}
impl ::std::str::FromStr for LegendVariant5Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"gradient" => Ok(Self::Gradient),
"symbol" => Ok(Self::Symbol),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant5Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant5Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6CornerRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6CornerRadius {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6CornerRadius {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6CornerRadius {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6Direction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6Direction {
#[serde(rename = "vertical")]
Vertical,
#[serde(rename = "horizontal")]
Horizontal,
}
impl ::std::fmt::Display for LegendVariant6Direction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Vertical => f.write_str("vertical"),
Self::Horizontal => f.write_str("horizontal"),
}
}
}
impl ::std::str::FromStr for LegendVariant6Direction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"vertical" => Ok(Self::Vertical),
"horizontal" => Ok(Self::Horizontal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6Direction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6Direction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6Encode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct LegendVariant6Encode {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub entries: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub gradient: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub labels: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub legend: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub symbols: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<GuideEncode>,
}
#[doc = "`LegendVariant6FillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6FillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant6FillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant6Format`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum LegendVariant6Format {
String(::std::string::String),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
date: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
day: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
hours: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
milliseconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
minutes: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
month: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
quarter: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
seconds: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
week: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
year: ::std::option::Option<::std::string::String>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LegendVariant6Format {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LegendVariant6FormatType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6FormatType {
Variant0(LegendVariant6FormatTypeVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant6FormatTypeVariant0> for LegendVariant6FormatType {
fn from(value: LegendVariant6FormatTypeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant6FormatType {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6FormatTypeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6FormatTypeVariant0 {
#[serde(rename = "number")]
Number,
#[serde(rename = "time")]
Time,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for LegendVariant6FormatTypeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Number => f.write_str("number"),
Self::Time => f.write_str("time"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for LegendVariant6FormatTypeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"number" => Ok(Self::Number),
"time" => Ok(Self::Time),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6FormatTypeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6GradientOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6GradientOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6GradientOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6GradientOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6GradientStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6GradientStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant6GradientStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant6GradientStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6GradientStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6GradientStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6GradientStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6GridAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6GridAlign {
Variant0(LegendVariant6GridAlignVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant6GridAlignVariant0> for LegendVariant6GridAlign {
fn from(value: LegendVariant6GridAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant6GridAlign {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6GridAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6GridAlignVariant0 {
#[serde(rename = "all")]
All,
#[serde(rename = "each")]
Each,
#[serde(rename = "none")]
None,
}
impl ::std::fmt::Display for LegendVariant6GridAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Each => f.write_str("each"),
Self::None => f.write_str("none"),
}
}
}
impl ::std::str::FromStr for LegendVariant6GridAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"each" => Ok(Self::Each),
"none" => Ok(Self::None),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6GridAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6LabelAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelAlign {
Variant0(LegendVariant6LabelAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant6LabelAlignVariant0> for LegendVariant6LabelAlign {
fn from(value: LegendVariant6LabelAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant6LabelAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LabelAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6LabelAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant6LabelAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant6LabelAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6LabelAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6LabelBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelBaseline {
Variant0(LegendVariant6LabelBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant6LabelBaselineVariant0> for LegendVariant6LabelBaseline {
fn from(value: LegendVariant6LabelBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant6LabelBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LabelBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6LabelBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant6LabelBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant6LabelBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6LabelBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6LabelColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant6LabelColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant6LabelFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant6LabelFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LabelFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6LabelFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6LabelFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LabelFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant6LabelFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LabelFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant6LabelFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant6LabelFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LabelLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6LabelLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6LabelLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LabelOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6LabelOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6LabelOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LabelOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LabelOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6LabelOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6LabelOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LegendX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LegendX {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6LegendX {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6LegendX {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6LegendY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6LegendY {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6LegendY {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6LegendY {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6Orient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6Orient {
Variant0(LegendVariant6OrientVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<LegendVariant6OrientVariant0> for LegendVariant6Orient {
fn from(value: LegendVariant6OrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LegendVariant6Orient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6OrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6OrientVariant0 {
#[serde(rename = "none")]
None,
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "top-left")]
TopLeft,
#[serde(rename = "top-right")]
TopRight,
#[serde(rename = "bottom-left")]
BottomLeft,
#[serde(rename = "bottom-right")]
BottomRight,
}
impl ::std::fmt::Display for LegendVariant6OrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
Self::TopLeft => f.write_str("top-left"),
Self::TopRight => f.write_str("top-right"),
Self::BottomLeft => f.write_str("bottom-left"),
Self::BottomRight => f.write_str("bottom-right"),
}
}
}
impl ::std::str::FromStr for LegendVariant6OrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
"top-left" => Ok(Self::TopLeft),
"top-right" => Ok(Self::TopRight),
"bottom-left" => Ok(Self::BottomLeft),
"bottom-right" => Ok(Self::BottomRight),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6OrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6Padding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6Padding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6Padding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6Padding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6StrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6StrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant6StrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant6SymbolDash`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6SymbolDash {
Variant0(::std::vec::Vec<f64>),
Variant1(ArrayValue),
}
impl ::std::convert::From<::std::vec::Vec<f64>> for LegendVariant6SymbolDash {
fn from(value: ::std::vec::Vec<f64>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ArrayValue> for LegendVariant6SymbolDash {
fn from(value: ArrayValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6SymbolDashOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6SymbolDashOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6SymbolDashOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6SymbolDashOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6SymbolFillColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6SymbolFillColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant6SymbolFillColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant6SymbolOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6SymbolOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6SymbolOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6SymbolOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6SymbolOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6SymbolOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6SymbolOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6SymbolOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6SymbolSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6SymbolSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6SymbolSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6SymbolSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6SymbolStrokeColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6SymbolStrokeColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant6SymbolStrokeColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant6SymbolStrokeWidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6SymbolStrokeWidth {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6SymbolStrokeWidth {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6SymbolStrokeWidth {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6SymbolType`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6SymbolType {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant6SymbolType {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleAlign {
Variant0(LegendVariant6TitleAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<LegendVariant6TitleAlignVariant0> for LegendVariant6TitleAlign {
fn from(value: LegendVariant6TitleAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for LegendVariant6TitleAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6TitleAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for LegendVariant6TitleAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for LegendVariant6TitleAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6TitleAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6TitleAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleAnchor {
Variant0(::std::option::Option<LegendVariant6TitleAnchorVariant0>),
Variant1(AnchorValue),
}
impl ::std::convert::From<::std::option::Option<LegendVariant6TitleAnchorVariant0>>
for LegendVariant6TitleAnchor
{
fn from(value: ::std::option::Option<LegendVariant6TitleAnchorVariant0>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValue> for LegendVariant6TitleAnchor {
fn from(value: AnchorValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleAnchorVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6TitleAnchorVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for LegendVariant6TitleAnchorVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for LegendVariant6TitleAnchorVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6TitleAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6TitleBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleBaseline {
Variant0(LegendVariant6TitleBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<LegendVariant6TitleBaselineVariant0> for LegendVariant6TitleBaseline {
fn from(value: LegendVariant6TitleBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for LegendVariant6TitleBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6TitleBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for LegendVariant6TitleBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant6TitleBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6TitleBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6TitleColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for LegendVariant6TitleColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`LegendVariant6TitleFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant6TitleFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6TitleFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6TitleFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for LegendVariant6TitleFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for LegendVariant6TitleFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for LegendVariant6TitleFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6TitleLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6TitleLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6TitleLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6TitleLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleOpacity`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleOpacity {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6TitleOpacity {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6TitleOpacity {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitleOrient {
Variant0(LegendVariant6TitleOrientVariant0),
Variant1(OrientValue),
}
impl ::std::convert::From<LegendVariant6TitleOrientVariant0> for LegendVariant6TitleOrient {
fn from(value: LegendVariant6TitleOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValue> for LegendVariant6TitleOrient {
fn from(value: OrientValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6TitleOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6TitleOrientVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for LegendVariant6TitleOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for LegendVariant6TitleOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6TitleOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LegendVariant6TitlePadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LegendVariant6TitlePadding {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for LegendVariant6TitlePadding {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for LegendVariant6TitlePadding {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LegendVariant6Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LegendVariant6Type {
#[serde(rename = "gradient")]
Gradient,
#[serde(rename = "symbol")]
Symbol,
}
impl ::std::fmt::Display for LegendVariant6Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Gradient => f.write_str("gradient"),
Self::Symbol => f.write_str("symbol"),
}
}
}
impl ::std::str::FromStr for LegendVariant6Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"gradient" => Ok(Self::Gradient),
"symbol" => Ok(Self::Symbol),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LegendVariant6Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LegendVariant6Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LinearGradient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LinearGradient {
pub gradient: LinearGradientGradient,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub id: ::std::option::Option<::std::string::String>,
pub stops: GradientStops,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub x1: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub x2: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub y1: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub y2: ::std::option::Option<f64>,
}
#[doc = "`LinearGradientGradient`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LinearGradientGradient {
#[serde(rename = "linear")]
Linear,
}
impl ::std::fmt::Display for LinearGradientGradient {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Linear => f.write_str("linear"),
}
}
}
impl ::std::str::FromStr for LinearGradientGradient {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"linear" => Ok(Self::Linear),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LinearGradientGradient {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LinearGradientGradient {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LinkpathTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LinkpathTransform {
#[serde(rename = "as", default = "defaults::linkpath_transform_as")]
pub as_: LinkpathTransformAs,
#[serde(default = "defaults::linkpath_transform_orient")]
pub orient: LinkpathTransformOrient,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub require: ::std::option::Option<SignalRef>,
#[serde(default = "defaults::linkpath_transform_shape")]
pub shape: LinkpathTransformShape,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "sourceX", default = "defaults::linkpath_transform_source_x")]
pub source_x: LinkpathTransformSourceX,
#[serde(rename = "sourceY", default = "defaults::linkpath_transform_source_y")]
pub source_y: LinkpathTransformSourceY,
#[serde(rename = "targetX", default = "defaults::linkpath_transform_target_x")]
pub target_x: LinkpathTransformTargetX,
#[serde(rename = "targetY", default = "defaults::linkpath_transform_target_y")]
pub target_y: LinkpathTransformTargetY,
#[serde(rename = "type")]
pub type_: LinkpathTransformType,
}
#[doc = "`LinkpathTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LinkpathTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for LinkpathTransformAs {
fn default() -> Self {
LinkpathTransformAs::String("path".to_string())
}
}
impl ::std::convert::From<SignalRef> for LinkpathTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LinkpathTransformOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LinkpathTransformOrient {
Variant0(LinkpathTransformOrientVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for LinkpathTransformOrient {
fn default() -> Self {
LinkpathTransformOrient::Variant0(LinkpathTransformOrientVariant0::Vertical)
}
}
impl ::std::convert::From<LinkpathTransformOrientVariant0> for LinkpathTransformOrient {
fn from(value: LinkpathTransformOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LinkpathTransformOrient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LinkpathTransformOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LinkpathTransformOrientVariant0 {
#[serde(rename = "horizontal")]
Horizontal,
#[serde(rename = "vertical")]
Vertical,
#[serde(rename = "radial")]
Radial,
}
impl ::std::fmt::Display for LinkpathTransformOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Horizontal => f.write_str("horizontal"),
Self::Vertical => f.write_str("vertical"),
Self::Radial => f.write_str("radial"),
}
}
}
impl ::std::str::FromStr for LinkpathTransformOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"horizontal" => Ok(Self::Horizontal),
"vertical" => Ok(Self::Vertical),
"radial" => Ok(Self::Radial),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LinkpathTransformOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LinkpathTransformOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LinkpathTransformShape`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LinkpathTransformShape {
Variant0(LinkpathTransformShapeVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for LinkpathTransformShape {
fn default() -> Self {
LinkpathTransformShape::Variant0(LinkpathTransformShapeVariant0::Line)
}
}
impl ::std::convert::From<LinkpathTransformShapeVariant0> for LinkpathTransformShape {
fn from(value: LinkpathTransformShapeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for LinkpathTransformShape {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`LinkpathTransformShapeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LinkpathTransformShapeVariant0 {
#[serde(rename = "line")]
Line,
#[serde(rename = "arc")]
Arc,
#[serde(rename = "curve")]
Curve,
#[serde(rename = "diagonal")]
Diagonal,
#[serde(rename = "orthogonal")]
Orthogonal,
}
impl ::std::fmt::Display for LinkpathTransformShapeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Line => f.write_str("line"),
Self::Arc => f.write_str("arc"),
Self::Curve => f.write_str("curve"),
Self::Diagonal => f.write_str("diagonal"),
Self::Orthogonal => f.write_str("orthogonal"),
}
}
}
impl ::std::str::FromStr for LinkpathTransformShapeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"line" => Ok(Self::Line),
"arc" => Ok(Self::Arc),
"curve" => Ok(Self::Curve),
"diagonal" => Ok(Self::Diagonal),
"orthogonal" => Ok(Self::Orthogonal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LinkpathTransformShapeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LinkpathTransformShapeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LinkpathTransformSourceX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LinkpathTransformSourceX {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::default::Default for LinkpathTransformSourceX {
fn default() -> Self {
LinkpathTransformSourceX::ScaleField(ScaleField(StringOrSignal::String(
"source.x".to_string(),
)))
}
}
impl ::std::convert::From<ScaleField> for LinkpathTransformSourceX {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LinkpathTransformSourceX {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LinkpathTransformSourceX {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`LinkpathTransformSourceY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LinkpathTransformSourceY {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::default::Default for LinkpathTransformSourceY {
fn default() -> Self {
LinkpathTransformSourceY::ScaleField(ScaleField(StringOrSignal::String(
"source.y".to_string(),
)))
}
}
impl ::std::convert::From<ScaleField> for LinkpathTransformSourceY {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LinkpathTransformSourceY {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LinkpathTransformSourceY {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`LinkpathTransformTargetX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LinkpathTransformTargetX {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::default::Default for LinkpathTransformTargetX {
fn default() -> Self {
LinkpathTransformTargetX::ScaleField(ScaleField(StringOrSignal::String(
"target.x".to_string(),
)))
}
}
impl ::std::convert::From<ScaleField> for LinkpathTransformTargetX {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LinkpathTransformTargetX {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LinkpathTransformTargetX {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`LinkpathTransformTargetY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LinkpathTransformTargetY {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::default::Default for LinkpathTransformTargetY {
fn default() -> Self {
LinkpathTransformTargetY::ScaleField(ScaleField(StringOrSignal::String(
"target.y".to_string(),
)))
}
}
impl ::std::convert::From<ScaleField> for LinkpathTransformTargetY {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LinkpathTransformTargetY {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LinkpathTransformTargetY {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`LinkpathTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LinkpathTransformType {
#[serde(rename = "linkpath")]
Linkpath,
}
impl ::std::fmt::Display for LinkpathTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Linkpath => f.write_str("linkpath"),
}
}
}
impl ::std::str::FromStr for LinkpathTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"linkpath" => Ok(Self::Linkpath),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LinkpathTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LinkpathTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Listener`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Listener {
SignalRef(SignalRef),
Object { scale: ::std::string::String },
Stream(Stream),
}
impl ::std::convert::From<SignalRef> for Listener {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Stream> for Listener {
fn from(value: Stream) -> Self {
Self::Stream(value)
}
}
#[doc = "`LoessTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LoessTransform {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<LoessTransformAs>,
#[serde(default = "defaults::loess_transform_bandwidth")]
pub bandwidth: LoessTransformBandwidth,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<LoessTransformGroupby>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: LoessTransformType,
pub x: LoessTransformX,
pub y: LoessTransformY,
}
#[doc = "`LoessTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LoessTransformAs {
Array(::std::vec::Vec<LoessTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<LoessTransformAsArrayItem>> for LoessTransformAs {
fn from(value: ::std::vec::Vec<LoessTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LoessTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LoessTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LoessTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LoessTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LoessTransformBandwidth`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LoessTransformBandwidth {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for LoessTransformBandwidth {
fn default() -> Self {
LoessTransformBandwidth::Number(0.3_f64)
}
}
impl ::std::convert::From<f64> for LoessTransformBandwidth {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for LoessTransformBandwidth {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LoessTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LoessTransformGroupby {
Array(::std::vec::Vec<LoessTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<LoessTransformGroupbyArrayItem>>
for LoessTransformGroupby
{
fn from(value: ::std::vec::Vec<LoessTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LoessTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LoessTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LoessTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for LoessTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LoessTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LoessTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`LoessTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LoessTransformType {
#[serde(rename = "loess")]
Loess,
}
impl ::std::fmt::Display for LoessTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Loess => f.write_str("loess"),
}
}
}
impl ::std::str::FromStr for LoessTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"loess" => Ok(Self::Loess),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LoessTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LoessTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LoessTransformX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LoessTransformX {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for LoessTransformX {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LoessTransformX {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LoessTransformX {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`LoessTransformY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LoessTransformY {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for LoessTransformY {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LoessTransformY {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LoessTransformY {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`LookupTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LookupTransform {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<LookupTransformAs>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub default: ::std::option::Option<::serde_json::Value>,
pub fields: LookupTransformFields,
pub from: ::std::string::String,
pub key: LookupTransformKey,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: LookupTransformType,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub values: ::std::option::Option<LookupTransformValues>,
}
#[doc = "`LookupTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LookupTransformAs {
Array(::std::vec::Vec<LookupTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<LookupTransformAsArrayItem>> for LookupTransformAs {
fn from(value: ::std::vec::Vec<LookupTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LookupTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LookupTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LookupTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for LookupTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LookupTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LookupTransformFields {
Array(::std::vec::Vec<LookupTransformFieldsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<LookupTransformFieldsArrayItem>>
for LookupTransformFields
{
fn from(value: ::std::vec::Vec<LookupTransformFieldsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LookupTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LookupTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LookupTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for LookupTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LookupTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LookupTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`LookupTransformKey`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LookupTransformKey {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for LookupTransformKey {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LookupTransformKey {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LookupTransformKey {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`LookupTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LookupTransformType {
#[serde(rename = "lookup")]
Lookup,
}
impl ::std::fmt::Display for LookupTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Lookup => f.write_str("lookup"),
}
}
}
impl ::std::str::FromStr for LookupTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"lookup" => Ok(Self::Lookup),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LookupTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LookupTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LookupTransformValues`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LookupTransformValues {
Array(::std::vec::Vec<LookupTransformValuesArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<LookupTransformValuesArrayItem>>
for LookupTransformValues
{
fn from(value: ::std::vec::Vec<LookupTransformValuesArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for LookupTransformValues {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`LookupTransformValuesArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LookupTransformValuesArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for LookupTransformValuesArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for LookupTransformValuesArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for LookupTransformValuesArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`Mark`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct Mark {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub aria: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub clip: ::std::option::Option<Markclip>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub encode: ::std::option::Option<Encode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub interactive: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub key: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub on: ::std::option::Option<OnMarkTrigger>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub role: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub style: ::std::option::Option<Style>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub transform: ::std::vec::Vec<TransformMark>,
#[serde(rename = "type")]
pub type_: Marktype,
}
#[doc = "`MarkGroup`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct MarkGroup {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub aria: ::std::option::Option<bool>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub axes: ::std::vec::Vec<Axis>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub clip: ::std::option::Option<Markclip>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub data: ::std::vec::Vec<Data>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub encode: ::std::option::Option<Encode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub from: ::std::option::Option<MarkGroupFrom>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub interactive: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub key: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub layout: ::std::option::Option<Layout>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub legends: ::std::vec::Vec<Legend>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub marks: ::std::vec::Vec<MarkGroupMarksItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub on: ::std::option::Option<OnMarkTrigger>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub projections: ::std::vec::Vec<Projection>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub role: ::std::option::Option<::std::string::String>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub scales: ::std::vec::Vec<Scale>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub signals: ::std::vec::Vec<Signal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub style: ::std::option::Option<Style>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<Title>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub transform: ::std::vec::Vec<TransformMark>,
#[serde(rename = "type")]
pub type_: MarkGroupType,
#[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
pub usermeta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
}
#[doc = "`MarkGroupFrom`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum MarkGroupFrom {
From(From),
Facet(Facet),
}
impl ::std::convert::From<From> for MarkGroupFrom {
fn from(value: From) -> Self {
Self::From(value)
}
}
impl ::std::convert::From<Facet> for MarkGroupFrom {
fn from(value: Facet) -> Self {
Self::Facet(value)
}
}
#[doc = "`MarkGroupMarksItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum MarkGroupMarksItem {
Group(MarkGroup),
Visual(MarkVisual),
}
impl ::std::convert::From<MarkGroup> for MarkGroupMarksItem {
fn from(value: MarkGroup) -> Self {
Self::Group(value)
}
}
impl ::std::convert::From<MarkVisual> for MarkGroupMarksItem {
fn from(value: MarkVisual) -> Self {
Self::Visual(value)
}
}
#[doc = "`MarkGroupType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MarkGroupType {
#[serde(rename = "group")]
Group,
}
impl ::std::fmt::Display for MarkGroupType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Group => f.write_str("group"),
}
}
}
impl ::std::str::FromStr for MarkGroupType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"group" => Ok(Self::Group),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MarkGroupType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MarkGroupType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MarkVisual`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct MarkVisual {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub aria: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub clip: ::std::option::Option<Markclip>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub encode: ::std::option::Option<Encode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub from: ::std::option::Option<From>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub interactive: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub key: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub on: ::std::option::Option<OnMarkTrigger>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub role: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub style: ::std::option::Option<Style>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub transform: ::std::vec::Vec<TransformMark>,
#[serde(rename = "type")]
pub type_: Marktype,
}
#[doc = "`Markclip`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Markclip {
Variant0(BooleanOrSignal),
Variant1 { path: StringOrSignal },
Variant2 { sphere: StringOrSignal },
}
impl ::std::convert::From<BooleanOrSignal> for Markclip {
fn from(value: BooleanOrSignal) -> Self {
Self::Variant0(value)
}
}
#[doc = "`Marktype`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(transparent)]
pub struct Marktype(pub ::std::string::String);
impl ::std::ops::Deref for Marktype {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<Marktype> for ::std::string::String {
fn from(value: Marktype) -> Self {
value.0
}
}
impl ::std::convert::From<::std::string::String> for Marktype {
fn from(value: ::std::string::String) -> Self {
Self(value)
}
}
impl ::std::fmt::Display for Marktype {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
self.0.fmt(f)
}
}
impl ::std::str::FromStr for Marktype {
type Err = ::std::convert::Infallible;
fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
Ok(Self(value.to_string()))
}
}
#[doc = "`NestTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct NestTransform {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub generate: ::std::option::Option<NestTransformGenerate>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub keys: ::std::option::Option<NestTransformKeys>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: NestTransformType,
}
#[doc = "`NestTransformGenerate`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NestTransformGenerate {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for NestTransformGenerate {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for NestTransformGenerate {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`NestTransformKeys`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NestTransformKeys {
Array(::std::vec::Vec<NestTransformKeysArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<NestTransformKeysArrayItem>> for NestTransformKeys {
fn from(value: ::std::vec::Vec<NestTransformKeysArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for NestTransformKeys {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`NestTransformKeysArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NestTransformKeysArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for NestTransformKeysArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for NestTransformKeysArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for NestTransformKeysArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`NestTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum NestTransformType {
#[serde(rename = "nest")]
Nest,
}
impl ::std::fmt::Display for NestTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Nest => f.write_str("nest"),
}
}
}
impl ::std::str::FromStr for NestTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"nest" => Ok(Self::Nest),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for NestTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for NestTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`NumberModifiers`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct NumberModifiers {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub band: ::std::option::Option<NumberModifiersBand>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub exponent: ::std::option::Option<NumberModifiersExponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub extra: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub mult: ::std::option::Option<NumberModifiersMult>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub offset: ::std::option::Option<NumberModifiersOffset>,
#[serde(default)]
pub round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub scale: ::std::option::Option<Field>,
}
#[doc = "`NumberModifiersBand`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberModifiersBand {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberModifiersBand {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberModifiersBand {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberModifiersBand {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for NumberModifiersBand {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberModifiersBand {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberModifiersBand {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberModifiersExponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberModifiersExponent {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberModifiersExponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberModifiersExponent {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberModifiersMult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberModifiersMult {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberModifiersMult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberModifiersMult {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberModifiersOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberModifiersOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberModifiersOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberModifiersOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberOrSignal`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberOrSignal {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for NumberOrSignal {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for NumberOrSignal {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`NumberValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValue {
Variant0(::std::vec::Vec<NumberValueVariant0Item>),
Variant1(NumberValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<NumberValueVariant0Item>> for NumberValue {
fn from(value: ::std::vec::Vec<NumberValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValueVariant1> for NumberValue {
fn from(value: NumberValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0Item {
Variant0(NumberValueVariant0ItemVariant0),
Variant1(NumberValueVariant0ItemVariant1),
Variant2(NumberValueVariant0ItemVariant2),
Variant3 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant0ItemVariant3Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant0ItemVariant3Mult>,
offset: NumberValueVariant0ItemVariant3Offset,
#[serde(default)]
round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<NumberValueVariant0ItemVariant0> for NumberValueVariant0Item {
fn from(value: NumberValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValueVariant0ItemVariant1> for NumberValueVariant0Item {
fn from(value: NumberValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<NumberValueVariant0ItemVariant2> for NumberValueVariant0Item {
fn from(value: NumberValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
band: ::std::option::Option<NumberValueVariant0ItemVariant0Variant0Band>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant0ItemVariant0Variant0Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant0ItemVariant0Variant0Mult>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<NumberValueVariant0ItemVariant0Variant0Offset>,
#[serde(default)]
round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
band: ::std::option::Option<NumberValueVariant0ItemVariant0Variant1Band>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant0ItemVariant0Variant1Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant0ItemVariant0Variant1Mult>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<NumberValueVariant0ItemVariant0Variant1Offset>,
#[serde(default)]
round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: f64,
},
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
band: ::std::option::Option<NumberValueVariant0ItemVariant0Variant2Band>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant0ItemVariant0Variant2Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant0ItemVariant0Variant2Mult>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<NumberValueVariant0ItemVariant0Variant2Offset>,
#[serde(default)]
round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
band: ::std::option::Option<NumberValueVariant0ItemVariant0Variant3Band>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant0ItemVariant0Variant3Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant0ItemVariant0Variant3Mult>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<NumberValueVariant0ItemVariant0Variant3Offset>,
range: NumberValueVariant0ItemVariant0Variant3Range,
#[serde(default)]
round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`NumberValueVariant0ItemVariant0Variant0Band`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant0Band {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant0ItemVariant0Variant0Band {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant0ItemVariant0Variant0Band {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant0ItemVariant0Variant0Band {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for NumberValueVariant0ItemVariant0Variant0Band
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant0Band {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant0ItemVariant0Variant0Band {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant0Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant0Exponent {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant0Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant0Exponent {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant0Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant0Mult {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant0Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant0Mult {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant0Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant0Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant0Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant0Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant1Band`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant1Band {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant0ItemVariant0Variant1Band {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant0ItemVariant0Variant1Band {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant0ItemVariant0Variant1Band {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for NumberValueVariant0ItemVariant0Variant1Band
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant1Band {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant0ItemVariant0Variant1Band {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant1Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant1Exponent {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant1Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant1Exponent {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant1Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant1Mult {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant1Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant1Mult {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant1Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant1Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant1Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant1Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant2Band`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant2Band {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant0ItemVariant0Variant2Band {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant0ItemVariant0Variant2Band {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant0ItemVariant0Variant2Band {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for NumberValueVariant0ItemVariant0Variant2Band
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant2Band {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant0ItemVariant0Variant2Band {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant2Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant2Exponent {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant2Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant2Exponent {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant2Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant2Mult {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant2Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant2Mult {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant2Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant2Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant2Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant2Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant3Band`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant3Band {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant0ItemVariant0Variant3Band {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant0ItemVariant0Variant3Band {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant0ItemVariant0Variant3Band {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for NumberValueVariant0ItemVariant0Variant3Band
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant3Band {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant0ItemVariant0Variant3Band {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant3Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant3Exponent {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant3Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant3Exponent {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant3Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant3Mult {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant3Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant3Mult {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant3Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant3Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant3Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant0Variant3Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for NumberValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum NumberValueVariant0ItemVariant1 {}
#[doc = "`NumberValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum NumberValueVariant0ItemVariant2 {}
#[doc = "`NumberValueVariant0ItemVariant3Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant3Exponent {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant3Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant3Exponent {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant3Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant3Mult {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant3Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant3Mult {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant0ItemVariant3Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant0ItemVariant3Offset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for NumberValueVariant0ItemVariant3Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for NumberValueVariant0ItemVariant3Offset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1 {
Variant0(NumberValueVariant1Variant0),
Variant1(NumberValueVariant1Variant1),
Variant2(NumberValueVariant1Variant2),
Variant3 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant1Variant3Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant1Variant3Mult>,
offset: NumberValueVariant1Variant3Offset,
#[serde(default)]
round: bool,
},
}
impl ::std::convert::From<NumberValueVariant1Variant0> for NumberValueVariant1 {
fn from(value: NumberValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValueVariant1Variant1> for NumberValueVariant1 {
fn from(value: NumberValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<NumberValueVariant1Variant2> for NumberValueVariant1 {
fn from(value: NumberValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`NumberValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
band: ::std::option::Option<NumberValueVariant1Variant0Variant0Band>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant1Variant0Variant0Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant1Variant0Variant0Mult>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<NumberValueVariant1Variant0Variant0Offset>,
#[serde(default)]
round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
band: ::std::option::Option<NumberValueVariant1Variant0Variant1Band>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant1Variant0Variant1Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant1Variant0Variant1Mult>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<NumberValueVariant1Variant0Variant1Offset>,
#[serde(default)]
round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: f64,
},
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
band: ::std::option::Option<NumberValueVariant1Variant0Variant2Band>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant1Variant0Variant2Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant1Variant0Variant2Mult>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<NumberValueVariant1Variant0Variant2Offset>,
#[serde(default)]
round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
band: ::std::option::Option<NumberValueVariant1Variant0Variant3Band>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberValueVariant1Variant0Variant3Exponent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extra: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
mult: ::std::option::Option<NumberValueVariant1Variant0Variant3Mult>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<NumberValueVariant1Variant0Variant3Offset>,
range: NumberValueVariant1Variant0Variant3Range,
#[serde(default)]
round: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`NumberValueVariant1Variant0Variant0Band`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant0Band {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant1Variant0Variant0Band {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant1Variant0Variant0Band {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant1Variant0Variant0Band {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for NumberValueVariant1Variant0Variant0Band {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant0Band {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant1Variant0Variant0Band {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant0Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant0Exponent {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant0Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant0Exponent
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant0Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant0Mult {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant0Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant0Mult
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant0Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant0Offset {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant0Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant0Offset
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant1Band`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant1Band {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant1Variant0Variant1Band {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant1Variant0Variant1Band {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant1Variant0Variant1Band {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for NumberValueVariant1Variant0Variant1Band {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant1Band {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant1Variant0Variant1Band {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant1Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant1Exponent {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant1Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant1Exponent
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant1Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant1Mult {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant1Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant1Mult
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant1Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant1Offset {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant1Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant1Offset
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant2Band`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant2Band {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant1Variant0Variant2Band {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant1Variant0Variant2Band {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant1Variant0Variant2Band {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for NumberValueVariant1Variant0Variant2Band {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant2Band {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant1Variant0Variant2Band {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant2Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant2Exponent {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant2Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant2Exponent
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant2Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant2Mult {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant2Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant2Mult
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant2Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant2Offset {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant2Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant2Offset
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant3Band`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant3Band {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant1Variant0Variant3Band {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant1Variant0Variant3Band {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant1Variant0Variant3Band {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for NumberValueVariant1Variant0Variant3Band {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant3Band {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant1Variant0Variant3Band {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant3Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant3Exponent {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant3Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant3Exponent
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant3Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant3Mult {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant3Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant3Mult
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant3Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant3Offset {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant3Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>>
for NumberValueVariant1Variant0Variant3Offset
{
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for NumberValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for NumberValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for NumberValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for NumberValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for NumberValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`NumberValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum NumberValueVariant1Variant1 {}
#[doc = "`NumberValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum NumberValueVariant1Variant2 {}
#[doc = "`NumberValueVariant1Variant3Exponent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant3Exponent {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant3Exponent {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>> for NumberValueVariant1Variant3Exponent {
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant3Mult`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant3Mult {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant3Mult {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>> for NumberValueVariant1Variant3Mult {
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`NumberValueVariant1Variant3Offset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum NumberValueVariant1Variant3Offset {
Variant0(f64),
Variant1(::std::boxed::Box<NumberValue>),
}
impl ::std::convert::From<f64> for NumberValueVariant1Variant3Offset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::boxed::Box<NumberValue>> for NumberValueVariant1Variant3Offset {
fn from(value: ::std::boxed::Box<NumberValue>) -> Self {
Self::Variant1(value)
}
}
#[doc = "`OnEvents`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct OnEvents(pub ::std::vec::Vec<OnEventsItem>);
impl ::std::ops::Deref for OnEvents {
type Target = ::std::vec::Vec<OnEventsItem>;
fn deref(&self) -> &::std::vec::Vec<OnEventsItem> {
&self.0
}
}
impl ::std::convert::From<OnEvents> for ::std::vec::Vec<OnEventsItem> {
fn from(value: OnEvents) -> Self {
value.0
}
}
impl ::std::convert::From<::std::vec::Vec<OnEventsItem>> for OnEvents {
fn from(value: ::std::vec::Vec<OnEventsItem>) -> Self {
Self(value)
}
}
#[doc = "`OnEventsItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OnEventsItem {
Variant0 {
encode: ::std::string::String,
events: OnEventsItemVariant0Events,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
force: ::std::option::Option<bool>,
},
Variant1 {
events: OnEventsItemVariant1Events,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
force: ::std::option::Option<bool>,
update: OnEventsItemVariant1Update,
},
}
#[doc = "`OnEventsItemVariant0Events`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OnEventsItemVariant0Events {
Selector(Selector),
Listener(Listener),
Array(::std::vec::Vec<Listener>),
}
impl ::std::convert::From<Selector> for OnEventsItemVariant0Events {
fn from(value: Selector) -> Self {
Self::Selector(value)
}
}
impl ::std::convert::From<Listener> for OnEventsItemVariant0Events {
fn from(value: Listener) -> Self {
Self::Listener(value)
}
}
impl ::std::convert::From<::std::vec::Vec<Listener>> for OnEventsItemVariant0Events {
fn from(value: ::std::vec::Vec<Listener>) -> Self {
Self::Array(value)
}
}
#[doc = "`OnEventsItemVariant1Events`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OnEventsItemVariant1Events {
Selector(Selector),
Listener(Listener),
Array(::std::vec::Vec<Listener>),
}
impl ::std::convert::From<Selector> for OnEventsItemVariant1Events {
fn from(value: Selector) -> Self {
Self::Selector(value)
}
}
impl ::std::convert::From<Listener> for OnEventsItemVariant1Events {
fn from(value: Listener) -> Self {
Self::Listener(value)
}
}
impl ::std::convert::From<::std::vec::Vec<Listener>> for OnEventsItemVariant1Events {
fn from(value: ::std::vec::Vec<Listener>) -> Self {
Self::Array(value)
}
}
#[doc = "`OnEventsItemVariant1Update`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OnEventsItemVariant1Update {
ExprString(ExprString),
Expr(Expr),
SignalRef(SignalRef),
Object { value: ::serde_json::Value },
}
impl ::std::convert::From<ExprString> for OnEventsItemVariant1Update {
fn from(value: ExprString) -> Self {
Self::ExprString(value)
}
}
impl ::std::convert::From<Expr> for OnEventsItemVariant1Update {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<SignalRef> for OnEventsItemVariant1Update {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`OnMarkTrigger`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct OnMarkTrigger(pub ::std::vec::Vec<OnMarkTriggerItem>);
impl ::std::ops::Deref for OnMarkTrigger {
type Target = ::std::vec::Vec<OnMarkTriggerItem>;
fn deref(&self) -> &::std::vec::Vec<OnMarkTriggerItem> {
&self.0
}
}
impl ::std::convert::From<OnMarkTrigger> for ::std::vec::Vec<OnMarkTriggerItem> {
fn from(value: OnMarkTrigger) -> Self {
value.0
}
}
impl ::std::convert::From<::std::vec::Vec<OnMarkTriggerItem>> for OnMarkTrigger {
fn from(value: ::std::vec::Vec<OnMarkTriggerItem>) -> Self {
Self(value)
}
}
#[doc = "`OnMarkTriggerItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OnMarkTriggerItem {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub modify: ::std::option::Option<ExprString>,
pub trigger: ExprString,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub values: ::std::option::Option<ExprString>,
}
#[doc = "`OnTrigger`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct OnTrigger(pub ::std::vec::Vec<OnTriggerItem>);
impl ::std::ops::Deref for OnTrigger {
type Target = ::std::vec::Vec<OnTriggerItem>;
fn deref(&self) -> &::std::vec::Vec<OnTriggerItem> {
&self.0
}
}
impl ::std::convert::From<OnTrigger> for ::std::vec::Vec<OnTriggerItem> {
fn from(value: OnTrigger) -> Self {
value.0
}
}
impl ::std::convert::From<::std::vec::Vec<OnTriggerItem>> for OnTrigger {
fn from(value: ::std::vec::Vec<OnTriggerItem>) -> Self {
Self(value)
}
}
#[doc = "`OnTriggerItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OnTriggerItem {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub insert: ::std::option::Option<ExprString>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub modify: ::std::option::Option<ExprString>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub remove: ::std::option::Option<OnTriggerItemRemove>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub toggle: ::std::option::Option<ExprString>,
pub trigger: ExprString,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub values: ::std::option::Option<ExprString>,
}
#[doc = "`OnTriggerItemRemove`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OnTriggerItemRemove {
Boolean(bool),
ExprString(ExprString),
}
impl ::std::fmt::Display for OnTriggerItemRemove {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Boolean(x) => x.fmt(f),
Self::ExprString(x) => x.fmt(f),
}
}
}
impl ::std::convert::From<bool> for OnTriggerItemRemove {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<ExprString> for OnTriggerItemRemove {
fn from(value: ExprString) -> Self {
Self::ExprString(value)
}
}
#[doc = "`OrientValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OrientValue {
Variant0(::std::vec::Vec<OrientValueVariant0Item>),
Variant1(OrientValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<OrientValueVariant0Item>> for OrientValue {
fn from(value: ::std::vec::Vec<OrientValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValueVariant1> for OrientValue {
fn from(value: OrientValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`OrientValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OrientValueVariant0Item {
Variant0(OrientValueVariant0ItemVariant0),
Variant1(OrientValueVariant0ItemVariant1),
Variant2(OrientValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<OrientValueVariant0ItemVariant0> for OrientValueVariant0Item {
fn from(value: OrientValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValueVariant0ItemVariant1> for OrientValueVariant0Item {
fn from(value: OrientValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<OrientValueVariant0ItemVariant2> for OrientValueVariant0Item {
fn from(value: OrientValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`OrientValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OrientValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: OrientValueVariant0ItemVariant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: OrientValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`OrientValueVariant0ItemVariant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum OrientValueVariant0ItemVariant0Variant1Value {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for OrientValueVariant0ItemVariant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for OrientValueVariant0ItemVariant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for OrientValueVariant0ItemVariant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for OrientValueVariant0ItemVariant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`OrientValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OrientValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for OrientValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for OrientValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for OrientValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for OrientValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for OrientValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for OrientValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`OrientValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum OrientValueVariant0ItemVariant1 {}
#[doc = "`OrientValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum OrientValueVariant0ItemVariant2 {}
#[doc = "`OrientValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OrientValueVariant1 {
Variant0(OrientValueVariant1Variant0),
Variant1(OrientValueVariant1Variant1),
Variant2(OrientValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<OrientValueVariant1Variant0> for OrientValueVariant1 {
fn from(value: OrientValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<OrientValueVariant1Variant1> for OrientValueVariant1 {
fn from(value: OrientValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<OrientValueVariant1Variant2> for OrientValueVariant1 {
fn from(value: OrientValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`OrientValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OrientValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: OrientValueVariant1Variant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: OrientValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`OrientValueVariant1Variant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum OrientValueVariant1Variant0Variant1Value {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for OrientValueVariant1Variant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for OrientValueVariant1Variant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for OrientValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for OrientValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`OrientValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OrientValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for OrientValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for OrientValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for OrientValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for OrientValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for OrientValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for OrientValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`OrientValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum OrientValueVariant1Variant1 {}
#[doc = "`OrientValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum OrientValueVariant1Variant2 {}
#[doc = "`PackTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackTransform {
#[serde(rename = "as", default = "defaults::pack_transform_as")]
pub as_: PackTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub field: ::std::option::Option<PackTransformField>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub padding: ::std::option::Option<PackTransformPadding>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub radius: ::std::option::Option<PackTransformRadius>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub size: ::std::option::Option<PackTransformSize>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(rename = "type")]
pub type_: PackTransformType,
}
#[doc = "`PackTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PackTransformAs {
Array([PackTransformAsArrayItem; 5usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for PackTransformAs {
fn default() -> Self {
PackTransformAs::Array([
PackTransformAsArrayItem::String("x".to_string()),
PackTransformAsArrayItem::String("y".to_string()),
PackTransformAsArrayItem::String("r".to_string()),
PackTransformAsArrayItem::String("depth".to_string()),
PackTransformAsArrayItem::String("children".to_string()),
])
}
}
impl ::std::convert::From<[PackTransformAsArrayItem; 5usize]> for PackTransformAs {
fn from(value: [PackTransformAsArrayItem; 5usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for PackTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PackTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PackTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for PackTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PackTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PackTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for PackTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for PackTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for PackTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`PackTransformPadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PackTransformPadding {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for PackTransformPadding {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for PackTransformPadding {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PackTransformRadius`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PackTransformRadius {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for PackTransformRadius {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for PackTransformRadius {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for PackTransformRadius {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`PackTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PackTransformSize {
Array([PackTransformSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[PackTransformSizeArrayItem; 2usize]> for PackTransformSize {
fn from(value: [PackTransformSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for PackTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PackTransformSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PackTransformSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for PackTransformSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for PackTransformSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PackTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PackTransformType {
#[serde(rename = "pack")]
Pack,
}
impl ::std::fmt::Display for PackTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Pack => f.write_str("pack"),
}
}
}
impl ::std::str::FromStr for PackTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pack" => Ok(Self::Pack),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PackTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PackTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Padding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Padding {
Number(f64),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bottom: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
left: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
right: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
top: ::std::option::Option<f64>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for Padding {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for Padding {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ParamField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ParamField {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<::std::string::String>,
pub field: ::std::string::String,
}
#[doc = "`PartitionTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PartitionTransform {
#[serde(rename = "as", default = "defaults::partition_transform_as")]
pub as_: PartitionTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub field: ::std::option::Option<PartitionTransformField>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub padding: ::std::option::Option<PartitionTransformPadding>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub round: ::std::option::Option<PartitionTransformRound>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub size: ::std::option::Option<PartitionTransformSize>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(rename = "type")]
pub type_: PartitionTransformType,
}
#[doc = "`PartitionTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PartitionTransformAs {
Array([PartitionTransformAsArrayItem; 6usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for PartitionTransformAs {
fn default() -> Self {
PartitionTransformAs::Array([
PartitionTransformAsArrayItem::String("x0".to_string()),
PartitionTransformAsArrayItem::String("y0".to_string()),
PartitionTransformAsArrayItem::String("x1".to_string()),
PartitionTransformAsArrayItem::String("y1".to_string()),
PartitionTransformAsArrayItem::String("depth".to_string()),
PartitionTransformAsArrayItem::String("children".to_string()),
])
}
}
impl ::std::convert::From<[PartitionTransformAsArrayItem; 6usize]> for PartitionTransformAs {
fn from(value: [PartitionTransformAsArrayItem; 6usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for PartitionTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PartitionTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PartitionTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for PartitionTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PartitionTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PartitionTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for PartitionTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for PartitionTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for PartitionTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`PartitionTransformPadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PartitionTransformPadding {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for PartitionTransformPadding {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for PartitionTransformPadding {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PartitionTransformRound`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PartitionTransformRound {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for PartitionTransformRound {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for PartitionTransformRound {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PartitionTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PartitionTransformSize {
Array([PartitionTransformSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[PartitionTransformSizeArrayItem; 2usize]> for PartitionTransformSize {
fn from(value: [PartitionTransformSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for PartitionTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PartitionTransformSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PartitionTransformSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for PartitionTransformSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for PartitionTransformSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PartitionTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PartitionTransformType {
#[serde(rename = "partition")]
Partition,
}
impl ::std::fmt::Display for PartitionTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Partition => f.write_str("partition"),
}
}
}
impl ::std::str::FromStr for PartitionTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"partition" => Ok(Self::Partition),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PartitionTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PartitionTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PieTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PieTransform {
#[serde(rename = "as", default = "defaults::pie_transform_as")]
pub as_: PieTransformAs,
#[serde(rename = "endAngle", default = "defaults::pie_transform_end_angle")]
pub end_angle: PieTransformEndAngle,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub field: ::std::option::Option<PieTransformField>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<PieTransformSort>,
#[serde(
rename = "startAngle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub start_angle: ::std::option::Option<PieTransformStartAngle>,
#[serde(rename = "type")]
pub type_: PieTransformType,
}
#[doc = "`PieTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PieTransformAs {
Array([PieTransformAsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for PieTransformAs {
fn default() -> Self {
PieTransformAs::Array([
PieTransformAsArrayItem::String("startAngle".to_string()),
PieTransformAsArrayItem::String("endAngle".to_string()),
])
}
}
impl ::std::convert::From<[PieTransformAsArrayItem; 2usize]> for PieTransformAs {
fn from(value: [PieTransformAsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for PieTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PieTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PieTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for PieTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PieTransformEndAngle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PieTransformEndAngle {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for PieTransformEndAngle {
fn default() -> Self {
PieTransformEndAngle::Number(6.283185307179586_f64)
}
}
impl ::std::convert::From<f64> for PieTransformEndAngle {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for PieTransformEndAngle {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PieTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PieTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for PieTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for PieTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for PieTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`PieTransformSort`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PieTransformSort {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for PieTransformSort {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for PieTransformSort {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PieTransformStartAngle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PieTransformStartAngle {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for PieTransformStartAngle {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for PieTransformStartAngle {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PieTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PieTransformType {
#[serde(rename = "pie")]
Pie,
}
impl ::std::fmt::Display for PieTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Pie => f.write_str("pie"),
}
}
}
impl ::std::str::FromStr for PieTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pie" => Ok(Self::Pie),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PieTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PieTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PivotTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PivotTransform {
pub field: PivotTransformField,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<PivotTransformGroupby>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub key: ::std::option::Option<PivotTransformKey>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub limit: ::std::option::Option<PivotTransformLimit>,
#[serde(default = "defaults::pivot_transform_op")]
pub op: PivotTransformOp,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: PivotTransformType,
pub value: PivotTransformValue,
}
#[doc = "`PivotTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PivotTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for PivotTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for PivotTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for PivotTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`PivotTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PivotTransformGroupby {
Array(::std::vec::Vec<PivotTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<PivotTransformGroupbyArrayItem>>
for PivotTransformGroupby
{
fn from(value: ::std::vec::Vec<PivotTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for PivotTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PivotTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PivotTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for PivotTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for PivotTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for PivotTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`PivotTransformKey`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PivotTransformKey {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for PivotTransformKey {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for PivotTransformKey {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for PivotTransformKey {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`PivotTransformLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PivotTransformLimit {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for PivotTransformLimit {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for PivotTransformLimit {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`PivotTransformOp`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PivotTransformOp {
Variant0(PivotTransformOpVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for PivotTransformOp {
fn default() -> Self {
PivotTransformOp::Variant0(PivotTransformOpVariant0::Sum)
}
}
impl ::std::convert::From<PivotTransformOpVariant0> for PivotTransformOp {
fn from(value: PivotTransformOpVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for PivotTransformOp {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`PivotTransformOpVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PivotTransformOpVariant0 {
#[serde(rename = "values")]
Values,
#[serde(rename = "count")]
Count,
#[serde(rename = "__count__")]
XXcountXx,
#[serde(rename = "missing")]
Missing,
#[serde(rename = "valid")]
Valid,
#[serde(rename = "sum")]
Sum,
#[serde(rename = "product")]
Product,
#[serde(rename = "mean")]
Mean,
#[serde(rename = "average")]
Average,
#[serde(rename = "variance")]
Variance,
#[serde(rename = "variancep")]
Variancep,
#[serde(rename = "stdev")]
Stdev,
#[serde(rename = "stdevp")]
Stdevp,
#[serde(rename = "stderr")]
Stderr,
#[serde(rename = "distinct")]
Distinct,
#[serde(rename = "ci0")]
Ci0,
#[serde(rename = "ci1")]
Ci1,
#[serde(rename = "median")]
Median,
#[serde(rename = "q1")]
Q1,
#[serde(rename = "q3")]
Q3,
#[serde(rename = "min")]
Min,
#[serde(rename = "max")]
Max,
#[serde(rename = "argmin")]
Argmin,
#[serde(rename = "argmax")]
Argmax,
}
impl ::std::fmt::Display for PivotTransformOpVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Values => f.write_str("values"),
Self::Count => f.write_str("count"),
Self::XXcountXx => f.write_str("__count__"),
Self::Missing => f.write_str("missing"),
Self::Valid => f.write_str("valid"),
Self::Sum => f.write_str("sum"),
Self::Product => f.write_str("product"),
Self::Mean => f.write_str("mean"),
Self::Average => f.write_str("average"),
Self::Variance => f.write_str("variance"),
Self::Variancep => f.write_str("variancep"),
Self::Stdev => f.write_str("stdev"),
Self::Stdevp => f.write_str("stdevp"),
Self::Stderr => f.write_str("stderr"),
Self::Distinct => f.write_str("distinct"),
Self::Ci0 => f.write_str("ci0"),
Self::Ci1 => f.write_str("ci1"),
Self::Median => f.write_str("median"),
Self::Q1 => f.write_str("q1"),
Self::Q3 => f.write_str("q3"),
Self::Min => f.write_str("min"),
Self::Max => f.write_str("max"),
Self::Argmin => f.write_str("argmin"),
Self::Argmax => f.write_str("argmax"),
}
}
}
impl ::std::str::FromStr for PivotTransformOpVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"values" => Ok(Self::Values),
"count" => Ok(Self::Count),
"__count__" => Ok(Self::XXcountXx),
"missing" => Ok(Self::Missing),
"valid" => Ok(Self::Valid),
"sum" => Ok(Self::Sum),
"product" => Ok(Self::Product),
"mean" => Ok(Self::Mean),
"average" => Ok(Self::Average),
"variance" => Ok(Self::Variance),
"variancep" => Ok(Self::Variancep),
"stdev" => Ok(Self::Stdev),
"stdevp" => Ok(Self::Stdevp),
"stderr" => Ok(Self::Stderr),
"distinct" => Ok(Self::Distinct),
"ci0" => Ok(Self::Ci0),
"ci1" => Ok(Self::Ci1),
"median" => Ok(Self::Median),
"q1" => Ok(Self::Q1),
"q3" => Ok(Self::Q3),
"min" => Ok(Self::Min),
"max" => Ok(Self::Max),
"argmin" => Ok(Self::Argmin),
"argmax" => Ok(Self::Argmax),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PivotTransformOpVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PivotTransformOpVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PivotTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PivotTransformType {
#[serde(rename = "pivot")]
Pivot,
}
impl ::std::fmt::Display for PivotTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Pivot => f.write_str("pivot"),
}
}
}
impl ::std::str::FromStr for PivotTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pivot" => Ok(Self::Pivot),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PivotTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PivotTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PivotTransformValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PivotTransformValue {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for PivotTransformValue {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for PivotTransformValue {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for PivotTransformValue {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ProjectTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectTransform {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<ProjectTransformAs>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub fields: ::std::option::Option<ProjectTransformFields>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: ProjectTransformType,
}
#[doc = "`ProjectTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectTransformAs {
Array(::std::vec::Vec<ProjectTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ProjectTransformAsArrayItem>> for ProjectTransformAs {
fn from(value: ::std::vec::Vec<ProjectTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
Null,
}
impl ::std::convert::From<SignalRef> for ProjectTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectTransformFields {
Array(::std::vec::Vec<ProjectTransformFieldsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ProjectTransformFieldsArrayItem>>
for ProjectTransformFields
{
fn from(value: ::std::vec::Vec<ProjectTransformFieldsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for ProjectTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for ProjectTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for ProjectTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ProjectTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectTransformType {
#[serde(rename = "project")]
Project,
}
impl ::std::fmt::Display for ProjectTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Project => f.write_str("project"),
}
}
}
impl ::std::str::FromStr for ProjectTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"project" => Ok(Self::Project),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Projection`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct Projection {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub center: ::std::option::Option<ProjectionCenter>,
#[serde(
rename = "clipAngle",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub clip_angle: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "clipExtent",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub clip_extent: ::std::option::Option<ProjectionClipExtent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub extent: ::std::option::Option<ProjectionExtent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub fit: ::std::option::Option<ProjectionFit>,
pub name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parallels: ::std::option::Option<ProjectionParallels>,
#[serde(
rename = "pointRadius",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub point_radius: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub precision: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub rotate: ::std::option::Option<ProjectionRotate>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub scale: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub size: ::std::option::Option<ProjectionSize>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub translate: ::std::option::Option<ProjectionTranslate>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub type_: ::std::option::Option<StringOrSignal>,
}
#[doc = "`ProjectionCenter`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionCenter {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ProjectionCenter {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectionCenter {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectionClipExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionClipExtent {
Array([ProjectionClipExtentArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[ProjectionClipExtentArrayItem; 2usize]> for ProjectionClipExtent {
fn from(value: [ProjectionClipExtentArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectionClipExtent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectionClipExtentArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionClipExtentArrayItem {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ProjectionClipExtentArrayItem {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectionClipExtentArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectionExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionExtent {
Array([ProjectionExtentArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[ProjectionExtentArrayItem; 2usize]> for ProjectionExtent {
fn from(value: [ProjectionExtentArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectionExtent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectionExtentArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionExtentArrayItem {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ProjectionExtentArrayItem {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectionExtentArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectionFit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionFit {
Object(::serde_json::Map<::std::string::String, ::serde_json::Value>),
Array(::std::vec::Vec<::serde_json::Value>),
}
impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
for ProjectionFit
{
fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
Self::Object(value)
}
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ProjectionFit {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
#[doc = "`ProjectionParallels`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionParallels {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ProjectionParallels {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectionParallels {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectionRotate`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionRotate {
Array(::std::vec::Vec<NumberOrSignal>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ProjectionRotate {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectionRotate {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectionSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionSize {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ProjectionSize {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectionSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ProjectionTranslate`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectionTranslate {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ProjectionTranslate {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ProjectionTranslate {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`QuantileTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct QuantileTransform {
#[serde(rename = "as", default = "defaults::quantile_transform_as")]
pub as_: QuantileTransformAs,
pub field: QuantileTransformField,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<QuantileTransformGroupby>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub probs: ::std::option::Option<QuantileTransformProbs>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(default = "defaults::quantile_transform_step")]
pub step: QuantileTransformStep,
#[serde(rename = "type")]
pub type_: QuantileTransformType,
}
#[doc = "`QuantileTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum QuantileTransformAs {
Array(::std::vec::Vec<QuantileTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::default::Default for QuantileTransformAs {
fn default() -> Self {
QuantileTransformAs::Array(vec![
QuantileTransformAsArrayItem::String("prob".to_string()),
QuantileTransformAsArrayItem::String("value".to_string()),
])
}
}
impl ::std::convert::From<::std::vec::Vec<QuantileTransformAsArrayItem>> for QuantileTransformAs {
fn from(value: ::std::vec::Vec<QuantileTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for QuantileTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`QuantileTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum QuantileTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for QuantileTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`QuantileTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum QuantileTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for QuantileTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for QuantileTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for QuantileTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`QuantileTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum QuantileTransformGroupby {
Array(::std::vec::Vec<QuantileTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<QuantileTransformGroupbyArrayItem>>
for QuantileTransformGroupby
{
fn from(value: ::std::vec::Vec<QuantileTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for QuantileTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`QuantileTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum QuantileTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for QuantileTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for QuantileTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for QuantileTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`QuantileTransformProbs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum QuantileTransformProbs {
Array(::std::vec::Vec<QuantileTransformProbsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<QuantileTransformProbsArrayItem>>
for QuantileTransformProbs
{
fn from(value: ::std::vec::Vec<QuantileTransformProbsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for QuantileTransformProbs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`QuantileTransformProbsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum QuantileTransformProbsArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for QuantileTransformProbsArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for QuantileTransformProbsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`QuantileTransformStep`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum QuantileTransformStep {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for QuantileTransformStep {
fn default() -> Self {
QuantileTransformStep::Number(0.01_f64)
}
}
impl ::std::convert::From<f64> for QuantileTransformStep {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for QuantileTransformStep {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`QuantileTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum QuantileTransformType {
#[serde(rename = "quantile")]
Quantile,
}
impl ::std::fmt::Display for QuantileTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Quantile => f.write_str("quantile"),
}
}
}
impl ::std::str::FromStr for QuantileTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"quantile" => Ok(Self::Quantile),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for QuantileTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for QuantileTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RadialGradient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RadialGradient {
pub gradient: RadialGradientGradient,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub id: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub r1: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub r2: ::std::option::Option<f64>,
pub stops: GradientStops,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub x1: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub x2: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub y1: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub y2: ::std::option::Option<f64>,
}
#[doc = "`RadialGradientGradient`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RadialGradientGradient {
#[serde(rename = "radial")]
Radial,
}
impl ::std::fmt::Display for RadialGradientGradient {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Radial => f.write_str("radial"),
}
}
}
impl ::std::str::FromStr for RadialGradientGradient {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"radial" => Ok(Self::Radial),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RadialGradientGradient {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RadialGradientGradient {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RegressionTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RegressionTransform {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<RegressionTransformAs>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub extent: ::std::option::Option<RegressionTransformExtent>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<RegressionTransformGroupby>,
#[serde(default = "defaults::regression_transform_method")]
pub method: RegressionTransformMethod,
#[serde(default = "defaults::regression_transform_order")]
pub order: RegressionTransformOrder,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub params: ::std::option::Option<RegressionTransformParams>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: RegressionTransformType,
pub x: RegressionTransformX,
pub y: RegressionTransformY,
}
#[doc = "`RegressionTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformAs {
Array(::std::vec::Vec<RegressionTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<RegressionTransformAsArrayItem>>
for RegressionTransformAs
{
fn from(value: ::std::vec::Vec<RegressionTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for RegressionTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`RegressionTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for RegressionTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`RegressionTransformExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformExtent {
Array([RegressionTransformExtentArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[RegressionTransformExtentArrayItem; 2usize]>
for RegressionTransformExtent
{
fn from(value: [RegressionTransformExtentArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for RegressionTransformExtent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`RegressionTransformExtentArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformExtentArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for RegressionTransformExtentArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for RegressionTransformExtentArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`RegressionTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformGroupby {
Array(::std::vec::Vec<RegressionTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<RegressionTransformGroupbyArrayItem>>
for RegressionTransformGroupby
{
fn from(value: ::std::vec::Vec<RegressionTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for RegressionTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`RegressionTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for RegressionTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for RegressionTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for RegressionTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`RegressionTransformMethod`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformMethod {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for RegressionTransformMethod {
fn default() -> Self {
RegressionTransformMethod::String("linear".to_string())
}
}
impl ::std::convert::From<SignalRef> for RegressionTransformMethod {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`RegressionTransformOrder`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformOrder {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for RegressionTransformOrder {
fn default() -> Self {
RegressionTransformOrder::Number(3_f64)
}
}
impl ::std::convert::From<f64> for RegressionTransformOrder {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for RegressionTransformOrder {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`RegressionTransformParams`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformParams {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for RegressionTransformParams {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for RegressionTransformParams {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`RegressionTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RegressionTransformType {
#[serde(rename = "regression")]
Regression,
}
impl ::std::fmt::Display for RegressionTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Regression => f.write_str("regression"),
}
}
}
impl ::std::str::FromStr for RegressionTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"regression" => Ok(Self::Regression),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RegressionTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RegressionTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RegressionTransformX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformX {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for RegressionTransformX {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for RegressionTransformX {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for RegressionTransformX {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`RegressionTransformY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RegressionTransformY {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for RegressionTransformY {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for RegressionTransformY {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for RegressionTransformY {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`ResolvefilterTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ResolvefilterTransform {
pub filter: ::serde_json::Value,
pub ignore: ResolvefilterTransformIgnore,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: ResolvefilterTransformType,
}
#[doc = "`ResolvefilterTransformIgnore`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ResolvefilterTransformIgnore {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for ResolvefilterTransformIgnore {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ResolvefilterTransformIgnore {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ResolvefilterTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ResolvefilterTransformType {
#[serde(rename = "resolvefilter")]
Resolvefilter,
}
impl ::std::fmt::Display for ResolvefilterTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolvefilter => f.write_str("resolvefilter"),
}
}
}
impl ::std::str::FromStr for ResolvefilterTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolvefilter" => Ok(Self::Resolvefilter),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ResolvefilterTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ResolvefilterTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Rule`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct Rule {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub test: ::std::option::Option<::std::string::String>,
}
#[doc = "`SampleTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SampleTransform {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(default = "defaults::sample_transform_size")]
pub size: SampleTransformSize,
#[serde(rename = "type")]
pub type_: SampleTransformType,
}
#[doc = "`SampleTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SampleTransformSize {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for SampleTransformSize {
fn default() -> Self {
SampleTransformSize::Number(1000_f64)
}
}
impl ::std::convert::From<f64> for SampleTransformSize {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for SampleTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`SampleTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SampleTransformType {
#[serde(rename = "sample")]
Sample,
}
impl ::std::fmt::Display for SampleTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Sample => f.write_str("sample"),
}
}
}
impl ::std::str::FromStr for SampleTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"sample" => Ok(Self::Sample),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SampleTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SampleTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Scale`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Scale {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant0Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant0DomainRaw>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
nice: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant0Type,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant1Domain>,
#[serde(
rename = "domainImplicit",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_implicit: ::std::option::Option<BooleanOrSignal>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant1DomainRaw>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interpolate: ::std::option::Option<ScaleInterpolate>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant1Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant1Type,
},
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
align: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant2Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant2DomainRaw>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "paddingInner",
skip_serializing_if = "::std::option::Option::is_none"
)]
padding_inner: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "paddingOuter",
skip_serializing_if = "::std::option::Option::is_none"
)]
padding_outer: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant2Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant2Type,
},
Variant3 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
align: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant3Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant3DomainRaw>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "paddingOuter",
skip_serializing_if = "::std::option::Option::is_none"
)]
padding_outer: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant3Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant3Type,
},
Variant4 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant4Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant4DomainRaw>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interpolate: ::std::option::Option<ScaleInterpolate>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
nice: ::std::option::Option<ScaleVariant4Nice>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant4Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant4Type,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zero: ::std::option::Option<BooleanOrSignal>,
},
Variant5 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant5Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant5DomainRaw>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interpolate: ::std::option::Option<ScaleInterpolate>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant5Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant5Type,
},
Variant6 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bins: ::std::option::Option<ScaleBins>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant6Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant6DomainRaw>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interpolate: ::std::option::Option<ScaleInterpolate>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant6Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant6Type,
},
Variant7 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bins: ::std::option::Option<ScaleBins>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
clamp: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant7Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant7DomainRaw>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interpolate: ::std::option::Option<ScaleInterpolate>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
nice: ::std::option::Option<ScaleVariant7Nice>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant7Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant7Type,
},
Variant8 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bins: ::std::option::Option<ScaleBins>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
clamp: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant8Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant8DomainRaw>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interpolate: ::std::option::Option<ScaleInterpolate>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
nice: ::std::option::Option<ScaleVariant8Nice>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant8Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(
rename = "type",
skip_serializing_if = "::std::option::Option::is_none"
)]
type_: ::std::option::Option<ScaleVariant8Type>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zero: ::std::option::Option<BooleanOrSignal>,
},
Variant9 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
base: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bins: ::std::option::Option<ScaleBins>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
clamp: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant9Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant9DomainRaw>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interpolate: ::std::option::Option<ScaleInterpolate>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
nice: ::std::option::Option<ScaleVariant9Nice>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant9Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant9Type,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zero: ::std::option::Option<BooleanOrSignal>,
},
Variant10 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bins: ::std::option::Option<ScaleBins>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
clamp: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant10Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant10DomainRaw>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
exponent: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interpolate: ::std::option::Option<ScaleInterpolate>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
nice: ::std::option::Option<ScaleVariant10Nice>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant10Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant10Type,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zero: ::std::option::Option<BooleanOrSignal>,
},
Variant11 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bins: ::std::option::Option<ScaleBins>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
clamp: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
constant: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
domain: ::std::option::Option<ScaleVariant11Domain>,
#[serde(
rename = "domainMax",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_max: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMid",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_mid: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainMin",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_min: ::std::option::Option<NumberOrSignal>,
#[serde(
rename = "domainRaw",
skip_serializing_if = "::std::option::Option::is_none"
)]
domain_raw: ::std::option::Option<ScaleVariant11DomainRaw>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interpolate: ::std::option::Option<ScaleInterpolate>,
name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
nice: ::std::option::Option<ScaleVariant11Nice>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
range: ::std::option::Option<ScaleVariant11Range>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
reverse: ::std::option::Option<BooleanOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
round: ::std::option::Option<BooleanOrSignal>,
#[serde(rename = "type")]
type_: ScaleVariant11Type,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zero: ::std::option::Option<BooleanOrSignal>,
},
}
#[doc = "`ScaleBins`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleBins {
Array(::std::vec::Vec<NumberOrSignal>),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
start: ::std::option::Option<NumberOrSignal>,
step: NumberOrSignal,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
stop: ::std::option::Option<NumberOrSignal>,
},
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleBins {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleBins {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleData`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleData {
Variant0 {
data: ::std::string::String,
field: StringOrSignal,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
sort: ::std::option::Option<ScaleDataVariant0Sort>,
},
Variant1 {
data: ::std::string::String,
fields: ::std::vec::Vec<StringOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
sort: ::std::option::Option<ScaleDataVariant1Sort>,
},
Variant2 {
fields: ::std::vec::Vec<ScaleDataVariant2FieldsItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
sort: ::std::option::Option<ScaleDataVariant2Sort>,
},
}
#[doc = "`ScaleDataVariant0Sort`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleDataVariant0Sort {
Boolean(bool),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
field: ::std::option::Option<StringOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
op: ::std::option::Option<StringOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
}
impl ::std::convert::From<bool> for ScaleDataVariant0Sort {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`ScaleDataVariant1Sort`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleDataVariant1Sort {
Variant0(bool),
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
op: ::std::option::Option<ScaleDataVariant1SortVariant1Op>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
Variant2 {
field: StringOrSignal,
op: ScaleDataVariant1SortVariant2Op,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
}
impl ::std::convert::From<bool> for ScaleDataVariant1Sort {
fn from(value: bool) -> Self {
Self::Variant0(value)
}
}
#[doc = "`ScaleDataVariant1SortVariant1Op`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleDataVariant1SortVariant1Op {
#[serde(rename = "count")]
Count,
}
impl ::std::fmt::Display for ScaleDataVariant1SortVariant1Op {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Count => f.write_str("count"),
}
}
}
impl ::std::str::FromStr for ScaleDataVariant1SortVariant1Op {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"count" => Ok(Self::Count),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleDataVariant1SortVariant1Op {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleDataVariant1SortVariant1Op {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleDataVariant1SortVariant2Op`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleDataVariant1SortVariant2Op {
#[serde(rename = "count")]
Count,
#[serde(rename = "min")]
Min,
#[serde(rename = "max")]
Max,
}
impl ::std::fmt::Display for ScaleDataVariant1SortVariant2Op {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Count => f.write_str("count"),
Self::Min => f.write_str("min"),
Self::Max => f.write_str("max"),
}
}
}
impl ::std::str::FromStr for ScaleDataVariant1SortVariant2Op {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"count" => Ok(Self::Count),
"min" => Ok(Self::Min),
"max" => Ok(Self::Max),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleDataVariant1SortVariant2Op {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleDataVariant1SortVariant2Op {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleDataVariant2FieldsItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleDataVariant2FieldsItem {
Object {
data: ::std::string::String,
field: StringOrSignal,
},
Array(::std::vec::Vec<ScaleDataVariant2FieldsItemArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleDataVariant2FieldsItemArrayItem>>
for ScaleDataVariant2FieldsItem
{
fn from(value: ::std::vec::Vec<ScaleDataVariant2FieldsItemArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleDataVariant2FieldsItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleDataVariant2FieldsItemArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleDataVariant2FieldsItemArrayItem {
String(::std::string::String),
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for ScaleDataVariant2FieldsItemArrayItem {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::String(x) => x.fmt(f),
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::convert::From<f64> for ScaleDataVariant2FieldsItemArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for ScaleDataVariant2FieldsItemArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`ScaleDataVariant2Sort`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleDataVariant2Sort {
Variant0(bool),
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
op: ::std::option::Option<ScaleDataVariant2SortVariant1Op>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
Variant2 {
field: StringOrSignal,
op: ScaleDataVariant2SortVariant2Op,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
}
impl ::std::convert::From<bool> for ScaleDataVariant2Sort {
fn from(value: bool) -> Self {
Self::Variant0(value)
}
}
#[doc = "`ScaleDataVariant2SortVariant1Op`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleDataVariant2SortVariant1Op {
#[serde(rename = "count")]
Count,
}
impl ::std::fmt::Display for ScaleDataVariant2SortVariant1Op {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Count => f.write_str("count"),
}
}
}
impl ::std::str::FromStr for ScaleDataVariant2SortVariant1Op {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"count" => Ok(Self::Count),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleDataVariant2SortVariant1Op {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleDataVariant2SortVariant1Op {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleDataVariant2SortVariant2Op`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleDataVariant2SortVariant2Op {
#[serde(rename = "count")]
Count,
#[serde(rename = "min")]
Min,
#[serde(rename = "max")]
Max,
}
impl ::std::fmt::Display for ScaleDataVariant2SortVariant2Op {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Count => f.write_str("count"),
Self::Min => f.write_str("min"),
Self::Max => f.write_str("max"),
}
}
}
impl ::std::str::FromStr for ScaleDataVariant2SortVariant2Op {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"count" => Ok(Self::Count),
"min" => Ok(Self::Min),
"max" => Ok(Self::Max),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleDataVariant2SortVariant2Op {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleDataVariant2SortVariant2Op {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct ScaleField(pub StringOrSignal);
impl ::std::ops::Deref for ScaleField {
type Target = StringOrSignal;
fn deref(&self) -> &StringOrSignal {
&self.0
}
}
impl ::std::convert::From<ScaleField> for StringOrSignal {
fn from(value: ScaleField) -> Self {
value.0
}
}
impl ::std::convert::From<StringOrSignal> for ScaleField {
fn from(value: StringOrSignal) -> Self {
Self(value)
}
}
#[doc = "`ScaleInterpolate`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleInterpolate {
String(::std::string::String),
SignalRef(SignalRef),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
gamma: ::std::option::Option<NumberOrSignal>,
#[serde(rename = "type")]
type_: StringOrSignal,
},
}
impl ::std::convert::From<SignalRef> for ScaleInterpolate {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant0Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant0Domain {
Array(::std::vec::Vec<ScaleVariant0DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant0DomainArrayItem>> for ScaleVariant0Domain {
fn from(value: ::std::vec::Vec<ScaleVariant0DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant0Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant0Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant0DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant0DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant0DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant0DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant0DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant0DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant0DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant0DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant0DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant0DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant0Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant0Type {
#[serde(rename = "identity")]
Identity,
}
impl ::std::fmt::Display for ScaleVariant0Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Identity => f.write_str("identity"),
}
}
}
impl ::std::str::FromStr for ScaleVariant0Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"identity" => Ok(Self::Identity),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant0Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant0Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant10Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant10Domain {
Array(::std::vec::Vec<ScaleVariant10DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant10DomainArrayItem>> for ScaleVariant10Domain {
fn from(value: ::std::vec::Vec<ScaleVariant10DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant10Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant10Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant10DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant10DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant10DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant10DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant10DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant10DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant10DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant10DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant10DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant10DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant10Nice`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant10Nice {
Boolean(bool),
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for ScaleVariant10Nice {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant10Nice {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant10Nice {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant10Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant10Range {
Variant0(ScaleVariant10RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant10RangeVariant1Item>),
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extent: ::std::option::Option<ScaleVariant10RangeVariant2Extent>,
scheme: ScaleVariant10RangeVariant2Scheme,
},
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant10RangeVariant0> for ScaleVariant10Range {
fn from(value: ScaleVariant10RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant10RangeVariant1Item>>
for ScaleVariant10Range
{
fn from(value: ::std::vec::Vec<ScaleVariant10RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant10Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant10RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant10RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant10RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant10RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant10RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant10RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant10RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant10RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant10RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant10RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant10RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant10RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant10RangeVariant2Extent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant10RangeVariant2Extent {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ScaleVariant10RangeVariant2Extent {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant10RangeVariant2Extent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant10RangeVariant2Scheme`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant10RangeVariant2Scheme {
String(::std::string::String),
Array(::std::vec::Vec<ScaleVariant10RangeVariant2SchemeArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant10RangeVariant2SchemeArrayItem>>
for ScaleVariant10RangeVariant2Scheme
{
fn from(value: ::std::vec::Vec<ScaleVariant10RangeVariant2SchemeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant10RangeVariant2Scheme {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant10RangeVariant2SchemeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant10RangeVariant2SchemeArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ScaleVariant10RangeVariant2SchemeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant10Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant10Type {
#[serde(rename = "pow")]
Pow,
}
impl ::std::fmt::Display for ScaleVariant10Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Pow => f.write_str("pow"),
}
}
}
impl ::std::str::FromStr for ScaleVariant10Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pow" => Ok(Self::Pow),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant10Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant10Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant11Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant11Domain {
Array(::std::vec::Vec<ScaleVariant11DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant11DomainArrayItem>> for ScaleVariant11Domain {
fn from(value: ::std::vec::Vec<ScaleVariant11DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant11Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant11Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant11DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant11DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant11DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant11DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant11DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant11DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant11DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant11DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant11DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant11DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant11Nice`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant11Nice {
Boolean(bool),
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for ScaleVariant11Nice {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant11Nice {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant11Nice {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant11Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant11Range {
Variant0(ScaleVariant11RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant11RangeVariant1Item>),
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extent: ::std::option::Option<ScaleVariant11RangeVariant2Extent>,
scheme: ScaleVariant11RangeVariant2Scheme,
},
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant11RangeVariant0> for ScaleVariant11Range {
fn from(value: ScaleVariant11RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant11RangeVariant1Item>>
for ScaleVariant11Range
{
fn from(value: ::std::vec::Vec<ScaleVariant11RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant11Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant11RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant11RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant11RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant11RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant11RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant11RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant11RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant11RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant11RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant11RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant11RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant11RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant11RangeVariant2Extent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant11RangeVariant2Extent {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ScaleVariant11RangeVariant2Extent {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant11RangeVariant2Extent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant11RangeVariant2Scheme`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant11RangeVariant2Scheme {
String(::std::string::String),
Array(::std::vec::Vec<ScaleVariant11RangeVariant2SchemeArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant11RangeVariant2SchemeArrayItem>>
for ScaleVariant11RangeVariant2Scheme
{
fn from(value: ::std::vec::Vec<ScaleVariant11RangeVariant2SchemeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant11RangeVariant2Scheme {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant11RangeVariant2SchemeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant11RangeVariant2SchemeArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ScaleVariant11RangeVariant2SchemeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant11Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant11Type {
#[serde(rename = "symlog")]
Symlog,
}
impl ::std::fmt::Display for ScaleVariant11Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Symlog => f.write_str("symlog"),
}
}
}
impl ::std::str::FromStr for ScaleVariant11Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"symlog" => Ok(Self::Symlog),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant11Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant11Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant1Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant1Domain {
Array(::std::vec::Vec<ScaleVariant1DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant1DomainArrayItem>> for ScaleVariant1Domain {
fn from(value: ::std::vec::Vec<ScaleVariant1DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant1Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant1Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant1DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant1DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant1DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant1DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant1DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant1DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant1DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant1DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant1DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant1DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant1Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant1Range {
Variant0(ScaleVariant1RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant1RangeVariant1Item>),
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extent: ::std::option::Option<ScaleVariant1RangeVariant2Extent>,
scheme: ScaleVariant1RangeVariant2Scheme,
},
Variant3(ScaleVariant1RangeVariant3),
Variant4(SignalRef),
}
impl ::std::convert::From<ScaleVariant1RangeVariant0> for ScaleVariant1Range {
fn from(value: ScaleVariant1RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant1RangeVariant1Item>> for ScaleVariant1Range {
fn from(value: ::std::vec::Vec<ScaleVariant1RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<ScaleVariant1RangeVariant3> for ScaleVariant1Range {
fn from(value: ScaleVariant1RangeVariant3) -> Self {
Self::Variant3(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant1Range {
fn from(value: SignalRef) -> Self {
Self::Variant4(value)
}
}
#[doc = "`ScaleVariant1RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant1RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant1RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant1RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant1RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant1RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant1RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant1RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant1RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant1RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant1RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant1RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant1RangeVariant2Extent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant1RangeVariant2Extent {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ScaleVariant1RangeVariant2Extent {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant1RangeVariant2Extent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant1RangeVariant2Scheme`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant1RangeVariant2Scheme {
String(::std::string::String),
Array(::std::vec::Vec<ScaleVariant1RangeVariant2SchemeArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant1RangeVariant2SchemeArrayItem>>
for ScaleVariant1RangeVariant2Scheme
{
fn from(value: ::std::vec::Vec<ScaleVariant1RangeVariant2SchemeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant1RangeVariant2Scheme {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant1RangeVariant2SchemeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant1RangeVariant2SchemeArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ScaleVariant1RangeVariant2SchemeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant1RangeVariant3`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant1RangeVariant3 {
Variant0 {
data: ::std::string::String,
field: StringOrSignal,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
sort: ::std::option::Option<ScaleVariant1RangeVariant3Variant0Sort>,
},
Variant1 {
data: ::std::string::String,
fields: ::std::vec::Vec<StringOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
sort: ::std::option::Option<ScaleVariant1RangeVariant3Variant1Sort>,
},
Variant2 {
fields: ::std::vec::Vec<ScaleVariant1RangeVariant3Variant2FieldsItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
sort: ::std::option::Option<ScaleVariant1RangeVariant3Variant2Sort>,
},
}
#[doc = "`ScaleVariant1RangeVariant3Variant0Sort`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant1RangeVariant3Variant0Sort {
Boolean(bool),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
field: ::std::option::Option<StringOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
op: ::std::option::Option<StringOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
}
impl ::std::convert::From<bool> for ScaleVariant1RangeVariant3Variant0Sort {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`ScaleVariant1RangeVariant3Variant1Sort`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant1RangeVariant3Variant1Sort {
Variant0(bool),
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
op: ::std::option::Option<ScaleVariant1RangeVariant3Variant1SortVariant1Op>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
Variant2 {
field: StringOrSignal,
op: ScaleVariant1RangeVariant3Variant1SortVariant2Op,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
}
impl ::std::convert::From<bool> for ScaleVariant1RangeVariant3Variant1Sort {
fn from(value: bool) -> Self {
Self::Variant0(value)
}
}
#[doc = "`ScaleVariant1RangeVariant3Variant1SortVariant1Op`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant1RangeVariant3Variant1SortVariant1Op {
#[serde(rename = "count")]
Count,
}
impl ::std::fmt::Display for ScaleVariant1RangeVariant3Variant1SortVariant1Op {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Count => f.write_str("count"),
}
}
}
impl ::std::str::FromStr for ScaleVariant1RangeVariant3Variant1SortVariant1Op {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"count" => Ok(Self::Count),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant1RangeVariant3Variant1SortVariant1Op {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for ScaleVariant1RangeVariant3Variant1SortVariant1Op
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant1RangeVariant3Variant1SortVariant2Op`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant1RangeVariant3Variant1SortVariant2Op {
#[serde(rename = "count")]
Count,
#[serde(rename = "min")]
Min,
#[serde(rename = "max")]
Max,
}
impl ::std::fmt::Display for ScaleVariant1RangeVariant3Variant1SortVariant2Op {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Count => f.write_str("count"),
Self::Min => f.write_str("min"),
Self::Max => f.write_str("max"),
}
}
}
impl ::std::str::FromStr for ScaleVariant1RangeVariant3Variant1SortVariant2Op {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"count" => Ok(Self::Count),
"min" => Ok(Self::Min),
"max" => Ok(Self::Max),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant1RangeVariant3Variant1SortVariant2Op {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for ScaleVariant1RangeVariant3Variant1SortVariant2Op
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant1RangeVariant3Variant2FieldsItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant1RangeVariant3Variant2FieldsItem {
Object {
data: ::std::string::String,
field: StringOrSignal,
},
Array(::std::vec::Vec<ScaleVariant1RangeVariant3Variant2FieldsItemArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant1RangeVariant3Variant2FieldsItemArrayItem>>
for ScaleVariant1RangeVariant3Variant2FieldsItem
{
fn from(value: ::std::vec::Vec<ScaleVariant1RangeVariant3Variant2FieldsItemArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant1RangeVariant3Variant2FieldsItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant1RangeVariant3Variant2FieldsItemArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant1RangeVariant3Variant2FieldsItemArrayItem {
String(::std::string::String),
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for ScaleVariant1RangeVariant3Variant2FieldsItemArrayItem {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::String(x) => x.fmt(f),
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::convert::From<f64> for ScaleVariant1RangeVariant3Variant2FieldsItemArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for ScaleVariant1RangeVariant3Variant2FieldsItemArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`ScaleVariant1RangeVariant3Variant2Sort`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant1RangeVariant3Variant2Sort {
Variant0(bool),
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
op: ::std::option::Option<ScaleVariant1RangeVariant3Variant2SortVariant1Op>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
Variant2 {
field: StringOrSignal,
op: ScaleVariant1RangeVariant3Variant2SortVariant2Op,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
order: ::std::option::Option<SortOrder>,
},
}
impl ::std::convert::From<bool> for ScaleVariant1RangeVariant3Variant2Sort {
fn from(value: bool) -> Self {
Self::Variant0(value)
}
}
#[doc = "`ScaleVariant1RangeVariant3Variant2SortVariant1Op`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant1RangeVariant3Variant2SortVariant1Op {
#[serde(rename = "count")]
Count,
}
impl ::std::fmt::Display for ScaleVariant1RangeVariant3Variant2SortVariant1Op {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Count => f.write_str("count"),
}
}
}
impl ::std::str::FromStr for ScaleVariant1RangeVariant3Variant2SortVariant1Op {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"count" => Ok(Self::Count),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant1RangeVariant3Variant2SortVariant1Op {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for ScaleVariant1RangeVariant3Variant2SortVariant1Op
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant1RangeVariant3Variant2SortVariant2Op`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant1RangeVariant3Variant2SortVariant2Op {
#[serde(rename = "count")]
Count,
#[serde(rename = "min")]
Min,
#[serde(rename = "max")]
Max,
}
impl ::std::fmt::Display for ScaleVariant1RangeVariant3Variant2SortVariant2Op {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Count => f.write_str("count"),
Self::Min => f.write_str("min"),
Self::Max => f.write_str("max"),
}
}
}
impl ::std::str::FromStr for ScaleVariant1RangeVariant3Variant2SortVariant2Op {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"count" => Ok(Self::Count),
"min" => Ok(Self::Min),
"max" => Ok(Self::Max),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant1RangeVariant3Variant2SortVariant2Op {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for ScaleVariant1RangeVariant3Variant2SortVariant2Op
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant1Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant1Type {
#[serde(rename = "ordinal")]
Ordinal,
}
impl ::std::fmt::Display for ScaleVariant1Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Ordinal => f.write_str("ordinal"),
}
}
}
impl ::std::str::FromStr for ScaleVariant1Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"ordinal" => Ok(Self::Ordinal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant1Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant1Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant2Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant2Domain {
Array(::std::vec::Vec<ScaleVariant2DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant2DomainArrayItem>> for ScaleVariant2Domain {
fn from(value: ::std::vec::Vec<ScaleVariant2DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant2Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant2Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant2DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant2DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant2DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant2DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant2DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant2DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant2DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant2DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant2DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant2DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant2Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant2Range {
Variant0(ScaleVariant2RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant2RangeVariant1Item>),
Variant2 { step: NumberOrSignal },
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant2RangeVariant0> for ScaleVariant2Range {
fn from(value: ScaleVariant2RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant2RangeVariant1Item>> for ScaleVariant2Range {
fn from(value: ::std::vec::Vec<ScaleVariant2RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant2Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant2RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant2RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant2RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant2RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant2RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant2RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant2RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant2RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant2RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant2RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant2RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant2RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant2Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant2Type {
#[serde(rename = "band")]
Band,
}
impl ::std::fmt::Display for ScaleVariant2Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Band => f.write_str("band"),
}
}
}
impl ::std::str::FromStr for ScaleVariant2Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"band" => Ok(Self::Band),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant2Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant2Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant3Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant3Domain {
Array(::std::vec::Vec<ScaleVariant3DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant3DomainArrayItem>> for ScaleVariant3Domain {
fn from(value: ::std::vec::Vec<ScaleVariant3DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant3Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant3Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant3DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant3DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant3DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant3DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant3DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant3DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant3DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant3DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant3DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant3DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant3Range {
Variant0(ScaleVariant3RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant3RangeVariant1Item>),
Variant2 { step: NumberOrSignal },
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant3RangeVariant0> for ScaleVariant3Range {
fn from(value: ScaleVariant3RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant3RangeVariant1Item>> for ScaleVariant3Range {
fn from(value: ::std::vec::Vec<ScaleVariant3RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant3Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant3RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant3RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant3RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant3RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant3RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant3RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant3RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant3RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant3RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant3RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant3RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant3RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant3Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant3Type {
#[serde(rename = "point")]
Point,
}
impl ::std::fmt::Display for ScaleVariant3Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Point => f.write_str("point"),
}
}
}
impl ::std::str::FromStr for ScaleVariant3Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"point" => Ok(Self::Point),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant3Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant3Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant4Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant4Domain {
Array(::std::vec::Vec<ScaleVariant4DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant4DomainArrayItem>> for ScaleVariant4Domain {
fn from(value: ::std::vec::Vec<ScaleVariant4DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant4Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant4Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant4DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant4DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant4DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant4DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant4DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant4DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant4DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant4DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant4DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant4DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant4Nice`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant4Nice {
Boolean(bool),
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for ScaleVariant4Nice {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant4Nice {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant4Nice {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant4Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant4Range {
Variant0(ScaleVariant4RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant4RangeVariant1Item>),
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extent: ::std::option::Option<ScaleVariant4RangeVariant2Extent>,
scheme: ScaleVariant4RangeVariant2Scheme,
},
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant4RangeVariant0> for ScaleVariant4Range {
fn from(value: ScaleVariant4RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant4RangeVariant1Item>> for ScaleVariant4Range {
fn from(value: ::std::vec::Vec<ScaleVariant4RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant4Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant4RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant4RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant4RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant4RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant4RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant4RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant4RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant4RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant4RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant4RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant4RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant4RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant4RangeVariant2Extent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant4RangeVariant2Extent {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ScaleVariant4RangeVariant2Extent {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant4RangeVariant2Extent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant4RangeVariant2Scheme`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant4RangeVariant2Scheme {
String(::std::string::String),
Array(::std::vec::Vec<ScaleVariant4RangeVariant2SchemeArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant4RangeVariant2SchemeArrayItem>>
for ScaleVariant4RangeVariant2Scheme
{
fn from(value: ::std::vec::Vec<ScaleVariant4RangeVariant2SchemeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant4RangeVariant2Scheme {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant4RangeVariant2SchemeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant4RangeVariant2SchemeArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ScaleVariant4RangeVariant2SchemeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant4Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant4Type {
#[serde(rename = "quantize")]
Quantize,
#[serde(rename = "threshold")]
Threshold,
}
impl ::std::fmt::Display for ScaleVariant4Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Quantize => f.write_str("quantize"),
Self::Threshold => f.write_str("threshold"),
}
}
}
impl ::std::str::FromStr for ScaleVariant4Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"quantize" => Ok(Self::Quantize),
"threshold" => Ok(Self::Threshold),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant4Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant4Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant5Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant5Domain {
Array(::std::vec::Vec<ScaleVariant5DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant5DomainArrayItem>> for ScaleVariant5Domain {
fn from(value: ::std::vec::Vec<ScaleVariant5DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant5Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant5Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant5DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant5DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant5DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant5DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant5DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant5DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant5DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant5DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant5DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant5DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant5Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant5Range {
Variant0(ScaleVariant5RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant5RangeVariant1Item>),
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extent: ::std::option::Option<ScaleVariant5RangeVariant2Extent>,
scheme: ScaleVariant5RangeVariant2Scheme,
},
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant5RangeVariant0> for ScaleVariant5Range {
fn from(value: ScaleVariant5RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant5RangeVariant1Item>> for ScaleVariant5Range {
fn from(value: ::std::vec::Vec<ScaleVariant5RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant5Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant5RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant5RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant5RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant5RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant5RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant5RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant5RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant5RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant5RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant5RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant5RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant5RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant5RangeVariant2Extent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant5RangeVariant2Extent {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ScaleVariant5RangeVariant2Extent {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant5RangeVariant2Extent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant5RangeVariant2Scheme`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant5RangeVariant2Scheme {
String(::std::string::String),
Array(::std::vec::Vec<ScaleVariant5RangeVariant2SchemeArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant5RangeVariant2SchemeArrayItem>>
for ScaleVariant5RangeVariant2Scheme
{
fn from(value: ::std::vec::Vec<ScaleVariant5RangeVariant2SchemeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant5RangeVariant2Scheme {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant5RangeVariant2SchemeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant5RangeVariant2SchemeArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ScaleVariant5RangeVariant2SchemeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant5Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant5Type {
#[serde(rename = "quantile")]
Quantile,
}
impl ::std::fmt::Display for ScaleVariant5Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Quantile => f.write_str("quantile"),
}
}
}
impl ::std::str::FromStr for ScaleVariant5Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"quantile" => Ok(Self::Quantile),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant5Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant5Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant6Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant6Domain {
Array(::std::vec::Vec<ScaleVariant6DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant6DomainArrayItem>> for ScaleVariant6Domain {
fn from(value: ::std::vec::Vec<ScaleVariant6DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant6Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant6Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant6DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant6DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant6DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant6DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant6DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant6DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant6DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant6DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant6DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant6DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant6Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant6Range {
Variant0(ScaleVariant6RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant6RangeVariant1Item>),
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extent: ::std::option::Option<ScaleVariant6RangeVariant2Extent>,
scheme: ScaleVariant6RangeVariant2Scheme,
},
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant6RangeVariant0> for ScaleVariant6Range {
fn from(value: ScaleVariant6RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant6RangeVariant1Item>> for ScaleVariant6Range {
fn from(value: ::std::vec::Vec<ScaleVariant6RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant6Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant6RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant6RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant6RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant6RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant6RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant6RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant6RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant6RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant6RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant6RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant6RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant6RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant6RangeVariant2Extent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant6RangeVariant2Extent {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ScaleVariant6RangeVariant2Extent {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant6RangeVariant2Extent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant6RangeVariant2Scheme`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant6RangeVariant2Scheme {
String(::std::string::String),
Array(::std::vec::Vec<ScaleVariant6RangeVariant2SchemeArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant6RangeVariant2SchemeArrayItem>>
for ScaleVariant6RangeVariant2Scheme
{
fn from(value: ::std::vec::Vec<ScaleVariant6RangeVariant2SchemeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant6RangeVariant2Scheme {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant6RangeVariant2SchemeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant6RangeVariant2SchemeArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ScaleVariant6RangeVariant2SchemeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant6Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant6Type {
#[serde(rename = "bin-ordinal")]
BinOrdinal,
}
impl ::std::fmt::Display for ScaleVariant6Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::BinOrdinal => f.write_str("bin-ordinal"),
}
}
}
impl ::std::str::FromStr for ScaleVariant6Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"bin-ordinal" => Ok(Self::BinOrdinal),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant6Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant6Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant7Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant7Domain {
Array(::std::vec::Vec<ScaleVariant7DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant7DomainArrayItem>> for ScaleVariant7Domain {
fn from(value: ::std::vec::Vec<ScaleVariant7DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant7Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant7Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant7DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant7DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant7DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant7DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant7DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant7DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant7DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant7DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant7DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant7DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant7Nice`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant7Nice {
Variant0(bool),
Variant1(ScaleVariant7NiceVariant1),
Variant2 {
interval: ScaleVariant7NiceVariant2Interval,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
step: ::std::option::Option<NumberOrSignal>,
},
}
impl ::std::convert::From<bool> for ScaleVariant7Nice {
fn from(value: bool) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<ScaleVariant7NiceVariant1> for ScaleVariant7Nice {
fn from(value: ScaleVariant7NiceVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`ScaleVariant7NiceVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant7NiceVariant1 {
#[serde(rename = "millisecond")]
Millisecond,
#[serde(rename = "second")]
Second,
#[serde(rename = "minute")]
Minute,
#[serde(rename = "hour")]
Hour,
#[serde(rename = "day")]
Day,
#[serde(rename = "week")]
Week,
#[serde(rename = "month")]
Month,
#[serde(rename = "year")]
Year,
}
impl ::std::fmt::Display for ScaleVariant7NiceVariant1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Millisecond => f.write_str("millisecond"),
Self::Second => f.write_str("second"),
Self::Minute => f.write_str("minute"),
Self::Hour => f.write_str("hour"),
Self::Day => f.write_str("day"),
Self::Week => f.write_str("week"),
Self::Month => f.write_str("month"),
Self::Year => f.write_str("year"),
}
}
}
impl ::std::str::FromStr for ScaleVariant7NiceVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"millisecond" => Ok(Self::Millisecond),
"second" => Ok(Self::Second),
"minute" => Ok(Self::Minute),
"hour" => Ok(Self::Hour),
"day" => Ok(Self::Day),
"week" => Ok(Self::Week),
"month" => Ok(Self::Month),
"year" => Ok(Self::Year),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant7NiceVariant1 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant7NiceVariant1 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant7NiceVariant2Interval`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant7NiceVariant2Interval {
Variant0(ScaleVariant7NiceVariant2IntervalVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<ScaleVariant7NiceVariant2IntervalVariant0>
for ScaleVariant7NiceVariant2Interval
{
fn from(value: ScaleVariant7NiceVariant2IntervalVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant7NiceVariant2Interval {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`ScaleVariant7NiceVariant2IntervalVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant7NiceVariant2IntervalVariant0 {
#[serde(rename = "millisecond")]
Millisecond,
#[serde(rename = "second")]
Second,
#[serde(rename = "minute")]
Minute,
#[serde(rename = "hour")]
Hour,
#[serde(rename = "day")]
Day,
#[serde(rename = "week")]
Week,
#[serde(rename = "month")]
Month,
#[serde(rename = "year")]
Year,
}
impl ::std::fmt::Display for ScaleVariant7NiceVariant2IntervalVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Millisecond => f.write_str("millisecond"),
Self::Second => f.write_str("second"),
Self::Minute => f.write_str("minute"),
Self::Hour => f.write_str("hour"),
Self::Day => f.write_str("day"),
Self::Week => f.write_str("week"),
Self::Month => f.write_str("month"),
Self::Year => f.write_str("year"),
}
}
}
impl ::std::str::FromStr for ScaleVariant7NiceVariant2IntervalVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"millisecond" => Ok(Self::Millisecond),
"second" => Ok(Self::Second),
"minute" => Ok(Self::Minute),
"hour" => Ok(Self::Hour),
"day" => Ok(Self::Day),
"week" => Ok(Self::Week),
"month" => Ok(Self::Month),
"year" => Ok(Self::Year),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant7NiceVariant2IntervalVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant7NiceVariant2IntervalVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant7Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant7Range {
Variant0(ScaleVariant7RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant7RangeVariant1Item>),
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extent: ::std::option::Option<ScaleVariant7RangeVariant2Extent>,
scheme: ScaleVariant7RangeVariant2Scheme,
},
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant7RangeVariant0> for ScaleVariant7Range {
fn from(value: ScaleVariant7RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant7RangeVariant1Item>> for ScaleVariant7Range {
fn from(value: ::std::vec::Vec<ScaleVariant7RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant7Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant7RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant7RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant7RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant7RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant7RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant7RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant7RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant7RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant7RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant7RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant7RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant7RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant7RangeVariant2Extent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant7RangeVariant2Extent {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ScaleVariant7RangeVariant2Extent {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant7RangeVariant2Extent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant7RangeVariant2Scheme`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant7RangeVariant2Scheme {
String(::std::string::String),
Array(::std::vec::Vec<ScaleVariant7RangeVariant2SchemeArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant7RangeVariant2SchemeArrayItem>>
for ScaleVariant7RangeVariant2Scheme
{
fn from(value: ::std::vec::Vec<ScaleVariant7RangeVariant2SchemeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant7RangeVariant2Scheme {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant7RangeVariant2SchemeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant7RangeVariant2SchemeArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ScaleVariant7RangeVariant2SchemeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant7Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant7Type {
#[serde(rename = "time")]
Time,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for ScaleVariant7Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Time => f.write_str("time"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for ScaleVariant7Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"time" => Ok(Self::Time),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant7Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant7Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant8Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant8Domain {
Array(::std::vec::Vec<ScaleVariant8DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant8DomainArrayItem>> for ScaleVariant8Domain {
fn from(value: ::std::vec::Vec<ScaleVariant8DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant8Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant8Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant8DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant8DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant8DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant8DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant8DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant8DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant8DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant8DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant8DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant8DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant8Nice`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant8Nice {
Boolean(bool),
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for ScaleVariant8Nice {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant8Nice {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant8Nice {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant8Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant8Range {
Variant0(ScaleVariant8RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant8RangeVariant1Item>),
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extent: ::std::option::Option<ScaleVariant8RangeVariant2Extent>,
scheme: ScaleVariant8RangeVariant2Scheme,
},
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant8RangeVariant0> for ScaleVariant8Range {
fn from(value: ScaleVariant8RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant8RangeVariant1Item>> for ScaleVariant8Range {
fn from(value: ::std::vec::Vec<ScaleVariant8RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant8Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant8RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant8RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant8RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant8RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant8RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant8RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant8RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant8RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant8RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant8RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant8RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant8RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant8RangeVariant2Extent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant8RangeVariant2Extent {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ScaleVariant8RangeVariant2Extent {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant8RangeVariant2Extent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant8RangeVariant2Scheme`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant8RangeVariant2Scheme {
String(::std::string::String),
Array(::std::vec::Vec<ScaleVariant8RangeVariant2SchemeArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant8RangeVariant2SchemeArrayItem>>
for ScaleVariant8RangeVariant2Scheme
{
fn from(value: ::std::vec::Vec<ScaleVariant8RangeVariant2SchemeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant8RangeVariant2Scheme {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant8RangeVariant2SchemeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant8RangeVariant2SchemeArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ScaleVariant8RangeVariant2SchemeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant8Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant8Type {
#[serde(rename = "linear")]
Linear,
#[serde(rename = "sqrt")]
Sqrt,
#[serde(rename = "sequential")]
Sequential,
}
impl ::std::fmt::Display for ScaleVariant8Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Linear => f.write_str("linear"),
Self::Sqrt => f.write_str("sqrt"),
Self::Sequential => f.write_str("sequential"),
}
}
}
impl ::std::str::FromStr for ScaleVariant8Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"linear" => Ok(Self::Linear),
"sqrt" => Ok(Self::Sqrt),
"sequential" => Ok(Self::Sequential),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant8Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant8Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant9Domain`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant9Domain {
Array(::std::vec::Vec<ScaleVariant9DomainArrayItem>),
ScaleData(ScaleData),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant9DomainArrayItem>> for ScaleVariant9Domain {
fn from(value: ::std::vec::Vec<ScaleVariant9DomainArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<ScaleData> for ScaleVariant9Domain {
fn from(value: ScaleData) -> Self {
Self::ScaleData(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant9Domain {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant9DomainArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant9DomainArrayItem {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant9DomainArrayItem {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant9DomainArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant9DomainArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant9DomainArrayItem {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant9DomainRaw`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant9DomainRaw {
Null,
Array(::std::vec::Vec<::serde_json::Value>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<::serde_json::Value>> for ScaleVariant9DomainRaw {
fn from(value: ::std::vec::Vec<::serde_json::Value>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant9DomainRaw {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant9Nice`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant9Nice {
Boolean(bool),
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for ScaleVariant9Nice {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant9Nice {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant9Nice {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant9Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum ScaleVariant9Range {
Variant0(ScaleVariant9RangeVariant0),
Variant1(::std::vec::Vec<ScaleVariant9RangeVariant1Item>),
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
count: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
extent: ::std::option::Option<ScaleVariant9RangeVariant2Extent>,
scheme: ScaleVariant9RangeVariant2Scheme,
},
Variant3(SignalRef),
}
impl ::std::convert::From<ScaleVariant9RangeVariant0> for ScaleVariant9Range {
fn from(value: ScaleVariant9RangeVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant9RangeVariant1Item>> for ScaleVariant9Range {
fn from(value: ::std::vec::Vec<ScaleVariant9RangeVariant1Item>) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant9Range {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`ScaleVariant9RangeVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant9RangeVariant0 {
#[serde(rename = "width")]
Width,
#[serde(rename = "height")]
Height,
#[serde(rename = "symbol")]
Symbol,
#[serde(rename = "category")]
Category,
#[serde(rename = "ordinal")]
Ordinal,
#[serde(rename = "ramp")]
Ramp,
#[serde(rename = "diverging")]
Diverging,
#[serde(rename = "heatmap")]
Heatmap,
}
impl ::std::fmt::Display for ScaleVariant9RangeVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Width => f.write_str("width"),
Self::Height => f.write_str("height"),
Self::Symbol => f.write_str("symbol"),
Self::Category => f.write_str("category"),
Self::Ordinal => f.write_str("ordinal"),
Self::Ramp => f.write_str("ramp"),
Self::Diverging => f.write_str("diverging"),
Self::Heatmap => f.write_str("heatmap"),
}
}
}
impl ::std::str::FromStr for ScaleVariant9RangeVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"width" => Ok(Self::Width),
"height" => Ok(Self::Height),
"symbol" => Ok(Self::Symbol),
"category" => Ok(Self::Category),
"ordinal" => Ok(Self::Ordinal),
"ramp" => Ok(Self::Ramp),
"diverging" => Ok(Self::Diverging),
"heatmap" => Ok(Self::Heatmap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant9RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant9RangeVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ScaleVariant9RangeVariant1Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant9RangeVariant1Item {
Null,
Boolean(bool),
String(::std::string::String),
Number(f64),
SignalRef(SignalRef),
Array(::std::vec::Vec<NumberOrSignal>),
}
impl ::std::convert::From<bool> for ScaleVariant9RangeVariant1Item {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<f64> for ScaleVariant9RangeVariant1Item {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant9RangeVariant1Item {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<::std::vec::Vec<NumberOrSignal>> for ScaleVariant9RangeVariant1Item {
fn from(value: ::std::vec::Vec<NumberOrSignal>) -> Self {
Self::Array(value)
}
}
#[doc = "`ScaleVariant9RangeVariant2Extent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant9RangeVariant2Extent {
Array([NumberOrSignal; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[NumberOrSignal; 2usize]> for ScaleVariant9RangeVariant2Extent {
fn from(value: [NumberOrSignal; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant9RangeVariant2Extent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant9RangeVariant2Scheme`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant9RangeVariant2Scheme {
String(::std::string::String),
Array(::std::vec::Vec<ScaleVariant9RangeVariant2SchemeArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<ScaleVariant9RangeVariant2SchemeArrayItem>>
for ScaleVariant9RangeVariant2Scheme
{
fn from(value: ::std::vec::Vec<ScaleVariant9RangeVariant2SchemeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for ScaleVariant9RangeVariant2Scheme {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant9RangeVariant2SchemeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScaleVariant9RangeVariant2SchemeArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for ScaleVariant9RangeVariant2SchemeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`ScaleVariant9Type`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ScaleVariant9Type {
#[serde(rename = "log")]
Log,
}
impl ::std::fmt::Display for ScaleVariant9Type {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Log => f.write_str("log"),
}
}
}
impl ::std::str::FromStr for ScaleVariant9Type {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"log" => Ok(Self::Log),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ScaleVariant9Type {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ScaleVariant9Type {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Scope`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct Scope {
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub axes: ::std::vec::Vec<Axis>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub data: ::std::vec::Vec<Data>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub encode: ::std::option::Option<Encode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub layout: ::std::option::Option<Layout>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub legends: ::std::vec::Vec<Legend>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub marks: ::std::vec::Vec<ScopeMarksItem>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub projections: ::std::vec::Vec<Projection>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub scales: ::std::vec::Vec<Scale>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub signals: ::std::vec::Vec<Signal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<Title>,
#[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
pub usermeta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
}
#[doc = "`ScopeMarksItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ScopeMarksItem {
Group(MarkGroup),
Visual(MarkVisual),
}
impl ::std::convert::From<MarkGroup> for ScopeMarksItem {
fn from(value: MarkGroup) -> Self {
Self::Group(value)
}
}
impl ::std::convert::From<MarkVisual> for ScopeMarksItem {
fn from(value: MarkVisual) -> Self {
Self::Visual(value)
}
}
#[doc = "`Selector`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(transparent)]
pub struct Selector(pub ::std::string::String);
impl ::std::ops::Deref for Selector {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<Selector> for ::std::string::String {
fn from(value: Selector) -> Self {
value.0
}
}
impl ::std::convert::From<::std::string::String> for Selector {
fn from(value: ::std::string::String) -> Self {
Self(value)
}
}
impl ::std::fmt::Display for Selector {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
self.0.fmt(f)
}
}
impl ::std::str::FromStr for Selector {
type Err = ::std::convert::Infallible;
fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
Ok(Self(value.to_string()))
}
}
#[doc = "`SequenceTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SequenceTransform {
#[serde(rename = "as", default = "defaults::sequence_transform_as")]
pub as_: SequenceTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
pub start: SequenceTransformStart,
#[serde(default = "defaults::sequence_transform_step")]
pub step: SequenceTransformStep,
pub stop: SequenceTransformStop,
#[serde(rename = "type")]
pub type_: SequenceTransformType,
}
#[doc = "`SequenceTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SequenceTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for SequenceTransformAs {
fn default() -> Self {
SequenceTransformAs::String("data".to_string())
}
}
impl ::std::convert::From<SignalRef> for SequenceTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`SequenceTransformStart`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SequenceTransformStart {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for SequenceTransformStart {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for SequenceTransformStart {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`SequenceTransformStep`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SequenceTransformStep {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for SequenceTransformStep {
fn default() -> Self {
SequenceTransformStep::Number(1_f64)
}
}
impl ::std::convert::From<f64> for SequenceTransformStep {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for SequenceTransformStep {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`SequenceTransformStop`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SequenceTransformStop {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for SequenceTransformStop {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for SequenceTransformStop {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`SequenceTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SequenceTransformType {
#[serde(rename = "sequence")]
Sequence,
}
impl ::std::fmt::Display for SequenceTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Sequence => f.write_str("sequence"),
}
}
}
impl ::std::str::FromStr for SequenceTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"sequence" => Ok(Self::Sequence),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SequenceTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SequenceTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Signal`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Signal {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
name: SignalName,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
on: ::std::option::Option<OnEvents>,
push: SignalVariant0Push,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bind: ::std::option::Option<Bind>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
name: SignalName,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
on: ::std::option::Option<OnEvents>,
#[serde(default = "defaults::default_bool::<true>")]
react: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
update: ::std::option::Option<ExprString>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
value: ::std::option::Option<::serde_json::Value>,
},
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
bind: ::std::option::Option<Bind>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
description: ::std::option::Option<::std::string::String>,
init: ExprString,
name: SignalName,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
on: ::std::option::Option<OnEvents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
value: ::std::option::Option<::serde_json::Value>,
},
}
#[doc = "`SignalName`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct SignalName(::std::string::String);
impl ::std::ops::Deref for SignalName {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<SignalName> for ::std::string::String {
fn from(value: SignalName) -> Self {
value.0
}
}
impl ::std::convert::TryFrom<::std::string::String> for SignalName {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
if [
"parent".to_string(),
"datum".to_string(),
"event".to_string(),
"item".to_string(),
]
.contains(&value)
{
Err("invalid value".into())
} else {
Ok(Self(value))
}
}
}
impl<'de> ::serde::Deserialize<'de> for SignalName {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
Self::try_from(<::std::string::String>::deserialize(deserializer)?)
.map_err(|e| <D::Error as ::serde::de::Error>::custom(e.to_string()))
}
}
#[doc = "`SignalRef`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct SignalRef {
pub signal: ::std::string::String,
}
#[doc = "`SignalVariant0Push`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SignalVariant0Push {
#[serde(rename = "outer")]
Outer,
}
impl ::std::fmt::Display for SignalVariant0Push {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Outer => f.write_str("outer"),
}
}
}
impl ::std::str::FromStr for SignalVariant0Push {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"outer" => Ok(Self::Outer),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SignalVariant0Push {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SignalVariant0Push {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SortOrder`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SortOrder {
Variant0(SortOrderVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<SortOrderVariant0> for SortOrder {
fn from(value: SortOrderVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for SortOrder {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`SortOrderVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SortOrderVariant0 {
#[serde(rename = "ascending")]
Ascending,
#[serde(rename = "descending")]
Descending,
}
impl ::std::fmt::Display for SortOrderVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Ascending => f.write_str("ascending"),
Self::Descending => f.write_str("descending"),
}
}
}
impl ::std::str::FromStr for SortOrderVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"ascending" => Ok(Self::Ascending),
"descending" => Ok(Self::Descending),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SortOrderVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SortOrderVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StackTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StackTransform {
#[serde(rename = "as", default = "defaults::stack_transform_as")]
pub as_: StackTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub field: ::std::option::Option<StackTransformField>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<StackTransformGroupby>,
#[serde(default = "defaults::stack_transform_offset")]
pub offset: StackTransformOffset,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(rename = "type")]
pub type_: StackTransformType,
}
#[doc = "`StackTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StackTransformAs {
Array([StackTransformAsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for StackTransformAs {
fn default() -> Self {
StackTransformAs::Array([
StackTransformAsArrayItem::String("y0".to_string()),
StackTransformAsArrayItem::String("y1".to_string()),
])
}
}
impl ::std::convert::From<[StackTransformAsArrayItem; 2usize]> for StackTransformAs {
fn from(value: [StackTransformAsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for StackTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`StackTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StackTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for StackTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`StackTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StackTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for StackTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for StackTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for StackTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`StackTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StackTransformGroupby {
Array(::std::vec::Vec<StackTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<StackTransformGroupbyArrayItem>>
for StackTransformGroupby
{
fn from(value: ::std::vec::Vec<StackTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for StackTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`StackTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StackTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for StackTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for StackTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for StackTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`StackTransformOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StackTransformOffset {
Variant0(StackTransformOffsetVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for StackTransformOffset {
fn default() -> Self {
StackTransformOffset::Variant0(StackTransformOffsetVariant0::Zero)
}
}
impl ::std::convert::From<StackTransformOffsetVariant0> for StackTransformOffset {
fn from(value: StackTransformOffsetVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for StackTransformOffset {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`StackTransformOffsetVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StackTransformOffsetVariant0 {
#[serde(rename = "zero")]
Zero,
#[serde(rename = "center")]
Center,
#[serde(rename = "normalize")]
Normalize,
}
impl ::std::fmt::Display for StackTransformOffsetVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Zero => f.write_str("zero"),
Self::Center => f.write_str("center"),
Self::Normalize => f.write_str("normalize"),
}
}
}
impl ::std::str::FromStr for StackTransformOffsetVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"zero" => Ok(Self::Zero),
"center" => Ok(Self::Center),
"normalize" => Ok(Self::Normalize),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StackTransformOffsetVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for StackTransformOffsetVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StackTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StackTransformType {
#[serde(rename = "stack")]
Stack,
}
impl ::std::fmt::Display for StackTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Stack => f.write_str("stack"),
}
}
}
impl ::std::str::FromStr for StackTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"stack" => Ok(Self::Stack),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StackTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for StackTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StratifyTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StratifyTransform {
pub key: StratifyTransformKey,
#[serde(rename = "parentKey")]
pub parent_key: StratifyTransformParentKey,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: StratifyTransformType,
}
#[doc = "`StratifyTransformKey`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StratifyTransformKey {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for StratifyTransformKey {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for StratifyTransformKey {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for StratifyTransformKey {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`StratifyTransformParentKey`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StratifyTransformParentKey {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for StratifyTransformParentKey {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for StratifyTransformParentKey {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for StratifyTransformParentKey {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`StratifyTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StratifyTransformType {
#[serde(rename = "stratify")]
Stratify,
}
impl ::std::fmt::Display for StratifyTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Stratify => f.write_str("stratify"),
}
}
}
impl ::std::str::FromStr for StratifyTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"stratify" => Ok(Self::Stratify),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StratifyTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for StratifyTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Stream`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Stream {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
between: ::std::option::Option<[::std::boxed::Box<Stream>; 2usize]>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
consume: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
debounce: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
filter: ::std::option::Option<StreamVariant0Filter>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
markname: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
marktype: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
source: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
throttle: ::std::option::Option<f64>,
#[serde(rename = "type")]
type_: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
between: ::std::option::Option<[::std::boxed::Box<Stream>; 2usize]>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
consume: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
debounce: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
filter: ::std::option::Option<StreamVariant1Filter>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
markname: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
marktype: ::std::option::Option<::std::string::String>,
stream: ::std::boxed::Box<Stream>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
throttle: ::std::option::Option<f64>,
},
Variant2 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
between: ::std::option::Option<[::std::boxed::Box<Stream>; 2usize]>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
consume: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
debounce: ::std::option::Option<f64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
filter: ::std::option::Option<StreamVariant2Filter>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
markname: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
marktype: ::std::option::Option<::std::string::String>,
merge: ::std::vec::Vec<Stream>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
throttle: ::std::option::Option<f64>,
},
}
#[doc = "`StreamVariant0Filter`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StreamVariant0Filter {
ExprString(ExprString),
Array(::std::vec::Vec<ExprString>),
}
impl ::std::convert::From<ExprString> for StreamVariant0Filter {
fn from(value: ExprString) -> Self {
Self::ExprString(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ExprString>> for StreamVariant0Filter {
fn from(value: ::std::vec::Vec<ExprString>) -> Self {
Self::Array(value)
}
}
#[doc = "`StreamVariant1Filter`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StreamVariant1Filter {
ExprString(ExprString),
Array(::std::vec::Vec<ExprString>),
}
impl ::std::convert::From<ExprString> for StreamVariant1Filter {
fn from(value: ExprString) -> Self {
Self::ExprString(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ExprString>> for StreamVariant1Filter {
fn from(value: ::std::vec::Vec<ExprString>) -> Self {
Self::Array(value)
}
}
#[doc = "`StreamVariant2Filter`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StreamVariant2Filter {
ExprString(ExprString),
Array(::std::vec::Vec<ExprString>),
}
impl ::std::convert::From<ExprString> for StreamVariant2Filter {
fn from(value: ExprString) -> Self {
Self::ExprString(value)
}
}
impl ::std::convert::From<::std::vec::Vec<ExprString>> for StreamVariant2Filter {
fn from(value: ::std::vec::Vec<ExprString>) -> Self {
Self::Array(value)
}
}
#[doc = "`StringModifiers`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct StringModifiers {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub scale: ::std::option::Option<Field>,
}
#[doc = "`StringOrSignal`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StringOrSignal {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for StringOrSignal {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`StringValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StringValue {
Variant0(::std::vec::Vec<StringValueVariant0Item>),
Variant1(StringValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<StringValueVariant0Item>> for StringValue {
fn from(value: ::std::vec::Vec<StringValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StringValueVariant1> for StringValue {
fn from(value: StringValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`StringValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StringValueVariant0Item {
Variant0(StringValueVariant0ItemVariant0),
Variant1(StringValueVariant0ItemVariant1),
Variant2(StringValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<StringValueVariant0ItemVariant0> for StringValueVariant0Item {
fn from(value: StringValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StringValueVariant0ItemVariant1> for StringValueVariant0Item {
fn from(value: StringValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<StringValueVariant0ItemVariant2> for StringValueVariant0Item {
fn from(value: StringValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`StringValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StringValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: ::std::string::String,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: StringValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`StringValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StringValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for StringValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for StringValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for StringValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for StringValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for StringValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for StringValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`StringValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StringValueVariant0ItemVariant1 {}
#[doc = "`StringValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StringValueVariant0ItemVariant2 {}
#[doc = "`StringValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StringValueVariant1 {
Variant0(StringValueVariant1Variant0),
Variant1(StringValueVariant1Variant1),
Variant2(StringValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<StringValueVariant1Variant0> for StringValueVariant1 {
fn from(value: StringValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StringValueVariant1Variant1> for StringValueVariant1 {
fn from(value: StringValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<StringValueVariant1Variant2> for StringValueVariant1 {
fn from(value: StringValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`StringValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StringValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: ::std::string::String,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: StringValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`StringValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StringValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for StringValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for StringValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for StringValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for StringValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for StringValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for StringValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`StringValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StringValueVariant1Variant1 {}
#[doc = "`StringValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StringValueVariant1Variant2 {}
#[doc = "`StrokeCapValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeCapValue {
Variant0(::std::vec::Vec<StrokeCapValueVariant0Item>),
Variant1(StrokeCapValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<StrokeCapValueVariant0Item>> for StrokeCapValue {
fn from(value: ::std::vec::Vec<StrokeCapValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StrokeCapValueVariant1> for StrokeCapValue {
fn from(value: StrokeCapValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`StrokeCapValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeCapValueVariant0Item {
Variant0(StrokeCapValueVariant0ItemVariant0),
Variant1(StrokeCapValueVariant0ItemVariant1),
Variant2(StrokeCapValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<StrokeCapValueVariant0ItemVariant0> for StrokeCapValueVariant0Item {
fn from(value: StrokeCapValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StrokeCapValueVariant0ItemVariant1> for StrokeCapValueVariant0Item {
fn from(value: StrokeCapValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<StrokeCapValueVariant0ItemVariant2> for StrokeCapValueVariant0Item {
fn from(value: StrokeCapValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`StrokeCapValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeCapValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: StrokeCapValueVariant0ItemVariant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: StrokeCapValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`StrokeCapValueVariant0ItemVariant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StrokeCapValueVariant0ItemVariant0Variant1Value {
#[serde(rename = "butt")]
Butt,
#[serde(rename = "round")]
Round,
#[serde(rename = "square")]
Square,
}
impl ::std::fmt::Display for StrokeCapValueVariant0ItemVariant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Butt => f.write_str("butt"),
Self::Round => f.write_str("round"),
Self::Square => f.write_str("square"),
}
}
}
impl ::std::str::FromStr for StrokeCapValueVariant0ItemVariant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"butt" => Ok(Self::Butt),
"round" => Ok(Self::Round),
"square" => Ok(Self::Square),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StrokeCapValueVariant0ItemVariant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for StrokeCapValueVariant0ItemVariant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StrokeCapValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeCapValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for StrokeCapValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for StrokeCapValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for StrokeCapValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for StrokeCapValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for StrokeCapValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for StrokeCapValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`StrokeCapValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StrokeCapValueVariant0ItemVariant1 {}
#[doc = "`StrokeCapValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StrokeCapValueVariant0ItemVariant2 {}
#[doc = "`StrokeCapValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeCapValueVariant1 {
Variant0(StrokeCapValueVariant1Variant0),
Variant1(StrokeCapValueVariant1Variant1),
Variant2(StrokeCapValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<StrokeCapValueVariant1Variant0> for StrokeCapValueVariant1 {
fn from(value: StrokeCapValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StrokeCapValueVariant1Variant1> for StrokeCapValueVariant1 {
fn from(value: StrokeCapValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<StrokeCapValueVariant1Variant2> for StrokeCapValueVariant1 {
fn from(value: StrokeCapValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`StrokeCapValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeCapValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: StrokeCapValueVariant1Variant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: StrokeCapValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`StrokeCapValueVariant1Variant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StrokeCapValueVariant1Variant0Variant1Value {
#[serde(rename = "butt")]
Butt,
#[serde(rename = "round")]
Round,
#[serde(rename = "square")]
Square,
}
impl ::std::fmt::Display for StrokeCapValueVariant1Variant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Butt => f.write_str("butt"),
Self::Round => f.write_str("round"),
Self::Square => f.write_str("square"),
}
}
}
impl ::std::str::FromStr for StrokeCapValueVariant1Variant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"butt" => Ok(Self::Butt),
"round" => Ok(Self::Round),
"square" => Ok(Self::Square),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StrokeCapValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for StrokeCapValueVariant1Variant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StrokeCapValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeCapValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for StrokeCapValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for StrokeCapValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for StrokeCapValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for StrokeCapValueVariant1Variant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for StrokeCapValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for StrokeCapValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`StrokeCapValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StrokeCapValueVariant1Variant1 {}
#[doc = "`StrokeCapValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StrokeCapValueVariant1Variant2 {}
#[doc = "`StrokeJoinValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeJoinValue {
Variant0(::std::vec::Vec<StrokeJoinValueVariant0Item>),
Variant1(StrokeJoinValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<StrokeJoinValueVariant0Item>> for StrokeJoinValue {
fn from(value: ::std::vec::Vec<StrokeJoinValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StrokeJoinValueVariant1> for StrokeJoinValue {
fn from(value: StrokeJoinValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`StrokeJoinValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeJoinValueVariant0Item {
Variant0(StrokeJoinValueVariant0ItemVariant0),
Variant1(StrokeJoinValueVariant0ItemVariant1),
Variant2(StrokeJoinValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<StrokeJoinValueVariant0ItemVariant0> for StrokeJoinValueVariant0Item {
fn from(value: StrokeJoinValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StrokeJoinValueVariant0ItemVariant1> for StrokeJoinValueVariant0Item {
fn from(value: StrokeJoinValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<StrokeJoinValueVariant0ItemVariant2> for StrokeJoinValueVariant0Item {
fn from(value: StrokeJoinValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`StrokeJoinValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeJoinValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: StrokeJoinValueVariant0ItemVariant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: StrokeJoinValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`StrokeJoinValueVariant0ItemVariant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StrokeJoinValueVariant0ItemVariant0Variant1Value {
#[serde(rename = "miter")]
Miter,
#[serde(rename = "round")]
Round,
#[serde(rename = "bevel")]
Bevel,
}
impl ::std::fmt::Display for StrokeJoinValueVariant0ItemVariant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Miter => f.write_str("miter"),
Self::Round => f.write_str("round"),
Self::Bevel => f.write_str("bevel"),
}
}
}
impl ::std::str::FromStr for StrokeJoinValueVariant0ItemVariant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"miter" => Ok(Self::Miter),
"round" => Ok(Self::Round),
"bevel" => Ok(Self::Bevel),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StrokeJoinValueVariant0ItemVariant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for StrokeJoinValueVariant0ItemVariant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StrokeJoinValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeJoinValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for StrokeJoinValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for StrokeJoinValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for StrokeJoinValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for StrokeJoinValueVariant0ItemVariant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for StrokeJoinValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for StrokeJoinValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`StrokeJoinValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StrokeJoinValueVariant0ItemVariant1 {}
#[doc = "`StrokeJoinValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StrokeJoinValueVariant0ItemVariant2 {}
#[doc = "`StrokeJoinValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeJoinValueVariant1 {
Variant0(StrokeJoinValueVariant1Variant0),
Variant1(StrokeJoinValueVariant1Variant1),
Variant2(StrokeJoinValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<StrokeJoinValueVariant1Variant0> for StrokeJoinValueVariant1 {
fn from(value: StrokeJoinValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StrokeJoinValueVariant1Variant1> for StrokeJoinValueVariant1 {
fn from(value: StrokeJoinValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<StrokeJoinValueVariant1Variant2> for StrokeJoinValueVariant1 {
fn from(value: StrokeJoinValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`StrokeJoinValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeJoinValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: StrokeJoinValueVariant1Variant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: StrokeJoinValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`StrokeJoinValueVariant1Variant0Variant1Value`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StrokeJoinValueVariant1Variant0Variant1Value {
#[serde(rename = "miter")]
Miter,
#[serde(rename = "round")]
Round,
#[serde(rename = "bevel")]
Bevel,
}
impl ::std::fmt::Display for StrokeJoinValueVariant1Variant0Variant1Value {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Miter => f.write_str("miter"),
Self::Round => f.write_str("round"),
Self::Bevel => f.write_str("bevel"),
}
}
}
impl ::std::str::FromStr for StrokeJoinValueVariant1Variant0Variant1Value {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"miter" => Ok(Self::Miter),
"round" => Ok(Self::Round),
"bevel" => Ok(Self::Bevel),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StrokeJoinValueVariant1Variant0Variant1Value {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for StrokeJoinValueVariant1Variant0Variant1Value
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StrokeJoinValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StrokeJoinValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for StrokeJoinValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for StrokeJoinValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for StrokeJoinValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for StrokeJoinValueVariant1Variant0Variant3Range
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for StrokeJoinValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for StrokeJoinValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`StrokeJoinValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StrokeJoinValueVariant1Variant1 {}
#[doc = "`StrokeJoinValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum StrokeJoinValueVariant1Variant2 {}
#[doc = "`Style`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Style {
String(::std::string::String),
Array(::std::vec::Vec<::std::string::String>),
}
impl ::std::convert::From<::std::vec::Vec<::std::string::String>> for Style {
fn from(value: ::std::vec::Vec<::std::string::String>) -> Self {
Self::Array(value)
}
}
#[doc = "`TextOrSignal`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextOrSignal {
Variant0(TextOrSignalVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<TextOrSignalVariant0> for TextOrSignal {
fn from(value: TextOrSignalVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for TextOrSignal {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TextOrSignalVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextOrSignalVariant0 {
String(::std::string::String),
Array(::std::vec::Vec<::std::string::String>),
}
impl ::std::convert::From<::std::vec::Vec<::std::string::String>> for TextOrSignalVariant0 {
fn from(value: ::std::vec::Vec<::std::string::String>) -> Self {
Self::Array(value)
}
}
#[doc = "`TextValue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextValue {
Variant0(::std::vec::Vec<TextValueVariant0Item>),
Variant1(TextValueVariant1),
}
impl ::std::convert::From<::std::vec::Vec<TextValueVariant0Item>> for TextValue {
fn from(value: ::std::vec::Vec<TextValueVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<TextValueVariant1> for TextValue {
fn from(value: TextValueVariant1) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TextValueVariant0Item`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextValueVariant0Item {
Variant0(TextValueVariant0ItemVariant0),
Variant1(TextValueVariant0ItemVariant1),
Variant2(TextValueVariant0ItemVariant2),
Variant3 {
offset: ::serde_json::Value,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
impl ::std::convert::From<TextValueVariant0ItemVariant0> for TextValueVariant0Item {
fn from(value: TextValueVariant0ItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<TextValueVariant0ItemVariant1> for TextValueVariant0Item {
fn from(value: TextValueVariant0ItemVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<TextValueVariant0ItemVariant2> for TextValueVariant0Item {
fn from(value: TextValueVariant0ItemVariant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`TextValueVariant0ItemVariant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextValueVariant0ItemVariant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
value: TextValueVariant0ItemVariant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
Variant3 {
range: TextValueVariant0ItemVariant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
test: ::std::option::Option<::std::string::String>,
},
}
#[doc = "`TextValueVariant0ItemVariant0Variant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextValueVariant0ItemVariant0Variant1Value {
String(::std::string::String),
Array(::std::vec::Vec<::std::string::String>),
}
impl ::std::convert::From<::std::vec::Vec<::std::string::String>>
for TextValueVariant0ItemVariant0Variant1Value
{
fn from(value: ::std::vec::Vec<::std::string::String>) -> Self {
Self::Array(value)
}
}
#[doc = "`TextValueVariant0ItemVariant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextValueVariant0ItemVariant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for TextValueVariant0ItemVariant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for TextValueVariant0ItemVariant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for TextValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TextValueVariant0ItemVariant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for TextValueVariant0ItemVariant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for TextValueVariant0ItemVariant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`TextValueVariant0ItemVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum TextValueVariant0ItemVariant1 {}
#[doc = "`TextValueVariant0ItemVariant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum TextValueVariant0ItemVariant2 {}
#[doc = "`TextValueVariant1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextValueVariant1 {
Variant0(TextValueVariant1Variant0),
Variant1(TextValueVariant1Variant1),
Variant2(TextValueVariant1Variant2),
Variant3 { offset: ::serde_json::Value },
}
impl ::std::convert::From<TextValueVariant1Variant0> for TextValueVariant1 {
fn from(value: TextValueVariant1Variant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<TextValueVariant1Variant1> for TextValueVariant1 {
fn from(value: TextValueVariant1Variant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<TextValueVariant1Variant2> for TextValueVariant1 {
fn from(value: TextValueVariant1Variant2) -> Self {
Self::Variant2(value)
}
}
#[doc = "`TextValueVariant1Variant0`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextValueVariant1Variant0 {
Variant0 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
signal: ::std::string::String,
},
Variant1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
value: TextValueVariant1Variant0Variant1Value,
},
Variant2 {
field: Field,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
Variant3 {
range: TextValueVariant1Variant0Variant3Range,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
scale: ::std::option::Option<Field>,
},
}
#[doc = "`TextValueVariant1Variant0Variant1Value`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextValueVariant1Variant0Variant1Value {
String(::std::string::String),
Array(::std::vec::Vec<::std::string::String>),
}
impl ::std::convert::From<::std::vec::Vec<::std::string::String>>
for TextValueVariant1Variant0Variant1Value
{
fn from(value: ::std::vec::Vec<::std::string::String>) -> Self {
Self::Array(value)
}
}
#[doc = "`TextValueVariant1Variant0Variant3Range`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TextValueVariant1Variant0Variant3Range {
Number(f64),
Boolean(bool),
}
impl ::std::fmt::Display for TextValueVariant1Variant0Variant3Range {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Number(x) => x.fmt(f),
Self::Boolean(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for TextValueVariant1Variant0Variant3Range {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Number(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Boolean(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for TextValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TextValueVariant1Variant0Variant3Range {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<f64> for TextValueVariant1Variant0Variant3Range {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<bool> for TextValueVariant1Variant0Variant3Range {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
#[doc = "`TextValueVariant1Variant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum TextValueVariant1Variant1 {}
#[doc = "`TextValueVariant1Variant2`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
#[serde(deny_unknown_fields)]
pub enum TextValueVariant1Variant2 {}
#[doc = "`TickBand`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TickBand {
Variant0(TickBandVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<TickBandVariant0> for TickBand {
fn from(value: TickBandVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for TickBand {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TickBandVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TickBandVariant0 {
#[serde(rename = "center")]
Center,
#[serde(rename = "extent")]
Extent,
}
impl ::std::fmt::Display for TickBandVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Center => f.write_str("center"),
Self::Extent => f.write_str("extent"),
}
}
}
impl ::std::str::FromStr for TickBandVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"center" => Ok(Self::Center),
"extent" => Ok(Self::Extent),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TickBandVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TickBandVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TickCount`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum TickCount {
Variant0(f64),
Variant1(TickCountVariant1),
Variant2 {
interval: TickCountVariant2Interval,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
step: ::std::option::Option<NumberOrSignal>,
},
Variant3(SignalRef),
}
impl ::std::convert::From<f64> for TickCount {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<TickCountVariant1> for TickCount {
fn from(value: TickCountVariant1) -> Self {
Self::Variant1(value)
}
}
impl ::std::convert::From<SignalRef> for TickCount {
fn from(value: SignalRef) -> Self {
Self::Variant3(value)
}
}
#[doc = "`TickCountVariant1`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TickCountVariant1 {
#[serde(rename = "millisecond")]
Millisecond,
#[serde(rename = "second")]
Second,
#[serde(rename = "minute")]
Minute,
#[serde(rename = "hour")]
Hour,
#[serde(rename = "day")]
Day,
#[serde(rename = "week")]
Week,
#[serde(rename = "month")]
Month,
#[serde(rename = "year")]
Year,
}
impl ::std::fmt::Display for TickCountVariant1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Millisecond => f.write_str("millisecond"),
Self::Second => f.write_str("second"),
Self::Minute => f.write_str("minute"),
Self::Hour => f.write_str("hour"),
Self::Day => f.write_str("day"),
Self::Week => f.write_str("week"),
Self::Month => f.write_str("month"),
Self::Year => f.write_str("year"),
}
}
}
impl ::std::str::FromStr for TickCountVariant1 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"millisecond" => Ok(Self::Millisecond),
"second" => Ok(Self::Second),
"minute" => Ok(Self::Minute),
"hour" => Ok(Self::Hour),
"day" => Ok(Self::Day),
"week" => Ok(Self::Week),
"month" => Ok(Self::Month),
"year" => Ok(Self::Year),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TickCountVariant1 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TickCountVariant1 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TickCountVariant2Interval`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TickCountVariant2Interval {
Variant0(TickCountVariant2IntervalVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<TickCountVariant2IntervalVariant0> for TickCountVariant2Interval {
fn from(value: TickCountVariant2IntervalVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for TickCountVariant2Interval {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TickCountVariant2IntervalVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TickCountVariant2IntervalVariant0 {
#[serde(rename = "millisecond")]
Millisecond,
#[serde(rename = "second")]
Second,
#[serde(rename = "minute")]
Minute,
#[serde(rename = "hour")]
Hour,
#[serde(rename = "day")]
Day,
#[serde(rename = "week")]
Week,
#[serde(rename = "month")]
Month,
#[serde(rename = "year")]
Year,
}
impl ::std::fmt::Display for TickCountVariant2IntervalVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Millisecond => f.write_str("millisecond"),
Self::Second => f.write_str("second"),
Self::Minute => f.write_str("minute"),
Self::Hour => f.write_str("hour"),
Self::Day => f.write_str("day"),
Self::Week => f.write_str("week"),
Self::Month => f.write_str("month"),
Self::Year => f.write_str("year"),
}
}
}
impl ::std::str::FromStr for TickCountVariant2IntervalVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"millisecond" => Ok(Self::Millisecond),
"second" => Ok(Self::Second),
"minute" => Ok(Self::Minute),
"hour" => Ok(Self::Hour),
"day" => Ok(Self::Day),
"week" => Ok(Self::Week),
"month" => Ok(Self::Month),
"year" => Ok(Self::Year),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TickCountVariant2IntervalVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TickCountVariant2IntervalVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TimeunitTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TimeunitTransform {
#[serde(rename = "as", default = "defaults::timeunit_transform_as")]
pub as_: TimeunitTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub extent: ::std::option::Option<TimeunitTransformExtent>,
pub field: TimeunitTransformField,
#[serde(default = "defaults::timeunit_transform_interval")]
pub interval: TimeunitTransformInterval,
#[serde(default = "defaults::timeunit_transform_maxbins")]
pub maxbins: TimeunitTransformMaxbins,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(default = "defaults::timeunit_transform_step")]
pub step: TimeunitTransformStep,
#[serde(default = "defaults::timeunit_transform_timezone")]
pub timezone: TimeunitTransformTimezone,
#[serde(rename = "type")]
pub type_: TimeunitTransformType,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub units: ::std::option::Option<TimeunitTransformUnits>,
}
#[doc = "`TimeunitTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformAs {
Array([TimeunitTransformAsArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for TimeunitTransformAs {
fn default() -> Self {
TimeunitTransformAs::Array([
TimeunitTransformAsArrayItem::String("unit0".to_string()),
TimeunitTransformAsArrayItem::String("unit1".to_string()),
])
}
}
impl ::std::convert::From<[TimeunitTransformAsArrayItem; 2usize]> for TimeunitTransformAs {
fn from(value: [TimeunitTransformAsArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for TimeunitTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TimeunitTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for TimeunitTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TimeunitTransformExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformExtent {
Array(::std::vec::Vec<TimeunitTransformExtentArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<TimeunitTransformExtentArrayItem>>
for TimeunitTransformExtent
{
fn from(value: ::std::vec::Vec<TimeunitTransformExtentArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for TimeunitTransformExtent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TimeunitTransformExtentArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformExtentArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TimeunitTransformExtentArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TimeunitTransformExtentArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TimeunitTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for TimeunitTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for TimeunitTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for TimeunitTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`TimeunitTransformInterval`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformInterval {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::default::Default for TimeunitTransformInterval {
fn default() -> Self {
TimeunitTransformInterval::Boolean(true)
}
}
impl ::std::convert::From<bool> for TimeunitTransformInterval {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for TimeunitTransformInterval {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TimeunitTransformMaxbins`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformMaxbins {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for TimeunitTransformMaxbins {
fn default() -> Self {
TimeunitTransformMaxbins::Number(40_f64)
}
}
impl ::std::convert::From<f64> for TimeunitTransformMaxbins {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TimeunitTransformMaxbins {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TimeunitTransformStep`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformStep {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for TimeunitTransformStep {
fn default() -> Self {
TimeunitTransformStep::Number(1_f64)
}
}
impl ::std::convert::From<f64> for TimeunitTransformStep {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TimeunitTransformStep {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TimeunitTransformTimezone`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformTimezone {
Variant0(TimeunitTransformTimezoneVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for TimeunitTransformTimezone {
fn default() -> Self {
TimeunitTransformTimezone::Variant0(TimeunitTransformTimezoneVariant0::Local)
}
}
impl ::std::convert::From<TimeunitTransformTimezoneVariant0> for TimeunitTransformTimezone {
fn from(value: TimeunitTransformTimezoneVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for TimeunitTransformTimezone {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TimeunitTransformTimezoneVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TimeunitTransformTimezoneVariant0 {
#[serde(rename = "local")]
Local,
#[serde(rename = "utc")]
Utc,
}
impl ::std::fmt::Display for TimeunitTransformTimezoneVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Local => f.write_str("local"),
Self::Utc => f.write_str("utc"),
}
}
}
impl ::std::str::FromStr for TimeunitTransformTimezoneVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"local" => Ok(Self::Local),
"utc" => Ok(Self::Utc),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TimeunitTransformTimezoneVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TimeunitTransformTimezoneVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TimeunitTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TimeunitTransformType {
#[serde(rename = "timeunit")]
Timeunit,
}
impl ::std::fmt::Display for TimeunitTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Timeunit => f.write_str("timeunit"),
}
}
}
impl ::std::str::FromStr for TimeunitTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"timeunit" => Ok(Self::Timeunit),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TimeunitTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TimeunitTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TimeunitTransformUnits`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformUnits {
Array(::std::vec::Vec<TimeunitTransformUnitsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<TimeunitTransformUnitsArrayItem>>
for TimeunitTransformUnits
{
fn from(value: ::std::vec::Vec<TimeunitTransformUnitsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for TimeunitTransformUnits {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TimeunitTransformUnitsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TimeunitTransformUnitsArrayItem {
Variant0(TimeunitTransformUnitsArrayItemVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<TimeunitTransformUnitsArrayItemVariant0>
for TimeunitTransformUnitsArrayItem
{
fn from(value: TimeunitTransformUnitsArrayItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for TimeunitTransformUnitsArrayItem {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TimeunitTransformUnitsArrayItemVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TimeunitTransformUnitsArrayItemVariant0 {
#[serde(rename = "year")]
Year,
#[serde(rename = "quarter")]
Quarter,
#[serde(rename = "month")]
Month,
#[serde(rename = "week")]
Week,
#[serde(rename = "date")]
Date,
#[serde(rename = "day")]
Day,
#[serde(rename = "dayofyear")]
Dayofyear,
#[serde(rename = "hours")]
Hours,
#[serde(rename = "minutes")]
Minutes,
#[serde(rename = "seconds")]
Seconds,
#[serde(rename = "milliseconds")]
Milliseconds,
}
impl ::std::fmt::Display for TimeunitTransformUnitsArrayItemVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Year => f.write_str("year"),
Self::Quarter => f.write_str("quarter"),
Self::Month => f.write_str("month"),
Self::Week => f.write_str("week"),
Self::Date => f.write_str("date"),
Self::Day => f.write_str("day"),
Self::Dayofyear => f.write_str("dayofyear"),
Self::Hours => f.write_str("hours"),
Self::Minutes => f.write_str("minutes"),
Self::Seconds => f.write_str("seconds"),
Self::Milliseconds => f.write_str("milliseconds"),
}
}
}
impl ::std::str::FromStr for TimeunitTransformUnitsArrayItemVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"year" => Ok(Self::Year),
"quarter" => Ok(Self::Quarter),
"month" => Ok(Self::Month),
"week" => Ok(Self::Week),
"date" => Ok(Self::Date),
"day" => Ok(Self::Day),
"dayofyear" => Ok(Self::Dayofyear),
"hours" => Ok(Self::Hours),
"minutes" => Ok(Self::Minutes),
"seconds" => Ok(Self::Seconds),
"milliseconds" => Ok(Self::Milliseconds),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TimeunitTransformUnitsArrayItemVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TimeunitTransformUnitsArrayItemVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Title`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum Title {
String(::std::string::String),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
align: ::std::option::Option<TitleObjectAlign>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
anchor: ::std::option::Option<TitleObjectAnchor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
angle: ::std::option::Option<TitleObjectAngle>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
aria: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
baseline: ::std::option::Option<TitleObjectBaseline>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
color: ::std::option::Option<TitleObjectColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
dx: ::std::option::Option<TitleObjectDx>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
dy: ::std::option::Option<TitleObjectDy>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
encode: ::std::option::Option<TitleObjectEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
font: ::std::option::Option<TitleObjectFont>,
#[serde(
rename = "fontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
font_size: ::std::option::Option<TitleObjectFontSize>,
#[serde(
rename = "fontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
font_style: ::std::option::Option<TitleObjectFontStyle>,
#[serde(
rename = "fontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
font_weight: ::std::option::Option<TitleObjectFontWeight>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
frame: ::std::option::Option<TitleObjectFrame>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
interactive: ::std::option::Option<bool>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
limit: ::std::option::Option<TitleObjectLimit>,
#[serde(
rename = "lineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
line_height: ::std::option::Option<TitleObjectLineHeight>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
name: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
offset: ::std::option::Option<TitleObjectOffset>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
orient: ::std::option::Option<TitleObjectOrient>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
style: ::std::option::Option<Style>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
subtitle: ::std::option::Option<TextOrSignal>,
#[serde(
rename = "subtitleColor",
skip_serializing_if = "::std::option::Option::is_none"
)]
subtitle_color: ::std::option::Option<TitleObjectSubtitleColor>,
#[serde(
rename = "subtitleFont",
skip_serializing_if = "::std::option::Option::is_none"
)]
subtitle_font: ::std::option::Option<TitleObjectSubtitleFont>,
#[serde(
rename = "subtitleFontSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
subtitle_font_size: ::std::option::Option<TitleObjectSubtitleFontSize>,
#[serde(
rename = "subtitleFontStyle",
skip_serializing_if = "::std::option::Option::is_none"
)]
subtitle_font_style: ::std::option::Option<TitleObjectSubtitleFontStyle>,
#[serde(
rename = "subtitleFontWeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
subtitle_font_weight: ::std::option::Option<TitleObjectSubtitleFontWeight>,
#[serde(
rename = "subtitleLineHeight",
skip_serializing_if = "::std::option::Option::is_none"
)]
subtitle_line_height: ::std::option::Option<TitleObjectSubtitleLineHeight>,
#[serde(
rename = "subtitlePadding",
skip_serializing_if = "::std::option::Option::is_none"
)]
subtitle_padding: ::std::option::Option<NumberOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
text: ::std::option::Option<TextOrSignal>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
zindex: ::std::option::Option<f64>,
},
}
#[doc = "`TitleObjectAlign`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectAlign {
Variant0(TitleObjectAlignVariant0),
Variant1(AlignValue),
}
impl ::std::convert::From<TitleObjectAlignVariant0> for TitleObjectAlign {
fn from(value: TitleObjectAlignVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AlignValue> for TitleObjectAlign {
fn from(value: AlignValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectAlignVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TitleObjectAlignVariant0 {
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "center")]
Center,
}
impl ::std::fmt::Display for TitleObjectAlignVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Center => f.write_str("center"),
}
}
}
impl ::std::str::FromStr for TitleObjectAlignVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"center" => Ok(Self::Center),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TitleObjectAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TitleObjectAlignVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TitleObjectAnchor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectAnchor {
Variant0(::std::option::Option<TitleObjectAnchorVariant0>),
Variant1(AnchorValue),
}
impl ::std::convert::From<::std::option::Option<TitleObjectAnchorVariant0>> for TitleObjectAnchor {
fn from(value: ::std::option::Option<TitleObjectAnchorVariant0>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<AnchorValue> for TitleObjectAnchor {
fn from(value: AnchorValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectAnchorVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TitleObjectAnchorVariant0 {
#[serde(rename = "start")]
Start,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "end")]
End,
}
impl ::std::fmt::Display for TitleObjectAnchorVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Start => f.write_str("start"),
Self::Middle => f.write_str("middle"),
Self::End => f.write_str("end"),
}
}
}
impl ::std::str::FromStr for TitleObjectAnchorVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"start" => Ok(Self::Start),
"middle" => Ok(Self::Middle),
"end" => Ok(Self::End),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TitleObjectAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TitleObjectAnchorVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TitleObjectAngle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectAngle {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for TitleObjectAngle {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for TitleObjectAngle {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectBaseline`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectBaseline {
Variant0(TitleObjectBaselineVariant0),
Variant1(BaselineValue),
}
impl ::std::convert::From<TitleObjectBaselineVariant0> for TitleObjectBaseline {
fn from(value: TitleObjectBaselineVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<BaselineValue> for TitleObjectBaseline {
fn from(value: BaselineValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectBaselineVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TitleObjectBaselineVariant0 {
#[serde(rename = "top")]
Top,
#[serde(rename = "middle")]
Middle,
#[serde(rename = "bottom")]
Bottom,
#[serde(rename = "alphabetic")]
Alphabetic,
#[serde(rename = "line-top")]
LineTop,
#[serde(rename = "line-bottom")]
LineBottom,
}
impl ::std::fmt::Display for TitleObjectBaselineVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Top => f.write_str("top"),
Self::Middle => f.write_str("middle"),
Self::Bottom => f.write_str("bottom"),
Self::Alphabetic => f.write_str("alphabetic"),
Self::LineTop => f.write_str("line-top"),
Self::LineBottom => f.write_str("line-bottom"),
}
}
}
impl ::std::str::FromStr for TitleObjectBaselineVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"top" => Ok(Self::Top),
"middle" => Ok(Self::Middle),
"bottom" => Ok(Self::Bottom),
"alphabetic" => Ok(Self::Alphabetic),
"line-top" => Ok(Self::LineTop),
"line-bottom" => Ok(Self::LineBottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TitleObjectBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TitleObjectBaselineVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TitleObjectColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for TitleObjectColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`TitleObjectDx`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectDx {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for TitleObjectDx {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for TitleObjectDx {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectDy`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectDy {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for TitleObjectDy {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for TitleObjectDy {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectEncode`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct TitleObjectEncode {
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
pub subtype_0: ::std::option::Option<
::std::collections::HashMap<TitleObjectEncodeSubtype0Key, EncodeEntry>,
>,
#[serde(flatten, skip_serializing_if = "::std::option::Option::is_none")]
pub subtype_1: ::std::option::Option<TitleObjectEncodeSubtype1>,
}
#[doc = "`TitleObjectEncodeSubtype0Key`"]
#[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct TitleObjectEncodeSubtype0Key(::std::string::String);
impl ::std::ops::Deref for TitleObjectEncodeSubtype0Key {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<TitleObjectEncodeSubtype0Key> for ::std::string::String {
fn from(value: TitleObjectEncodeSubtype0Key) -> Self {
value.0
}
}
impl ::std::str::FromStr for TitleObjectEncodeSubtype0Key {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| {
::regress::Regex::new("^(?!interactive|name|style).+$").unwrap()
});
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^(?!interactive|name|style).+$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str> for TitleObjectEncodeSubtype0Key {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TitleObjectEncodeSubtype0Key {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de> for TitleObjectEncodeSubtype0Key {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
#[doc = "`TitleObjectEncodeSubtype1`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct TitleObjectEncodeSubtype1 {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub group: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub subtitle: ::std::option::Option<GuideEncode>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<GuideEncode>,
}
#[doc = "`TitleObjectFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for TitleObjectFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for TitleObjectFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for TitleObjectFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for TitleObjectFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for TitleObjectFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for TitleObjectFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectFrame`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectFrame {
Variant0(TitleObjectFrameVariant0),
Variant1(StringValue),
}
impl ::std::convert::From<TitleObjectFrameVariant0> for TitleObjectFrame {
fn from(value: TitleObjectFrameVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<StringValue> for TitleObjectFrame {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectFrameVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TitleObjectFrameVariant0 {
#[serde(rename = "group")]
Group,
#[serde(rename = "bounds")]
Bounds,
}
impl ::std::fmt::Display for TitleObjectFrameVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Group => f.write_str("group"),
Self::Bounds => f.write_str("bounds"),
}
}
}
impl ::std::str::FromStr for TitleObjectFrameVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"group" => Ok(Self::Group),
"bounds" => Ok(Self::Bounds),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TitleObjectFrameVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TitleObjectFrameVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TitleObjectLimit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectLimit {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for TitleObjectLimit {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for TitleObjectLimit {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for TitleObjectLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for TitleObjectLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectOffset`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectOffset {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for TitleObjectOffset {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for TitleObjectOffset {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectOrient`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectOrient {
Variant0(TitleObjectOrientVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<TitleObjectOrientVariant0> for TitleObjectOrient {
fn from(value: TitleObjectOrientVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for TitleObjectOrient {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectOrientVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TitleObjectOrientVariant0 {
#[serde(rename = "none")]
None,
#[serde(rename = "left")]
Left,
#[serde(rename = "right")]
Right,
#[serde(rename = "top")]
Top,
#[serde(rename = "bottom")]
Bottom,
}
impl ::std::fmt::Display for TitleObjectOrientVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Left => f.write_str("left"),
Self::Right => f.write_str("right"),
Self::Top => f.write_str("top"),
Self::Bottom => f.write_str("bottom"),
}
}
}
impl ::std::str::FromStr for TitleObjectOrientVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"left" => Ok(Self::Left),
"right" => Ok(Self::Right),
"top" => Ok(Self::Top),
"bottom" => Ok(Self::Bottom),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TitleObjectOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TitleObjectOrientVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TitleObjectSubtitleColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectSubtitleColor {
Null,
String(::std::string::String),
ColorValue(ColorValue),
}
impl ::std::convert::From<ColorValue> for TitleObjectSubtitleColor {
fn from(value: ColorValue) -> Self {
Self::ColorValue(value)
}
}
#[doc = "`TitleObjectSubtitleFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectSubtitleFont {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for TitleObjectSubtitleFont {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectSubtitleFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectSubtitleFontSize {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for TitleObjectSubtitleFontSize {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for TitleObjectSubtitleFontSize {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectSubtitleFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectSubtitleFontStyle {
Variant0(::std::string::String),
Variant1(StringValue),
}
impl ::std::convert::From<StringValue> for TitleObjectSubtitleFontStyle {
fn from(value: StringValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectSubtitleFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectSubtitleFontWeight {
Variant0(MyEnum),
Variant1(FontWeightValue),
}
impl ::std::convert::From<MyEnum> for TitleObjectSubtitleFontWeight {
fn from(value: MyEnum) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<FontWeightValue> for TitleObjectSubtitleFontWeight {
fn from(value: FontWeightValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TitleObjectSubtitleLineHeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TitleObjectSubtitleLineHeight {
Variant0(f64),
Variant1(NumberValue),
}
impl ::std::convert::From<f64> for TitleObjectSubtitleLineHeight {
fn from(value: f64) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<NumberValue> for TitleObjectSubtitleLineHeight {
fn from(value: NumberValue) -> Self {
Self::Variant1(value)
}
}
#[doc = "`Transform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Transform {
CrossfilterTransform(CrossfilterTransform),
ResolvefilterTransform(ResolvefilterTransform),
LinkpathTransform(LinkpathTransform),
PieTransform(PieTransform),
StackTransform(StackTransform),
ForceTransform(ForceTransform),
ContourTransform(ContourTransform),
GeojsonTransform(GeojsonTransform),
GeopathTransform(GeopathTransform),
GeopointTransform(GeopointTransform),
GeoshapeTransform(GeoshapeTransform),
GraticuleTransform(GraticuleTransform),
HeatmapTransform(HeatmapTransform),
IsocontourTransform(IsocontourTransform),
Kde2dTransform(Kde2dTransform),
NestTransform(NestTransform),
PackTransform(PackTransform),
PartitionTransform(PartitionTransform),
StratifyTransform(StratifyTransform),
TreeTransform(TreeTransform),
TreelinksTransform(TreelinksTransform),
TreemapTransform(TreemapTransform),
LabelTransform(LabelTransform),
LoessTransform(LoessTransform),
RegressionTransform(RegressionTransform),
AggregateTransform(AggregateTransform),
BinTransform(BinTransform),
CollectTransform(CollectTransform),
CountpatternTransform(CountpatternTransform),
CrossTransform(CrossTransform),
DensityTransform(DensityTransform),
DotbinTransform(DotbinTransform),
ExtentTransform(ExtentTransform),
FilterTransform(FilterTransform),
FlattenTransform(FlattenTransform),
FoldTransform(FoldTransform),
FormulaTransform(FormulaTransform),
ImputeTransform(ImputeTransform),
JoinaggregateTransform(JoinaggregateTransform),
KdeTransform(KdeTransform),
LookupTransform(LookupTransform),
PivotTransform(PivotTransform),
ProjectTransform(ProjectTransform),
QuantileTransform(QuantileTransform),
SampleTransform(SampleTransform),
SequenceTransform(SequenceTransform),
TimeunitTransform(TimeunitTransform),
WindowTransform(WindowTransform),
IdentifierTransform(IdentifierTransform),
VoronoiTransform(VoronoiTransform),
WordcloudTransform(WordcloudTransform),
}
impl ::std::convert::From<CrossfilterTransform> for Transform {
fn from(value: CrossfilterTransform) -> Self {
Self::CrossfilterTransform(value)
}
}
impl ::std::convert::From<ResolvefilterTransform> for Transform {
fn from(value: ResolvefilterTransform) -> Self {
Self::ResolvefilterTransform(value)
}
}
impl ::std::convert::From<LinkpathTransform> for Transform {
fn from(value: LinkpathTransform) -> Self {
Self::LinkpathTransform(value)
}
}
impl ::std::convert::From<PieTransform> for Transform {
fn from(value: PieTransform) -> Self {
Self::PieTransform(value)
}
}
impl ::std::convert::From<StackTransform> for Transform {
fn from(value: StackTransform) -> Self {
Self::StackTransform(value)
}
}
impl ::std::convert::From<ForceTransform> for Transform {
fn from(value: ForceTransform) -> Self {
Self::ForceTransform(value)
}
}
impl ::std::convert::From<ContourTransform> for Transform {
fn from(value: ContourTransform) -> Self {
Self::ContourTransform(value)
}
}
impl ::std::convert::From<GeojsonTransform> for Transform {
fn from(value: GeojsonTransform) -> Self {
Self::GeojsonTransform(value)
}
}
impl ::std::convert::From<GeopathTransform> for Transform {
fn from(value: GeopathTransform) -> Self {
Self::GeopathTransform(value)
}
}
impl ::std::convert::From<GeopointTransform> for Transform {
fn from(value: GeopointTransform) -> Self {
Self::GeopointTransform(value)
}
}
impl ::std::convert::From<GeoshapeTransform> for Transform {
fn from(value: GeoshapeTransform) -> Self {
Self::GeoshapeTransform(value)
}
}
impl ::std::convert::From<GraticuleTransform> for Transform {
fn from(value: GraticuleTransform) -> Self {
Self::GraticuleTransform(value)
}
}
impl ::std::convert::From<HeatmapTransform> for Transform {
fn from(value: HeatmapTransform) -> Self {
Self::HeatmapTransform(value)
}
}
impl ::std::convert::From<IsocontourTransform> for Transform {
fn from(value: IsocontourTransform) -> Self {
Self::IsocontourTransform(value)
}
}
impl ::std::convert::From<Kde2dTransform> for Transform {
fn from(value: Kde2dTransform) -> Self {
Self::Kde2dTransform(value)
}
}
impl ::std::convert::From<NestTransform> for Transform {
fn from(value: NestTransform) -> Self {
Self::NestTransform(value)
}
}
impl ::std::convert::From<PackTransform> for Transform {
fn from(value: PackTransform) -> Self {
Self::PackTransform(value)
}
}
impl ::std::convert::From<PartitionTransform> for Transform {
fn from(value: PartitionTransform) -> Self {
Self::PartitionTransform(value)
}
}
impl ::std::convert::From<StratifyTransform> for Transform {
fn from(value: StratifyTransform) -> Self {
Self::StratifyTransform(value)
}
}
impl ::std::convert::From<TreeTransform> for Transform {
fn from(value: TreeTransform) -> Self {
Self::TreeTransform(value)
}
}
impl ::std::convert::From<TreelinksTransform> for Transform {
fn from(value: TreelinksTransform) -> Self {
Self::TreelinksTransform(value)
}
}
impl ::std::convert::From<TreemapTransform> for Transform {
fn from(value: TreemapTransform) -> Self {
Self::TreemapTransform(value)
}
}
impl ::std::convert::From<LabelTransform> for Transform {
fn from(value: LabelTransform) -> Self {
Self::LabelTransform(value)
}
}
impl ::std::convert::From<LoessTransform> for Transform {
fn from(value: LoessTransform) -> Self {
Self::LoessTransform(value)
}
}
impl ::std::convert::From<RegressionTransform> for Transform {
fn from(value: RegressionTransform) -> Self {
Self::RegressionTransform(value)
}
}
impl ::std::convert::From<AggregateTransform> for Transform {
fn from(value: AggregateTransform) -> Self {
Self::AggregateTransform(value)
}
}
impl ::std::convert::From<BinTransform> for Transform {
fn from(value: BinTransform) -> Self {
Self::BinTransform(value)
}
}
impl ::std::convert::From<CollectTransform> for Transform {
fn from(value: CollectTransform) -> Self {
Self::CollectTransform(value)
}
}
impl ::std::convert::From<CountpatternTransform> for Transform {
fn from(value: CountpatternTransform) -> Self {
Self::CountpatternTransform(value)
}
}
impl ::std::convert::From<CrossTransform> for Transform {
fn from(value: CrossTransform) -> Self {
Self::CrossTransform(value)
}
}
impl ::std::convert::From<DensityTransform> for Transform {
fn from(value: DensityTransform) -> Self {
Self::DensityTransform(value)
}
}
impl ::std::convert::From<DotbinTransform> for Transform {
fn from(value: DotbinTransform) -> Self {
Self::DotbinTransform(value)
}
}
impl ::std::convert::From<ExtentTransform> for Transform {
fn from(value: ExtentTransform) -> Self {
Self::ExtentTransform(value)
}
}
impl ::std::convert::From<FilterTransform> for Transform {
fn from(value: FilterTransform) -> Self {
Self::FilterTransform(value)
}
}
impl ::std::convert::From<FlattenTransform> for Transform {
fn from(value: FlattenTransform) -> Self {
Self::FlattenTransform(value)
}
}
impl ::std::convert::From<FoldTransform> for Transform {
fn from(value: FoldTransform) -> Self {
Self::FoldTransform(value)
}
}
impl ::std::convert::From<FormulaTransform> for Transform {
fn from(value: FormulaTransform) -> Self {
Self::FormulaTransform(value)
}
}
impl ::std::convert::From<ImputeTransform> for Transform {
fn from(value: ImputeTransform) -> Self {
Self::ImputeTransform(value)
}
}
impl ::std::convert::From<JoinaggregateTransform> for Transform {
fn from(value: JoinaggregateTransform) -> Self {
Self::JoinaggregateTransform(value)
}
}
impl ::std::convert::From<KdeTransform> for Transform {
fn from(value: KdeTransform) -> Self {
Self::KdeTransform(value)
}
}
impl ::std::convert::From<LookupTransform> for Transform {
fn from(value: LookupTransform) -> Self {
Self::LookupTransform(value)
}
}
impl ::std::convert::From<PivotTransform> for Transform {
fn from(value: PivotTransform) -> Self {
Self::PivotTransform(value)
}
}
impl ::std::convert::From<ProjectTransform> for Transform {
fn from(value: ProjectTransform) -> Self {
Self::ProjectTransform(value)
}
}
impl ::std::convert::From<QuantileTransform> for Transform {
fn from(value: QuantileTransform) -> Self {
Self::QuantileTransform(value)
}
}
impl ::std::convert::From<SampleTransform> for Transform {
fn from(value: SampleTransform) -> Self {
Self::SampleTransform(value)
}
}
impl ::std::convert::From<SequenceTransform> for Transform {
fn from(value: SequenceTransform) -> Self {
Self::SequenceTransform(value)
}
}
impl ::std::convert::From<TimeunitTransform> for Transform {
fn from(value: TimeunitTransform) -> Self {
Self::TimeunitTransform(value)
}
}
impl ::std::convert::From<WindowTransform> for Transform {
fn from(value: WindowTransform) -> Self {
Self::WindowTransform(value)
}
}
impl ::std::convert::From<IdentifierTransform> for Transform {
fn from(value: IdentifierTransform) -> Self {
Self::IdentifierTransform(value)
}
}
impl ::std::convert::From<VoronoiTransform> for Transform {
fn from(value: VoronoiTransform) -> Self {
Self::VoronoiTransform(value)
}
}
impl ::std::convert::From<WordcloudTransform> for Transform {
fn from(value: WordcloudTransform) -> Self {
Self::WordcloudTransform(value)
}
}
#[doc = "`TransformMark`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TransformMark {
CrossfilterTransform(CrossfilterTransform),
ResolvefilterTransform(ResolvefilterTransform),
LinkpathTransform(LinkpathTransform),
PieTransform(PieTransform),
StackTransform(StackTransform),
ForceTransform(ForceTransform),
GeojsonTransform(GeojsonTransform),
GeopathTransform(GeopathTransform),
GeopointTransform(GeopointTransform),
GeoshapeTransform(GeoshapeTransform),
HeatmapTransform(HeatmapTransform),
PackTransform(PackTransform),
PartitionTransform(PartitionTransform),
StratifyTransform(StratifyTransform),
TreeTransform(TreeTransform),
TreemapTransform(TreemapTransform),
LabelTransform(LabelTransform),
BinTransform(BinTransform),
CollectTransform(CollectTransform),
DotbinTransform(DotbinTransform),
ExtentTransform(ExtentTransform),
FormulaTransform(FormulaTransform),
JoinaggregateTransform(JoinaggregateTransform),
LookupTransform(LookupTransform),
SampleTransform(SampleTransform),
TimeunitTransform(TimeunitTransform),
WindowTransform(WindowTransform),
IdentifierTransform(IdentifierTransform),
VoronoiTransform(VoronoiTransform),
WordcloudTransform(WordcloudTransform),
}
impl ::std::convert::From<CrossfilterTransform> for TransformMark {
fn from(value: CrossfilterTransform) -> Self {
Self::CrossfilterTransform(value)
}
}
impl ::std::convert::From<ResolvefilterTransform> for TransformMark {
fn from(value: ResolvefilterTransform) -> Self {
Self::ResolvefilterTransform(value)
}
}
impl ::std::convert::From<LinkpathTransform> for TransformMark {
fn from(value: LinkpathTransform) -> Self {
Self::LinkpathTransform(value)
}
}
impl ::std::convert::From<PieTransform> for TransformMark {
fn from(value: PieTransform) -> Self {
Self::PieTransform(value)
}
}
impl ::std::convert::From<StackTransform> for TransformMark {
fn from(value: StackTransform) -> Self {
Self::StackTransform(value)
}
}
impl ::std::convert::From<ForceTransform> for TransformMark {
fn from(value: ForceTransform) -> Self {
Self::ForceTransform(value)
}
}
impl ::std::convert::From<GeojsonTransform> for TransformMark {
fn from(value: GeojsonTransform) -> Self {
Self::GeojsonTransform(value)
}
}
impl ::std::convert::From<GeopathTransform> for TransformMark {
fn from(value: GeopathTransform) -> Self {
Self::GeopathTransform(value)
}
}
impl ::std::convert::From<GeopointTransform> for TransformMark {
fn from(value: GeopointTransform) -> Self {
Self::GeopointTransform(value)
}
}
impl ::std::convert::From<GeoshapeTransform> for TransformMark {
fn from(value: GeoshapeTransform) -> Self {
Self::GeoshapeTransform(value)
}
}
impl ::std::convert::From<HeatmapTransform> for TransformMark {
fn from(value: HeatmapTransform) -> Self {
Self::HeatmapTransform(value)
}
}
impl ::std::convert::From<PackTransform> for TransformMark {
fn from(value: PackTransform) -> Self {
Self::PackTransform(value)
}
}
impl ::std::convert::From<PartitionTransform> for TransformMark {
fn from(value: PartitionTransform) -> Self {
Self::PartitionTransform(value)
}
}
impl ::std::convert::From<StratifyTransform> for TransformMark {
fn from(value: StratifyTransform) -> Self {
Self::StratifyTransform(value)
}
}
impl ::std::convert::From<TreeTransform> for TransformMark {
fn from(value: TreeTransform) -> Self {
Self::TreeTransform(value)
}
}
impl ::std::convert::From<TreemapTransform> for TransformMark {
fn from(value: TreemapTransform) -> Self {
Self::TreemapTransform(value)
}
}
impl ::std::convert::From<LabelTransform> for TransformMark {
fn from(value: LabelTransform) -> Self {
Self::LabelTransform(value)
}
}
impl ::std::convert::From<BinTransform> for TransformMark {
fn from(value: BinTransform) -> Self {
Self::BinTransform(value)
}
}
impl ::std::convert::From<CollectTransform> for TransformMark {
fn from(value: CollectTransform) -> Self {
Self::CollectTransform(value)
}
}
impl ::std::convert::From<DotbinTransform> for TransformMark {
fn from(value: DotbinTransform) -> Self {
Self::DotbinTransform(value)
}
}
impl ::std::convert::From<ExtentTransform> for TransformMark {
fn from(value: ExtentTransform) -> Self {
Self::ExtentTransform(value)
}
}
impl ::std::convert::From<FormulaTransform> for TransformMark {
fn from(value: FormulaTransform) -> Self {
Self::FormulaTransform(value)
}
}
impl ::std::convert::From<JoinaggregateTransform> for TransformMark {
fn from(value: JoinaggregateTransform) -> Self {
Self::JoinaggregateTransform(value)
}
}
impl ::std::convert::From<LookupTransform> for TransformMark {
fn from(value: LookupTransform) -> Self {
Self::LookupTransform(value)
}
}
impl ::std::convert::From<SampleTransform> for TransformMark {
fn from(value: SampleTransform) -> Self {
Self::SampleTransform(value)
}
}
impl ::std::convert::From<TimeunitTransform> for TransformMark {
fn from(value: TimeunitTransform) -> Self {
Self::TimeunitTransform(value)
}
}
impl ::std::convert::From<WindowTransform> for TransformMark {
fn from(value: WindowTransform) -> Self {
Self::WindowTransform(value)
}
}
impl ::std::convert::From<IdentifierTransform> for TransformMark {
fn from(value: IdentifierTransform) -> Self {
Self::IdentifierTransform(value)
}
}
impl ::std::convert::From<VoronoiTransform> for TransformMark {
fn from(value: VoronoiTransform) -> Self {
Self::VoronoiTransform(value)
}
}
impl ::std::convert::From<WordcloudTransform> for TransformMark {
fn from(value: WordcloudTransform) -> Self {
Self::WordcloudTransform(value)
}
}
#[doc = "`TreeTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TreeTransform {
#[serde(rename = "as", default = "defaults::tree_transform_as")]
pub as_: TreeTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub field: ::std::option::Option<TreeTransformField>,
#[serde(default = "defaults::tree_transform_method")]
pub method: TreeTransformMethod,
#[serde(
rename = "nodeSize",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub node_size: ::std::option::Option<TreeTransformNodeSize>,
#[serde(default = "defaults::tree_transform_separation")]
pub separation: TreeTransformSeparation,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub size: ::std::option::Option<TreeTransformSize>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(rename = "type")]
pub type_: TreeTransformType,
}
#[doc = "`TreeTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreeTransformAs {
Array([TreeTransformAsArrayItem; 4usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for TreeTransformAs {
fn default() -> Self {
TreeTransformAs::Array([
TreeTransformAsArrayItem::String("x".to_string()),
TreeTransformAsArrayItem::String("y".to_string()),
TreeTransformAsArrayItem::String("depth".to_string()),
TreeTransformAsArrayItem::String("children".to_string()),
])
}
}
impl ::std::convert::From<[TreeTransformAsArrayItem; 4usize]> for TreeTransformAs {
fn from(value: [TreeTransformAsArrayItem; 4usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for TreeTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreeTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreeTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for TreeTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreeTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreeTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for TreeTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for TreeTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for TreeTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`TreeTransformMethod`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreeTransformMethod {
Variant0(TreeTransformMethodVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for TreeTransformMethod {
fn default() -> Self {
TreeTransformMethod::Variant0(TreeTransformMethodVariant0::Tidy)
}
}
impl ::std::convert::From<TreeTransformMethodVariant0> for TreeTransformMethod {
fn from(value: TreeTransformMethodVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for TreeTransformMethod {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TreeTransformMethodVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TreeTransformMethodVariant0 {
#[serde(rename = "tidy")]
Tidy,
#[serde(rename = "cluster")]
Cluster,
}
impl ::std::fmt::Display for TreeTransformMethodVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Tidy => f.write_str("tidy"),
Self::Cluster => f.write_str("cluster"),
}
}
}
impl ::std::str::FromStr for TreeTransformMethodVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"tidy" => Ok(Self::Tidy),
"cluster" => Ok(Self::Cluster),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TreeTransformMethodVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TreeTransformMethodVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TreeTransformNodeSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreeTransformNodeSize {
Array([TreeTransformNodeSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[TreeTransformNodeSizeArrayItem; 2usize]> for TreeTransformNodeSize {
fn from(value: [TreeTransformNodeSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for TreeTransformNodeSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreeTransformNodeSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreeTransformNodeSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreeTransformNodeSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreeTransformNodeSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreeTransformSeparation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreeTransformSeparation {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::default::Default for TreeTransformSeparation {
fn default() -> Self {
TreeTransformSeparation::Boolean(true)
}
}
impl ::std::convert::From<bool> for TreeTransformSeparation {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for TreeTransformSeparation {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreeTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreeTransformSize {
Array([TreeTransformSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[TreeTransformSizeArrayItem; 2usize]> for TreeTransformSize {
fn from(value: [TreeTransformSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for TreeTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreeTransformSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreeTransformSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreeTransformSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreeTransformSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreeTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TreeTransformType {
#[serde(rename = "tree")]
Tree,
}
impl ::std::fmt::Display for TreeTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Tree => f.write_str("tree"),
}
}
}
impl ::std::str::FromStr for TreeTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"tree" => Ok(Self::Tree),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TreeTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TreeTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TreelinksTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TreelinksTransform {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: TreelinksTransformType,
}
#[doc = "`TreelinksTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TreelinksTransformType {
#[serde(rename = "treelinks")]
Treelinks,
}
impl ::std::fmt::Display for TreelinksTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Treelinks => f.write_str("treelinks"),
}
}
}
impl ::std::str::FromStr for TreelinksTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"treelinks" => Ok(Self::Treelinks),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TreelinksTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TreelinksTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TreemapTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TreemapTransform {
#[serde(rename = "as", default = "defaults::treemap_transform_as")]
pub as_: TreemapTransformAs,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub field: ::std::option::Option<TreemapTransformField>,
#[serde(default = "defaults::treemap_transform_method")]
pub method: TreemapTransformMethod,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub padding: ::std::option::Option<TreemapTransformPadding>,
#[serde(
rename = "paddingBottom",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub padding_bottom: ::std::option::Option<TreemapTransformPaddingBottom>,
#[serde(
rename = "paddingInner",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub padding_inner: ::std::option::Option<TreemapTransformPaddingInner>,
#[serde(
rename = "paddingLeft",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub padding_left: ::std::option::Option<TreemapTransformPaddingLeft>,
#[serde(
rename = "paddingOuter",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub padding_outer: ::std::option::Option<TreemapTransformPaddingOuter>,
#[serde(
rename = "paddingRight",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub padding_right: ::std::option::Option<TreemapTransformPaddingRight>,
#[serde(
rename = "paddingTop",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub padding_top: ::std::option::Option<TreemapTransformPaddingTop>,
#[serde(default = "defaults::treemap_transform_ratio")]
pub ratio: TreemapTransformRatio,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub round: ::std::option::Option<TreemapTransformRound>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub size: ::std::option::Option<TreemapTransformSize>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(rename = "type")]
pub type_: TreemapTransformType,
}
#[doc = "`TreemapTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformAs {
Array([TreemapTransformAsArrayItem; 6usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for TreemapTransformAs {
fn default() -> Self {
TreemapTransformAs::Array([
TreemapTransformAsArrayItem::String("x0".to_string()),
TreemapTransformAsArrayItem::String("y0".to_string()),
TreemapTransformAsArrayItem::String("x1".to_string()),
TreemapTransformAsArrayItem::String("y1".to_string()),
TreemapTransformAsArrayItem::String("depth".to_string()),
TreemapTransformAsArrayItem::String("children".to_string()),
])
}
}
impl ::std::convert::From<[TreemapTransformAsArrayItem; 6usize]> for TreemapTransformAs {
fn from(value: [TreemapTransformAsArrayItem; 6usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for TreemapTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformField`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformField {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for TreemapTransformField {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for TreemapTransformField {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for TreemapTransformField {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`TreemapTransformMethod`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformMethod {
Variant0(TreemapTransformMethodVariant0),
Variant1(SignalRef),
}
impl ::std::default::Default for TreemapTransformMethod {
fn default() -> Self {
TreemapTransformMethod::Variant0(TreemapTransformMethodVariant0::Squarify)
}
}
impl ::std::convert::From<TreemapTransformMethodVariant0> for TreemapTransformMethod {
fn from(value: TreemapTransformMethodVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformMethod {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`TreemapTransformMethodVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TreemapTransformMethodVariant0 {
#[serde(rename = "squarify")]
Squarify,
#[serde(rename = "resquarify")]
Resquarify,
#[serde(rename = "binary")]
Binary,
#[serde(rename = "dice")]
Dice,
#[serde(rename = "slice")]
Slice,
#[serde(rename = "slicedice")]
Slicedice,
}
impl ::std::fmt::Display for TreemapTransformMethodVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Squarify => f.write_str("squarify"),
Self::Resquarify => f.write_str("resquarify"),
Self::Binary => f.write_str("binary"),
Self::Dice => f.write_str("dice"),
Self::Slice => f.write_str("slice"),
Self::Slicedice => f.write_str("slicedice"),
}
}
}
impl ::std::str::FromStr for TreemapTransformMethodVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"squarify" => Ok(Self::Squarify),
"resquarify" => Ok(Self::Resquarify),
"binary" => Ok(Self::Binary),
"dice" => Ok(Self::Dice),
"slice" => Ok(Self::Slice),
"slicedice" => Ok(Self::Slicedice),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TreemapTransformMethodVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TreemapTransformMethodVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TreemapTransformPadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformPadding {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreemapTransformPadding {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformPadding {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformPaddingBottom`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformPaddingBottom {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreemapTransformPaddingBottom {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformPaddingBottom {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformPaddingInner`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformPaddingInner {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreemapTransformPaddingInner {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformPaddingInner {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformPaddingLeft`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformPaddingLeft {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreemapTransformPaddingLeft {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformPaddingLeft {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformPaddingOuter`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformPaddingOuter {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreemapTransformPaddingOuter {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformPaddingOuter {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformPaddingRight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformPaddingRight {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreemapTransformPaddingRight {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformPaddingRight {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformPaddingTop`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformPaddingTop {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreemapTransformPaddingTop {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformPaddingTop {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformRatio`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformRatio {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::default::Default for TreemapTransformRatio {
fn default() -> Self {
TreemapTransformRatio::Number(1.618033988749895_f64)
}
}
impl ::std::convert::From<f64> for TreemapTransformRatio {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformRatio {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformRound`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformRound {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for TreemapTransformRound {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformRound {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformSize {
Array([TreemapTransformSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[TreemapTransformSizeArrayItem; 2usize]> for TreemapTransformSize {
fn from(value: [TreemapTransformSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TreemapTransformSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for TreemapTransformSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for TreemapTransformSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`TreemapTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TreemapTransformType {
#[serde(rename = "treemap")]
Treemap,
}
impl ::std::fmt::Display for TreemapTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Treemap => f.write_str("treemap"),
}
}
}
impl ::std::str::FromStr for TreemapTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"treemap" => Ok(Self::Treemap),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TreemapTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TreemapTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`VoronoiTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct VoronoiTransform {
#[serde(rename = "as", default = "defaults::voronoi_transform_as")]
pub as_: VoronoiTransformAs,
#[serde(default = "defaults::voronoi_transform_extent")]
pub extent: VoronoiTransformExtent,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub size: ::std::option::Option<VoronoiTransformSize>,
#[serde(rename = "type")]
pub type_: VoronoiTransformType,
pub x: VoronoiTransformX,
pub y: VoronoiTransformY,
}
#[doc = "`VoronoiTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum VoronoiTransformAs {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::default::Default for VoronoiTransformAs {
fn default() -> Self {
VoronoiTransformAs::String("path".to_string())
}
}
impl ::std::convert::From<SignalRef> for VoronoiTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`VoronoiTransformExtent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum VoronoiTransformExtent {
Array([::serde_json::Value; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for VoronoiTransformExtent {
fn default() -> Self {
VoronoiTransformExtent::Array([
::serde_json::from_str::<::serde_json::Value>("[-100000,-100000]").unwrap(),
::serde_json::from_str::<::serde_json::Value>("[100000,100000]").unwrap(),
])
}
}
impl ::std::convert::From<[::serde_json::Value; 2usize]> for VoronoiTransformExtent {
fn from(value: [::serde_json::Value; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for VoronoiTransformExtent {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`VoronoiTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum VoronoiTransformSize {
Array([VoronoiTransformSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[VoronoiTransformSizeArrayItem; 2usize]> for VoronoiTransformSize {
fn from(value: [VoronoiTransformSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for VoronoiTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`VoronoiTransformSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum VoronoiTransformSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for VoronoiTransformSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for VoronoiTransformSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`VoronoiTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum VoronoiTransformType {
#[serde(rename = "voronoi")]
Voronoi,
}
impl ::std::fmt::Display for VoronoiTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Voronoi => f.write_str("voronoi"),
}
}
}
impl ::std::str::FromStr for VoronoiTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"voronoi" => Ok(Self::Voronoi),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for VoronoiTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for VoronoiTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`VoronoiTransformX`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum VoronoiTransformX {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for VoronoiTransformX {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for VoronoiTransformX {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for VoronoiTransformX {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`VoronoiTransformY`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum VoronoiTransformY {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for VoronoiTransformY {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for VoronoiTransformY {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for VoronoiTransformY {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`WindowTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WindowTransform {
#[serde(rename = "as", skip_serializing_if = "::std::option::Option::is_none")]
pub as_: ::std::option::Option<WindowTransformAs>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub fields: ::std::option::Option<WindowTransformFields>,
#[serde(default = "defaults::window_transform_frame")]
pub frame: WindowTransformFrame,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub groupby: ::std::option::Option<WindowTransformGroupby>,
#[serde(
rename = "ignorePeers",
skip_serializing_if = "::std::option::Option::is_none"
)]
pub ignore_peers: ::std::option::Option<WindowTransformIgnorePeers>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub ops: ::std::option::Option<WindowTransformOps>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub params: ::std::option::Option<WindowTransformParams>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sort: ::std::option::Option<Compare>,
#[serde(rename = "type")]
pub type_: WindowTransformType,
}
#[doc = "`WindowTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformAs {
Array(::std::vec::Vec<WindowTransformAsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<WindowTransformAsArrayItem>> for WindowTransformAs {
fn from(value: ::std::vec::Vec<WindowTransformAsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
Null,
}
impl ::std::convert::From<SignalRef> for WindowTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformFields`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformFields {
Array(::std::vec::Vec<WindowTransformFieldsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<WindowTransformFieldsArrayItem>>
for WindowTransformFields
{
fn from(value: ::std::vec::Vec<WindowTransformFieldsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformFields {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformFieldsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformFieldsArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
Null,
}
impl ::std::convert::From<ScaleField> for WindowTransformFieldsArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for WindowTransformFieldsArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for WindowTransformFieldsArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`WindowTransformFrame`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformFrame {
Array([WindowTransformFrameArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for WindowTransformFrame {
fn default() -> Self {
WindowTransformFrame::Array([
WindowTransformFrameArrayItem::Null,
WindowTransformFrameArrayItem::Number(0_f64),
])
}
}
impl ::std::convert::From<[WindowTransformFrameArrayItem; 2usize]> for WindowTransformFrame {
fn from(value: [WindowTransformFrameArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformFrame {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformFrameArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformFrameArrayItem {
Number(f64),
SignalRef(SignalRef),
Null,
}
impl ::std::convert::From<f64> for WindowTransformFrameArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformFrameArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformGroupby`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformGroupby {
Array(::std::vec::Vec<WindowTransformGroupbyArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<WindowTransformGroupbyArrayItem>>
for WindowTransformGroupby
{
fn from(value: ::std::vec::Vec<WindowTransformGroupbyArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformGroupby {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformGroupbyArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformGroupbyArrayItem {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for WindowTransformGroupbyArrayItem {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for WindowTransformGroupbyArrayItem {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for WindowTransformGroupbyArrayItem {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`WindowTransformIgnorePeers`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformIgnorePeers {
Boolean(bool),
SignalRef(SignalRef),
}
impl ::std::convert::From<bool> for WindowTransformIgnorePeers {
fn from(value: bool) -> Self {
Self::Boolean(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformIgnorePeers {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformOps`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformOps {
Array(::std::vec::Vec<WindowTransformOpsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<WindowTransformOpsArrayItem>> for WindowTransformOps {
fn from(value: ::std::vec::Vec<WindowTransformOpsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformOps {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformOpsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformOpsArrayItem {
Variant0(WindowTransformOpsArrayItemVariant0),
Variant1(SignalRef),
}
impl ::std::convert::From<WindowTransformOpsArrayItemVariant0> for WindowTransformOpsArrayItem {
fn from(value: WindowTransformOpsArrayItemVariant0) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformOpsArrayItem {
fn from(value: SignalRef) -> Self {
Self::Variant1(value)
}
}
#[doc = "`WindowTransformOpsArrayItemVariant0`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WindowTransformOpsArrayItemVariant0 {
#[serde(rename = "row_number")]
RowXnumber,
#[serde(rename = "rank")]
Rank,
#[serde(rename = "dense_rank")]
DenseXrank,
#[serde(rename = "percent_rank")]
PercentXrank,
#[serde(rename = "cume_dist")]
CumeXdist,
#[serde(rename = "ntile")]
Ntile,
#[serde(rename = "lag")]
Lag,
#[serde(rename = "lead")]
Lead,
#[serde(rename = "first_value")]
FirstXvalue,
#[serde(rename = "last_value")]
LastXvalue,
#[serde(rename = "nth_value")]
NthXvalue,
#[serde(rename = "prev_value")]
PrevXvalue,
#[serde(rename = "next_value")]
NextXvalue,
#[serde(rename = "values")]
Values,
#[serde(rename = "count")]
Count,
#[serde(rename = "__count__")]
XXcountXx,
#[serde(rename = "missing")]
Missing,
#[serde(rename = "valid")]
Valid,
#[serde(rename = "sum")]
Sum,
#[serde(rename = "product")]
Product,
#[serde(rename = "mean")]
Mean,
#[serde(rename = "average")]
Average,
#[serde(rename = "variance")]
Variance,
#[serde(rename = "variancep")]
Variancep,
#[serde(rename = "stdev")]
Stdev,
#[serde(rename = "stdevp")]
Stdevp,
#[serde(rename = "stderr")]
Stderr,
#[serde(rename = "distinct")]
Distinct,
#[serde(rename = "ci0")]
Ci0,
#[serde(rename = "ci1")]
Ci1,
#[serde(rename = "median")]
Median,
#[serde(rename = "q1")]
Q1,
#[serde(rename = "q3")]
Q3,
#[serde(rename = "min")]
Min,
#[serde(rename = "max")]
Max,
#[serde(rename = "argmin")]
Argmin,
#[serde(rename = "argmax")]
Argmax,
}
impl ::std::fmt::Display for WindowTransformOpsArrayItemVariant0 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::RowXnumber => f.write_str("row_number"),
Self::Rank => f.write_str("rank"),
Self::DenseXrank => f.write_str("dense_rank"),
Self::PercentXrank => f.write_str("percent_rank"),
Self::CumeXdist => f.write_str("cume_dist"),
Self::Ntile => f.write_str("ntile"),
Self::Lag => f.write_str("lag"),
Self::Lead => f.write_str("lead"),
Self::FirstXvalue => f.write_str("first_value"),
Self::LastXvalue => f.write_str("last_value"),
Self::NthXvalue => f.write_str("nth_value"),
Self::PrevXvalue => f.write_str("prev_value"),
Self::NextXvalue => f.write_str("next_value"),
Self::Values => f.write_str("values"),
Self::Count => f.write_str("count"),
Self::XXcountXx => f.write_str("__count__"),
Self::Missing => f.write_str("missing"),
Self::Valid => f.write_str("valid"),
Self::Sum => f.write_str("sum"),
Self::Product => f.write_str("product"),
Self::Mean => f.write_str("mean"),
Self::Average => f.write_str("average"),
Self::Variance => f.write_str("variance"),
Self::Variancep => f.write_str("variancep"),
Self::Stdev => f.write_str("stdev"),
Self::Stdevp => f.write_str("stdevp"),
Self::Stderr => f.write_str("stderr"),
Self::Distinct => f.write_str("distinct"),
Self::Ci0 => f.write_str("ci0"),
Self::Ci1 => f.write_str("ci1"),
Self::Median => f.write_str("median"),
Self::Q1 => f.write_str("q1"),
Self::Q3 => f.write_str("q3"),
Self::Min => f.write_str("min"),
Self::Max => f.write_str("max"),
Self::Argmin => f.write_str("argmin"),
Self::Argmax => f.write_str("argmax"),
}
}
}
impl ::std::str::FromStr for WindowTransformOpsArrayItemVariant0 {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"row_number" => Ok(Self::RowXnumber),
"rank" => Ok(Self::Rank),
"dense_rank" => Ok(Self::DenseXrank),
"percent_rank" => Ok(Self::PercentXrank),
"cume_dist" => Ok(Self::CumeXdist),
"ntile" => Ok(Self::Ntile),
"lag" => Ok(Self::Lag),
"lead" => Ok(Self::Lead),
"first_value" => Ok(Self::FirstXvalue),
"last_value" => Ok(Self::LastXvalue),
"nth_value" => Ok(Self::NthXvalue),
"prev_value" => Ok(Self::PrevXvalue),
"next_value" => Ok(Self::NextXvalue),
"values" => Ok(Self::Values),
"count" => Ok(Self::Count),
"__count__" => Ok(Self::XXcountXx),
"missing" => Ok(Self::Missing),
"valid" => Ok(Self::Valid),
"sum" => Ok(Self::Sum),
"product" => Ok(Self::Product),
"mean" => Ok(Self::Mean),
"average" => Ok(Self::Average),
"variance" => Ok(Self::Variance),
"variancep" => Ok(Self::Variancep),
"stdev" => Ok(Self::Stdev),
"stdevp" => Ok(Self::Stdevp),
"stderr" => Ok(Self::Stderr),
"distinct" => Ok(Self::Distinct),
"ci0" => Ok(Self::Ci0),
"ci1" => Ok(Self::Ci1),
"median" => Ok(Self::Median),
"q1" => Ok(Self::Q1),
"q3" => Ok(Self::Q3),
"min" => Ok(Self::Min),
"max" => Ok(Self::Max),
"argmin" => Ok(Self::Argmin),
"argmax" => Ok(Self::Argmax),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WindowTransformOpsArrayItemVariant0 {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WindowTransformOpsArrayItemVariant0 {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WindowTransformParams`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformParams {
Array(::std::vec::Vec<WindowTransformParamsArrayItem>),
SignalRef(SignalRef),
}
impl ::std::convert::From<::std::vec::Vec<WindowTransformParamsArrayItem>>
for WindowTransformParams
{
fn from(value: ::std::vec::Vec<WindowTransformParamsArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformParams {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformParamsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WindowTransformParamsArrayItem {
Number(f64),
SignalRef(SignalRef),
Null,
}
impl ::std::convert::From<f64> for WindowTransformParamsArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for WindowTransformParamsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WindowTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WindowTransformType {
#[serde(rename = "window")]
Window,
}
impl ::std::fmt::Display for WindowTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Window => f.write_str("window"),
}
}
}
impl ::std::str::FromStr for WindowTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"window" => Ok(Self::Window),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WindowTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WindowTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WordcloudTransform`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WordcloudTransform {
#[serde(rename = "as", default = "defaults::wordcloud_transform_as")]
pub as_: WordcloudTransformAs,
#[serde(default = "defaults::wordcloud_transform_font")]
pub font: WordcloudTransformFont,
#[serde(
rename = "fontSize",
default = "defaults::wordcloud_transform_font_size"
)]
pub font_size: WordcloudTransformFontSize,
#[serde(
rename = "fontSizeRange",
default = "defaults::wordcloud_transform_font_size_range"
)]
pub font_size_range: WordcloudTransformFontSizeRange,
#[serde(
rename = "fontStyle",
default = "defaults::wordcloud_transform_font_style"
)]
pub font_style: WordcloudTransformFontStyle,
#[serde(
rename = "fontWeight",
default = "defaults::wordcloud_transform_font_weight"
)]
pub font_weight: WordcloudTransformFontWeight,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub padding: ::std::option::Option<WordcloudTransformPadding>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub rotate: ::std::option::Option<WordcloudTransformRotate>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub signal: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub size: ::std::option::Option<WordcloudTransformSize>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub spiral: ::std::option::Option<WordcloudTransformSpiral>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub text: ::std::option::Option<WordcloudTransformText>,
#[serde(rename = "type")]
pub type_: WordcloudTransformType,
}
#[doc = "`WordcloudTransformAs`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformAs {
Array([WordcloudTransformAsArrayItem; 7usize]),
SignalRef(SignalRef),
}
impl ::std::default::Default for WordcloudTransformAs {
fn default() -> Self {
WordcloudTransformAs::Array([
WordcloudTransformAsArrayItem::String("x".to_string()),
WordcloudTransformAsArrayItem::String("y".to_string()),
WordcloudTransformAsArrayItem::String("font".to_string()),
WordcloudTransformAsArrayItem::String("fontSize".to_string()),
WordcloudTransformAsArrayItem::String("fontStyle".to_string()),
WordcloudTransformAsArrayItem::String("fontWeight".to_string()),
WordcloudTransformAsArrayItem::String("angle".to_string()),
])
}
}
impl ::std::convert::From<[WordcloudTransformAsArrayItem; 7usize]> for WordcloudTransformAs {
fn from(value: [WordcloudTransformAsArrayItem; 7usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformAs {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WordcloudTransformAsArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformAsArrayItem {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for WordcloudTransformAsArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WordcloudTransformFont`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformFont {
String(::std::string::String),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::default::Default for WordcloudTransformFont {
fn default() -> Self {
WordcloudTransformFont::String("sans-serif".to_string())
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformFont {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for WordcloudTransformFont {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for WordcloudTransformFont {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`WordcloudTransformFontSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformFontSize {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::default::Default for WordcloudTransformFontSize {
fn default() -> Self {
WordcloudTransformFontSize::Number(14_f64)
}
}
impl ::std::convert::From<f64> for WordcloudTransformFontSize {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformFontSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for WordcloudTransformFontSize {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for WordcloudTransformFontSize {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`WordcloudTransformFontSizeRange`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformFontSizeRange {
Array(::std::vec::Vec<WordcloudTransformFontSizeRangeArrayItem>),
SignalRef(SignalRef),
Null,
}
impl ::std::default::Default for WordcloudTransformFontSizeRange {
fn default() -> Self {
WordcloudTransformFontSizeRange::Array(vec![
WordcloudTransformFontSizeRangeArrayItem::Number(10_f64),
WordcloudTransformFontSizeRangeArrayItem::Number(50_f64),
])
}
}
impl ::std::convert::From<::std::vec::Vec<WordcloudTransformFontSizeRangeArrayItem>>
for WordcloudTransformFontSizeRange
{
fn from(value: ::std::vec::Vec<WordcloudTransformFontSizeRangeArrayItem>) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformFontSizeRange {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WordcloudTransformFontSizeRangeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformFontSizeRangeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for WordcloudTransformFontSizeRangeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformFontSizeRangeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WordcloudTransformFontStyle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformFontStyle {
String(::std::string::String),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::default::Default for WordcloudTransformFontStyle {
fn default() -> Self {
WordcloudTransformFontStyle::String("normal".to_string())
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformFontStyle {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for WordcloudTransformFontStyle {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for WordcloudTransformFontStyle {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`WordcloudTransformFontWeight`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformFontWeight {
String(::std::string::String),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::default::Default for WordcloudTransformFontWeight {
fn default() -> Self {
WordcloudTransformFontWeight::String("normal".to_string())
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformFontWeight {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for WordcloudTransformFontWeight {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for WordcloudTransformFontWeight {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`WordcloudTransformPadding`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformPadding {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::convert::From<f64> for WordcloudTransformPadding {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformPadding {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for WordcloudTransformPadding {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for WordcloudTransformPadding {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`WordcloudTransformRotate`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformRotate {
Number(f64),
SignalRef(SignalRef),
Expr(Expr),
ParamField(ParamField),
}
impl ::std::convert::From<f64> for WordcloudTransformRotate {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformRotate {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
impl ::std::convert::From<Expr> for WordcloudTransformRotate {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
impl ::std::convert::From<ParamField> for WordcloudTransformRotate {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
#[doc = "`WordcloudTransformSize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformSize {
Array([WordcloudTransformSizeArrayItem; 2usize]),
SignalRef(SignalRef),
}
impl ::std::convert::From<[WordcloudTransformSizeArrayItem; 2usize]> for WordcloudTransformSize {
fn from(value: [WordcloudTransformSizeArrayItem; 2usize]) -> Self {
Self::Array(value)
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformSize {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WordcloudTransformSizeArrayItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformSizeArrayItem {
Number(f64),
SignalRef(SignalRef),
}
impl ::std::convert::From<f64> for WordcloudTransformSizeArrayItem {
fn from(value: f64) -> Self {
Self::Number(value)
}
}
impl ::std::convert::From<SignalRef> for WordcloudTransformSizeArrayItem {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WordcloudTransformSpiral`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformSpiral {
String(::std::string::String),
SignalRef(SignalRef),
}
impl ::std::convert::From<SignalRef> for WordcloudTransformSpiral {
fn from(value: SignalRef) -> Self {
Self::SignalRef(value)
}
}
#[doc = "`WordcloudTransformText`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WordcloudTransformText {
ScaleField(ScaleField),
ParamField(ParamField),
Expr(Expr),
}
impl ::std::convert::From<ScaleField> for WordcloudTransformText {
fn from(value: ScaleField) -> Self {
Self::ScaleField(value)
}
}
impl ::std::convert::From<ParamField> for WordcloudTransformText {
fn from(value: ParamField) -> Self {
Self::ParamField(value)
}
}
impl ::std::convert::From<Expr> for WordcloudTransformText {
fn from(value: Expr) -> Self {
Self::Expr(value)
}
}
#[doc = "`WordcloudTransformType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WordcloudTransformType {
#[serde(rename = "wordcloud")]
Wordcloud,
}
impl ::std::fmt::Display for WordcloudTransformType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Wordcloud => f.write_str("wordcloud"),
}
}
}
impl ::std::str::FromStr for WordcloudTransformType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"wordcloud" => Ok(Self::Wordcloud),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WordcloudTransformType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WordcloudTransformType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = " Generation of default values for serde."]
pub mod defaults {
pub(super) fn default_bool<const V: bool>() -> bool {
V
}
pub(super) fn default_i64<T, const V: i64>() -> T
where
T: ::std::convert::TryFrom<i64>,
<T as ::std::convert::TryFrom<i64>>::Error: ::std::fmt::Debug,
{
T::try_from(V).unwrap()
}
pub(super) fn aggregate_transform_drop() -> super::AggregateTransformDrop {
super::AggregateTransformDrop::Boolean(true)
}
pub(super) fn bin_transform_as() -> super::BinTransformAs {
super::BinTransformAs::Array([
super::BinTransformAsArrayItem::String("bin0".to_string()),
super::BinTransformAsArrayItem::String("bin1".to_string()),
])
}
pub(super) fn bin_transform_base() -> super::BinTransformBase {
super::BinTransformBase::Number(10_f64)
}
pub(super) fn bin_transform_divide() -> super::BinTransformDivide {
super::BinTransformDivide::Array(vec![
super::BinTransformDivideArrayItem::Number(5_f64),
super::BinTransformDivideArrayItem::Number(2_f64),
])
}
pub(super) fn bin_transform_interval() -> super::BinTransformInterval {
super::BinTransformInterval::Boolean(true)
}
pub(super) fn bin_transform_maxbins() -> super::BinTransformMaxbins {
super::BinTransformMaxbins::Number(20_f64)
}
pub(super) fn bin_transform_nice() -> super::BinTransformNice {
super::BinTransformNice::Boolean(true)
}
pub(super) fn contour_transform_smooth() -> super::ContourTransformSmooth {
super::ContourTransformSmooth::Boolean(true)
}
pub(super) fn countpattern_transform_as() -> super::CountpatternTransformAs {
super::CountpatternTransformAs::Array([
super::CountpatternTransformAsArrayItem::String("text".to_string()),
super::CountpatternTransformAsArrayItem::String("count".to_string()),
])
}
pub(super) fn countpattern_transform_case() -> super::CountpatternTransformCase {
super::CountpatternTransformCase::Variant0(super::CountpatternTransformCaseVariant0::Mixed)
}
pub(super) fn countpattern_transform_pattern() -> super::CountpatternTransformPattern {
super::CountpatternTransformPattern::String("[\\w\"]+".to_string())
}
pub(super) fn cross_transform_as() -> super::CrossTransformAs {
super::CrossTransformAs::Array([
super::CrossTransformAsArrayItem::String("a".to_string()),
super::CrossTransformAsArrayItem::String("b".to_string()),
])
}
pub(super) fn density_transform_as() -> super::DensityTransformAs {
super::DensityTransformAs::Array(vec![
super::DensityTransformAsArrayItem::String("value".to_string()),
super::DensityTransformAsArrayItem::String("density".to_string()),
])
}
pub(super) fn density_transform_maxsteps() -> super::DensityTransformMaxsteps {
super::DensityTransformMaxsteps::Number(200_f64)
}
pub(super) fn density_transform_method() -> super::DensityTransformMethod {
super::DensityTransformMethod::String("pdf".to_string())
}
pub(super) fn density_transform_minsteps() -> super::DensityTransformMinsteps {
super::DensityTransformMinsteps::Number(25_f64)
}
pub(super) fn density_transform_distribution_lognormal_stdev(
) -> super::DensityTransformDistributionStdev {
super::DensityTransformDistributionStdev::Number(1_f64)
}
pub(super) fn density_transform_distribution_normal_stdev(
) -> super::DensityTransformDistributionStdev {
super::DensityTransformDistributionStdev::Number(1_f64)
}
pub(super) fn density_transform_distribution_uniform_max(
) -> super::DensityTransformDistributionMax {
super::DensityTransformDistributionMax::Number(1_f64)
}
pub(super) fn dotbin_transform_as() -> super::DotbinTransformAs {
super::DotbinTransformAs::String("bin".to_string())
}
pub(super) fn fold_transform_as() -> super::FoldTransformAs {
super::FoldTransformAs::Array([
super::FoldTransformAsArrayItem::String("key".to_string()),
super::FoldTransformAsArrayItem::String("value".to_string()),
])
}
pub(super) fn force_transform_alpha() -> super::ForceTransformAlpha {
super::ForceTransformAlpha::Number(1_f64)
}
pub(super) fn force_transform_alpha_min() -> super::ForceTransformAlphaMin {
super::ForceTransformAlphaMin::Number(0.001_f64)
}
pub(super) fn force_transform_as() -> super::ForceTransformAs {
super::ForceTransformAs::Array(vec![
super::ForceTransformAsArrayItem::String("x".to_string()),
super::ForceTransformAsArrayItem::String("y".to_string()),
super::ForceTransformAsArrayItem::String("vx".to_string()),
super::ForceTransformAsArrayItem::String("vy".to_string()),
])
}
pub(super) fn force_transform_iterations() -> super::ForceTransformIterations {
super::ForceTransformIterations::Number(300_f64)
}
pub(super) fn force_transform_velocity_decay() -> super::ForceTransformVelocityDecay {
super::ForceTransformVelocityDecay::Number(0.4_f64)
}
pub(super) fn force_transform_forces_item_collide_iterations(
) -> super::ForceTransformForcesItemIterations {
super::ForceTransformForcesItemIterations::Number(1_f64)
}
pub(super) fn force_transform_forces_item_collide_strength(
) -> super::ForceTransformForcesItemStrength {
super::ForceTransformForcesItemStrength::Number(0.7_f64)
}
pub(super) fn force_transform_forces_item_link_distance(
) -> super::ForceTransformForcesItemDistance {
super::ForceTransformForcesItemDistance::Number(30_f64)
}
pub(super) fn force_transform_forces_item_link_iterations(
) -> super::ForceTransformForcesItemIterations {
super::ForceTransformForcesItemIterations::Number(1_f64)
}
pub(super) fn force_transform_forces_item_nbody_distance_min(
) -> super::ForceTransformForcesItemDistanceMin {
super::ForceTransformForcesItemDistanceMin::Number(1_f64)
}
pub(super) fn force_transform_forces_item_nbody_strength(
) -> super::ForceTransformForcesItemStrength {
super::ForceTransformForcesItemStrength::Number(-30_f64)
}
pub(super) fn force_transform_forces_item_nbody_theta() -> super::ForceTransformForcesItemTheta
{
super::ForceTransformForcesItemTheta::Number(0.9_f64)
}
pub(super) fn force_transform_forces_item_x_strength() -> super::ForceTransformForcesItemStrength
{
super::ForceTransformForcesItemStrength::Number(0.1_f64)
}
pub(super) fn force_transform_forces_item_y_strength() -> super::ForceTransformForcesItemStrength
{
super::ForceTransformForcesItemStrength::Number(0.1_f64)
}
pub(super) fn geopath_transform_as() -> super::GeopathTransformAs {
super::GeopathTransformAs::String("path".to_string())
}
pub(super) fn geopoint_transform_as() -> super::GeopointTransformAs {
super::GeopointTransformAs::Array([
super::GeopointTransformAsArrayItem::String("x".to_string()),
super::GeopointTransformAsArrayItem::String("y".to_string()),
])
}
pub(super) fn geoshape_transform_as() -> super::GeoshapeTransformAs {
super::GeoshapeTransformAs::String("shape".to_string())
}
pub(super) fn geoshape_transform_field() -> super::GeoshapeTransformField {
super::GeoshapeTransformField::ScaleField(super::ScaleField(super::StringOrSignal::String(
"datum".to_string(),
)))
}
pub(super) fn graticule_transform_precision() -> super::GraticuleTransformPrecision {
super::GraticuleTransformPrecision::Number(2.5_f64)
}
pub(super) fn graticule_transform_step_major() -> super::GraticuleTransformStepMajor {
super::GraticuleTransformStepMajor::Array([
super::GraticuleTransformStepMajorArrayItem::Number(90_f64),
super::GraticuleTransformStepMajorArrayItem::Number(360_f64),
])
}
pub(super) fn graticule_transform_step_minor() -> super::GraticuleTransformStepMinor {
super::GraticuleTransformStepMinor::Array([
super::GraticuleTransformStepMinorArrayItem::Number(10_f64),
super::GraticuleTransformStepMinorArrayItem::Number(10_f64),
])
}
pub(super) fn heatmap_transform_as() -> super::HeatmapTransformAs {
super::HeatmapTransformAs::String("image".to_string())
}
pub(super) fn heatmap_transform_resolve() -> super::HeatmapTransformResolve {
super::HeatmapTransformResolve::Variant0(
super::HeatmapTransformResolveVariant0::Independent,
)
}
pub(super) fn impute_transform_method() -> super::ImputeTransformMethod {
super::ImputeTransformMethod::Variant0(super::ImputeTransformMethodVariant0::Value)
}
pub(super) fn isocontour_transform_as() -> super::IsocontourTransformAs {
super::IsocontourTransformAs::String("contour".to_string())
}
pub(super) fn isocontour_transform_resolve() -> super::IsocontourTransformResolve {
super::IsocontourTransformResolve::Variant0(
super::IsocontourTransformResolveVariant0::Independent,
)
}
pub(super) fn isocontour_transform_smooth() -> super::IsocontourTransformSmooth {
super::IsocontourTransformSmooth::Boolean(true)
}
pub(super) fn isocontour_transform_zero() -> super::IsocontourTransformZero {
super::IsocontourTransformZero::Boolean(true)
}
pub(super) fn kde2d_transform_as() -> super::Kde2dTransformAs {
super::Kde2dTransformAs::String("grid".to_string())
}
pub(super) fn kde_transform_as() -> super::KdeTransformAs {
super::KdeTransformAs::Array(vec![
super::KdeTransformAsArrayItem::String("value".to_string()),
super::KdeTransformAsArrayItem::String("density".to_string()),
])
}
pub(super) fn kde_transform_maxsteps() -> super::KdeTransformMaxsteps {
super::KdeTransformMaxsteps::Number(200_f64)
}
pub(super) fn kde_transform_minsteps() -> super::KdeTransformMinsteps {
super::KdeTransformMinsteps::Number(25_f64)
}
pub(super) fn kde_transform_resolve() -> super::KdeTransformResolve {
super::KdeTransformResolve::Variant0(super::KdeTransformResolveVariant0::Independent)
}
pub(super) fn label_transform_anchor() -> super::LabelTransformAnchor {
super::LabelTransformAnchor::Array(vec![
super::LabelTransformAnchorArrayItem::String("top-left".to_string()),
super::LabelTransformAnchorArrayItem::String("left".to_string()),
super::LabelTransformAnchorArrayItem::String("bottom-left".to_string()),
super::LabelTransformAnchorArrayItem::String("top".to_string()),
super::LabelTransformAnchorArrayItem::String("bottom".to_string()),
super::LabelTransformAnchorArrayItem::String("top-right".to_string()),
super::LabelTransformAnchorArrayItem::String("right".to_string()),
super::LabelTransformAnchorArrayItem::String("bottom-right".to_string()),
])
}
pub(super) fn label_transform_as() -> super::LabelTransformAs {
super::LabelTransformAs::Array([
super::LabelTransformAsArrayItem::String("x".to_string()),
super::LabelTransformAsArrayItem::String("y".to_string()),
super::LabelTransformAsArrayItem::String("opacity".to_string()),
super::LabelTransformAsArrayItem::String("align".to_string()),
super::LabelTransformAsArrayItem::String("baseline".to_string()),
])
}
pub(super) fn label_transform_avoid_base_mark() -> super::LabelTransformAvoidBaseMark {
super::LabelTransformAvoidBaseMark::Boolean(true)
}
pub(super) fn label_transform_line_anchor() -> super::LabelTransformLineAnchor {
super::LabelTransformLineAnchor::String("end".to_string())
}
pub(super) fn label_transform_method() -> super::LabelTransformMethod {
super::LabelTransformMethod::String("naive".to_string())
}
pub(super) fn label_transform_offset() -> super::LabelTransformOffset {
super::LabelTransformOffset::Array(vec![super::LabelTransformOffsetArrayItem::Number(
1_f64,
)])
}
pub(super) fn linkpath_transform_as() -> super::LinkpathTransformAs {
super::LinkpathTransformAs::String("path".to_string())
}
pub(super) fn linkpath_transform_orient() -> super::LinkpathTransformOrient {
super::LinkpathTransformOrient::Variant0(super::LinkpathTransformOrientVariant0::Vertical)
}
pub(super) fn linkpath_transform_shape() -> super::LinkpathTransformShape {
super::LinkpathTransformShape::Variant0(super::LinkpathTransformShapeVariant0::Line)
}
pub(super) fn linkpath_transform_source_x() -> super::LinkpathTransformSourceX {
super::LinkpathTransformSourceX::ScaleField(super::ScaleField(
super::StringOrSignal::String("source.x".to_string()),
))
}
pub(super) fn linkpath_transform_source_y() -> super::LinkpathTransformSourceY {
super::LinkpathTransformSourceY::ScaleField(super::ScaleField(
super::StringOrSignal::String("source.y".to_string()),
))
}
pub(super) fn linkpath_transform_target_x() -> super::LinkpathTransformTargetX {
super::LinkpathTransformTargetX::ScaleField(super::ScaleField(
super::StringOrSignal::String("target.x".to_string()),
))
}
pub(super) fn linkpath_transform_target_y() -> super::LinkpathTransformTargetY {
super::LinkpathTransformTargetY::ScaleField(super::ScaleField(
super::StringOrSignal::String("target.y".to_string()),
))
}
pub(super) fn loess_transform_bandwidth() -> super::LoessTransformBandwidth {
super::LoessTransformBandwidth::Number(0.3_f64)
}
pub(super) fn pack_transform_as() -> super::PackTransformAs {
super::PackTransformAs::Array([
super::PackTransformAsArrayItem::String("x".to_string()),
super::PackTransformAsArrayItem::String("y".to_string()),
super::PackTransformAsArrayItem::String("r".to_string()),
super::PackTransformAsArrayItem::String("depth".to_string()),
super::PackTransformAsArrayItem::String("children".to_string()),
])
}
pub(super) fn partition_transform_as() -> super::PartitionTransformAs {
super::PartitionTransformAs::Array([
super::PartitionTransformAsArrayItem::String("x0".to_string()),
super::PartitionTransformAsArrayItem::String("y0".to_string()),
super::PartitionTransformAsArrayItem::String("x1".to_string()),
super::PartitionTransformAsArrayItem::String("y1".to_string()),
super::PartitionTransformAsArrayItem::String("depth".to_string()),
super::PartitionTransformAsArrayItem::String("children".to_string()),
])
}
pub(super) fn pie_transform_as() -> super::PieTransformAs {
super::PieTransformAs::Array([
super::PieTransformAsArrayItem::String("startAngle".to_string()),
super::PieTransformAsArrayItem::String("endAngle".to_string()),
])
}
pub(super) fn pie_transform_end_angle() -> super::PieTransformEndAngle {
super::PieTransformEndAngle::Number(6.283185307179586_f64)
}
pub(super) fn pivot_transform_op() -> super::PivotTransformOp {
super::PivotTransformOp::Variant0(super::PivotTransformOpVariant0::Sum)
}
pub(super) fn quantile_transform_as() -> super::QuantileTransformAs {
super::QuantileTransformAs::Array(vec![
super::QuantileTransformAsArrayItem::String("prob".to_string()),
super::QuantileTransformAsArrayItem::String("value".to_string()),
])
}
pub(super) fn quantile_transform_step() -> super::QuantileTransformStep {
super::QuantileTransformStep::Number(0.01_f64)
}
pub(super) fn regression_transform_method() -> super::RegressionTransformMethod {
super::RegressionTransformMethod::String("linear".to_string())
}
pub(super) fn regression_transform_order() -> super::RegressionTransformOrder {
super::RegressionTransformOrder::Number(3_f64)
}
pub(super) fn sample_transform_size() -> super::SampleTransformSize {
super::SampleTransformSize::Number(1000_f64)
}
pub(super) fn sequence_transform_as() -> super::SequenceTransformAs {
super::SequenceTransformAs::String("data".to_string())
}
pub(super) fn sequence_transform_step() -> super::SequenceTransformStep {
super::SequenceTransformStep::Number(1_f64)
}
pub(super) fn stack_transform_as() -> super::StackTransformAs {
super::StackTransformAs::Array([
super::StackTransformAsArrayItem::String("y0".to_string()),
super::StackTransformAsArrayItem::String("y1".to_string()),
])
}
pub(super) fn stack_transform_offset() -> super::StackTransformOffset {
super::StackTransformOffset::Variant0(super::StackTransformOffsetVariant0::Zero)
}
pub(super) fn timeunit_transform_as() -> super::TimeunitTransformAs {
super::TimeunitTransformAs::Array([
super::TimeunitTransformAsArrayItem::String("unit0".to_string()),
super::TimeunitTransformAsArrayItem::String("unit1".to_string()),
])
}
pub(super) fn timeunit_transform_interval() -> super::TimeunitTransformInterval {
super::TimeunitTransformInterval::Boolean(true)
}
pub(super) fn timeunit_transform_maxbins() -> super::TimeunitTransformMaxbins {
super::TimeunitTransformMaxbins::Number(40_f64)
}
pub(super) fn timeunit_transform_step() -> super::TimeunitTransformStep {
super::TimeunitTransformStep::Number(1_f64)
}
pub(super) fn timeunit_transform_timezone() -> super::TimeunitTransformTimezone {
super::TimeunitTransformTimezone::Variant0(super::TimeunitTransformTimezoneVariant0::Local)
}
pub(super) fn tree_transform_as() -> super::TreeTransformAs {
super::TreeTransformAs::Array([
super::TreeTransformAsArrayItem::String("x".to_string()),
super::TreeTransformAsArrayItem::String("y".to_string()),
super::TreeTransformAsArrayItem::String("depth".to_string()),
super::TreeTransformAsArrayItem::String("children".to_string()),
])
}
pub(super) fn tree_transform_method() -> super::TreeTransformMethod {
super::TreeTransformMethod::Variant0(super::TreeTransformMethodVariant0::Tidy)
}
pub(super) fn tree_transform_separation() -> super::TreeTransformSeparation {
super::TreeTransformSeparation::Boolean(true)
}
pub(super) fn treemap_transform_as() -> super::TreemapTransformAs {
super::TreemapTransformAs::Array([
super::TreemapTransformAsArrayItem::String("x0".to_string()),
super::TreemapTransformAsArrayItem::String("y0".to_string()),
super::TreemapTransformAsArrayItem::String("x1".to_string()),
super::TreemapTransformAsArrayItem::String("y1".to_string()),
super::TreemapTransformAsArrayItem::String("depth".to_string()),
super::TreemapTransformAsArrayItem::String("children".to_string()),
])
}
pub(super) fn treemap_transform_method() -> super::TreemapTransformMethod {
super::TreemapTransformMethod::Variant0(super::TreemapTransformMethodVariant0::Squarify)
}
pub(super) fn treemap_transform_ratio() -> super::TreemapTransformRatio {
super::TreemapTransformRatio::Number(1.618033988749895_f64)
}
pub(super) fn voronoi_transform_as() -> super::VoronoiTransformAs {
super::VoronoiTransformAs::String("path".to_string())
}
pub(super) fn voronoi_transform_extent() -> super::VoronoiTransformExtent {
super::VoronoiTransformExtent::Array([
::serde_json::from_str::<::serde_json::Value>("[-100000,-100000]").unwrap(),
::serde_json::from_str::<::serde_json::Value>("[100000,100000]").unwrap(),
])
}
pub(super) fn window_transform_frame() -> super::WindowTransformFrame {
super::WindowTransformFrame::Array([
super::WindowTransformFrameArrayItem::Null,
super::WindowTransformFrameArrayItem::Number(0_f64),
])
}
pub(super) fn wordcloud_transform_as() -> super::WordcloudTransformAs {
super::WordcloudTransformAs::Array([
super::WordcloudTransformAsArrayItem::String("x".to_string()),
super::WordcloudTransformAsArrayItem::String("y".to_string()),
super::WordcloudTransformAsArrayItem::String("font".to_string()),
super::WordcloudTransformAsArrayItem::String("fontSize".to_string()),
super::WordcloudTransformAsArrayItem::String("fontStyle".to_string()),
super::WordcloudTransformAsArrayItem::String("fontWeight".to_string()),
super::WordcloudTransformAsArrayItem::String("angle".to_string()),
])
}
pub(super) fn wordcloud_transform_font() -> super::WordcloudTransformFont {
super::WordcloudTransformFont::String("sans-serif".to_string())
}
pub(super) fn wordcloud_transform_font_size() -> super::WordcloudTransformFontSize {
super::WordcloudTransformFontSize::Number(14_f64)
}
pub(super) fn wordcloud_transform_font_size_range() -> super::WordcloudTransformFontSizeRange {
super::WordcloudTransformFontSizeRange::Array(vec![
super::WordcloudTransformFontSizeRangeArrayItem::Number(10_f64),
super::WordcloudTransformFontSizeRangeArrayItem::Number(50_f64),
])
}
pub(super) fn wordcloud_transform_font_style() -> super::WordcloudTransformFontStyle {
super::WordcloudTransformFontStyle::String("normal".to_string())
}
pub(super) fn wordcloud_transform_font_weight() -> super::WordcloudTransformFontWeight {
super::WordcloudTransformFontWeight::String("normal".to_string())
}
}
#[doc = " Error types."]
pub mod error {
#[doc = r" Error from a `TryFrom` or `FromStr` implementation."]
pub struct ConversionError(::std::borrow::Cow<'static, str>);
impl ::std::error::Error for ConversionError {}
impl ::std::fmt::Display for ConversionError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
::std::fmt::Display::fmt(&self.0, f)
}
}
impl ::std::fmt::Debug for ConversionError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
::std::fmt::Debug::fmt(&self.0, f)
}
}
impl From<&'static str> for ConversionError {
fn from(value: &'static str) -> Self {
Self(value.into())
}
}
impl From<String> for ConversionError {
fn from(value: String) -> Self {
Self(value.into())
}
}
}