#[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 CreateSegmentsRequest {
    #[builder(default, list(item(type = super::CreateSegment)))]
    #[serde(rename = "requests", skip_serializing_if = "Vec::is_empty", default)]
    requests: Vec<super::CreateSegment>,
    #[builder(default, into)]
    #[serde(rename = "seriesUuid", skip_serializing_if = "Option::is_none", default)]
    series_uuid: Option<conjure_object::Uuid>,
    #[builder(default, into)]
    #[serde(
        rename = "overWriteSegments",
        skip_serializing_if = "Option::is_none",
        default
    )]
    over_write_segments: Option<bool>,
}
impl CreateSegmentsRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn requests(&self) -> &[super::CreateSegment] {
        &*self.requests
    }
    #[inline]
    pub fn series_uuid(&self) -> Option<conjure_object::Uuid> {
        self.series_uuid.as_ref().map(|o| *o)
    }
    /// If true, overlapping segments from other video files within the same video will be deleted
    /// before inserting new segments. The cached segment metadata for affected files will be recomputed.
    #[inline]
    pub fn over_write_segments(&self) -> Option<bool> {
        self.over_write_segments.as_ref().map(|o| *o)
    }
}
