Skip to main content

nominal_api_conjure/conjure/objects/ingest/api/
count_ingest_jobs_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 CountIngestJobsRequest {
16    #[builder(
17        default,
18        custom(
19            type = impl
20            Into<Option<super::IngestJobSearchFilter>>,
21            convert = |v|v.into().map(Box::new)
22        )
23    )]
24    #[serde(rename = "filter", skip_serializing_if = "Option::is_none", default)]
25    filter: Option<Box<super::IngestJobSearchFilter>>,
26}
27impl CountIngestJobsRequest {
28    /// Constructs a new instance of the type.
29    #[inline]
30    pub fn new() -> Self {
31        Self::builder().build()
32    }
33    /// Matches all jobs when omitted. Prefer a filter that bounds the result, such as non-terminal statuses.
34    #[inline]
35    pub fn filter(&self) -> Option<&super::IngestJobSearchFilter> {
36        self.filter.as_ref().map(|o| &**o)
37    }
38}