Skip to main content

nominal_api_conjure/conjure/objects/ingest/api/
cancel_ingest_job_result.rs

1/// The outcome of attempting to cancel a single ingest job within a batch.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct CancelIngestJobResult {
17    #[serde(rename = "ingestJobRid")]
18    ingest_job_rid: conjure_object::ResourceIdentifier,
19    #[builder(custom(type = super::CancelIngestJobOutcome, convert = Box::new))]
20    #[serde(rename = "outcome")]
21    outcome: Box<super::CancelIngestJobOutcome>,
22}
23impl CancelIngestJobResult {
24    /// Constructs a new instance of the type.
25    #[inline]
26    pub fn new(
27        ingest_job_rid: conjure_object::ResourceIdentifier,
28        outcome: super::CancelIngestJobOutcome,
29    ) -> Self {
30        Self::builder().ingest_job_rid(ingest_job_rid).outcome(outcome).build()
31    }
32    #[inline]
33    pub fn ingest_job_rid(&self) -> &conjure_object::ResourceIdentifier {
34        &self.ingest_job_rid
35    }
36    #[inline]
37    pub fn outcome(&self) -> &super::CancelIngestJobOutcome {
38        &*self.outcome
39    }
40}