#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct RunChannel {
#[builder(custom(type = super::StringConstant, convert = Box::new))]
#[serde(rename = "runRid")]
run_rid: Box<super::StringConstant>,
#[builder(
default,
custom(
type = impl
Into<Option<super::StringConstant>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "assetRid", skip_serializing_if = "Option::is_none", default)]
asset_rid: Option<Box<super::StringConstant>>,
#[builder(custom(type = super::StringConstant, convert = Box::new))]
#[serde(rename = "dataScopeName")]
data_scope_name: Box<super::StringConstant>,
#[builder(custom(type = super::StringConstant, convert = Box::new))]
#[serde(rename = "channel")]
channel: Box<super::StringConstant>,
#[builder(
default,
map(key(type = String, into), value(type = super::StringConstant))
)]
#[serde(
rename = "additionalTags",
skip_serializing_if = "std::collections::BTreeMap::is_empty",
default
)]
additional_tags: std::collections::BTreeMap<String, super::StringConstant>,
#[builder(
default,
custom(
type = impl
Into<Option<super::TagFilters>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(
rename = "additionalTagFilters",
skip_serializing_if = "Option::is_none",
default
)]
additional_tag_filters: Option<Box<super::TagFilters>>,
#[builder(default, set(item(type = String, into)))]
#[serde(
rename = "tagsToGroupBy",
skip_serializing_if = "std::collections::BTreeSet::is_empty",
default
)]
tags_to_group_by: std::collections::BTreeSet<String>,
#[builder(default, set(item(type = super::StringConstant)))]
#[serde(
rename = "groupByTags",
skip_serializing_if = "std::collections::BTreeSet::is_empty",
default
)]
group_by_tags: std::collections::BTreeSet<super::StringConstant>,
}
impl RunChannel {
#[inline]
pub fn new(
run_rid: super::StringConstant,
data_scope_name: super::StringConstant,
channel: super::StringConstant,
) -> Self {
Self::builder()
.run_rid(run_rid)
.data_scope_name(data_scope_name)
.channel(channel)
.build()
}
#[inline]
pub fn run_rid(&self) -> &super::StringConstant {
&*self.run_rid
}
#[inline]
pub fn asset_rid(&self) -> Option<&super::StringConstant> {
self.asset_rid.as_ref().map(|o| &**o)
}
#[inline]
pub fn data_scope_name(&self) -> &super::StringConstant {
&*self.data_scope_name
}
#[inline]
pub fn channel(&self) -> &super::StringConstant {
&*self.channel
}
#[deprecated(note = "Use additionalTagFilters")]
#[inline]
pub fn additional_tags(
&self,
) -> &std::collections::BTreeMap<String, super::StringConstant> {
&self.additional_tags
}
#[inline]
pub fn additional_tag_filters(&self) -> Option<&super::TagFilters> {
self.additional_tag_filters.as_ref().map(|o| &**o)
}
#[deprecated(
note = "Use groupByTags instead. Throws if both tagsToGroupBy and groupByTags are specified.\n"
)]
#[inline]
pub fn tags_to_group_by(&self) -> &std::collections::BTreeSet<String> {
&self.tags_to_group_by
}
#[inline]
pub fn group_by_tags(&self) -> &std::collections::BTreeSet<super::StringConstant> {
&self.group_by_tags
}
}