#[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 CreateSegment {
    #[builder(
        custom(type = super::super::super::super::api::Handle, convert = Box::new)
    )]
    #[serde(rename = "dataHandle")]
    data_handle: Box<super::super::super::super::api::Handle>,
    #[serde(rename = "frameRate")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    frame_rate: f64,
    #[serde(rename = "durationSeconds")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    duration_seconds: f64,
    #[builder(custom(type = super::SegmentTimestamps, convert = Box::new))]
    #[serde(rename = "timestamps")]
    timestamps: Box<super::SegmentTimestamps>,
    #[builder(
        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
    )]
    #[serde(rename = "segmentEndTimestamp")]
    segment_end_timestamp: Box<super::super::super::super::api::Timestamp>,
}
impl CreateSegment {
    #[inline]
    pub fn data_handle(&self) -> &super::super::super::super::api::Handle {
        &*self.data_handle
    }
    /// The average frame rate (FPS) of the segment calculated as total frames / duration in seconds.
    #[inline]
    pub fn frame_rate(&self) -> f64 {
        self.frame_rate
    }
    #[inline]
    pub fn duration_seconds(&self) -> f64 {
        self.duration_seconds
    }
    #[inline]
    pub fn timestamps(&self) -> &super::SegmentTimestamps {
        &*self.timestamps
    }
    #[inline]
    pub fn segment_end_timestamp(&self) -> &super::super::super::super::api::Timestamp {
        &*self.segment_end_timestamp
    }
}
