nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// Expands ranges durations by adding temporal padding to the start, end, or both sides. Note that if the input
/// ranges contain a RangeValue, it will be dropped.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct PaddedRanges {
    #[builder(custom(type = super::RangeSeries, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::RangeSeries>,
    #[builder(custom(type = super::DurationConstant, convert = Box::new))]
    #[serde(rename = "padding")]
    padding: Box<super::DurationConstant>,
    #[builder(default, into)]
    #[serde(
        rename = "paddingConfiguration",
        skip_serializing_if = "Option::is_none",
        default
    )]
    padding_configuration: Option<super::RangePaddingConfiguration>,
}
impl PaddedRanges {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::RangeSeries, padding: super::DurationConstant) -> Self {
        Self::builder().input(input).padding(padding).build()
    }
    #[inline]
    pub fn input(&self) -> &super::RangeSeries {
        &*self.input
    }
    #[inline]
    pub fn padding(&self) -> &super::DurationConstant {
        &*self.padding
    }
    /// Configuration for how to apply padding to the ranges. Defaults to PAD_START_AND_END if not specified.
    #[inline]
    pub fn padding_configuration(&self) -> Option<&super::RangePaddingConfiguration> {
        self.padding_configuration.as_ref().map(|o| &*o)
    }
}