Skip to main content

nominal_api/conjure/objects/scout/checks/api/
job_report.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct JobReport {
13    #[builder(custom(type = super::JobStatus, convert = Box::new))]
14    #[serde(rename = "jobStatus")]
15    job_status: Box<super::JobStatus>,
16    #[serde(rename = "jobRid")]
17    job_rid: super::JobRid,
18    #[serde(rename = "submittedAt")]
19    submitted_at: conjure_object::DateTime<conjure_object::Utc>,
20}
21impl JobReport {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new(
25        job_status: super::JobStatus,
26        job_rid: super::JobRid,
27        submitted_at: conjure_object::DateTime<conjure_object::Utc>,
28    ) -> Self {
29        Self::builder()
30            .job_status(job_status)
31            .job_rid(job_rid)
32            .submitted_at(submitted_at)
33            .build()
34    }
35    #[inline]
36    pub fn job_status(&self) -> &super::JobStatus {
37        &*self.job_status
38    }
39    #[inline]
40    pub fn job_rid(&self) -> &super::JobRid {
41        &self.job_rid
42    }
43    #[inline]
44    pub fn submitted_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
45        self.submitted_at
46    }
47}