Skip to main content

nominal_api/conjure/objects/scout/run/api/
archive_runs_request.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct ArchiveRunsRequest {
16    #[builder(default, set(item(type = super::RunRid)))]
17    #[serde(
18        rename = "rids",
19        skip_serializing_if = "std::collections::BTreeSet::is_empty",
20        default
21    )]
22    rids: std::collections::BTreeSet<super::RunRid>,
23    #[builder(default, into)]
24    #[serde(
25        rename = "includeLinkedWorkbooks",
26        skip_serializing_if = "Option::is_none",
27        default
28    )]
29    include_linked_workbooks: Option<bool>,
30}
31impl ArchiveRunsRequest {
32    /// Constructs a new instance of the type.
33    #[inline]
34    pub fn new() -> Self {
35        Self::builder().build()
36    }
37    #[inline]
38    pub fn rids(&self) -> &std::collections::BTreeSet<super::RunRid> {
39        &self.rids
40    }
41    /// If true, all auto-archived workbooks that are linked to run will be unarchived as well.
42    /// Defaults to false.
43    #[inline]
44    pub fn include_linked_workbooks(&self) -> Option<bool> {
45        self.include_linked_workbooks.as_ref().map(|o| *o)
46    }
47}