nominal_api/conjure/objects/ingest/api/
internal_ingest_job.rs1#[derive(
3 Debug,
4 Clone,
5 conjure_object::serde::Serialize,
6 conjure_object::serde::Deserialize,
7 conjure_object::private::DeriveWith
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct InternalIngestJob {
14 #[serde(rename = "ingestJobRid")]
15 ingest_job_rid: super::IngestJobRid,
16 #[serde(rename = "status")]
17 status: super::IngestJobStatus,
18 #[builder(
19 default,
20 custom(
21 type = impl
22 Into<Option<super::IngestJobRequest>>,
23 convert = |v|v.into().map(Box::new)
24 )
25 )]
26 #[serde(
27 rename = "ingestJobRequest",
28 skip_serializing_if = "Option::is_none",
29 default
30 )]
31 ingest_job_request: Option<Box<super::IngestJobRequest>>,
32 #[builder(default, into)]
33 #[serde(rename = "originFiles", skip_serializing_if = "Option::is_none", default)]
34 origin_files: Option<Vec<String>>,
35 #[serde(rename = "createdBy")]
36 created_by: conjure_object::Uuid,
37 #[builder(default, into)]
38 #[serde(rename = "createdByRid", skip_serializing_if = "Option::is_none", default)]
39 created_by_rid: Option<super::super::super::scout::rids::api::UserRid>,
40 #[serde(rename = "orgUuid")]
41 org_uuid: conjure_object::Uuid,
42 #[serde(rename = "ingestType")]
43 ingest_type: super::IngestType,
44 #[builder(default, into)]
45 #[serde(rename = "datasetRid", skip_serializing_if = "Option::is_none", default)]
46 dataset_rid: Option<super::super::super::api::rids::DatasetRid>,
47 #[builder(default, into)]
48 #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none", default)]
49 created_at: Option<conjure_object::DateTime<conjure_object::Utc>>,
50}
51impl InternalIngestJob {
52 #[inline]
53 pub fn ingest_job_rid(&self) -> &super::IngestJobRid {
54 &self.ingest_job_rid
55 }
56 #[inline]
57 pub fn status(&self) -> &super::IngestJobStatus {
58 &self.status
59 }
60 #[inline]
61 pub fn ingest_job_request(&self) -> Option<&super::IngestJobRequest> {
62 self.ingest_job_request.as_ref().map(|o| &**o)
63 }
64 #[inline]
65 pub fn origin_files(&self) -> Option<&[String]> {
66 self.origin_files.as_ref().map(|o| &**o)
67 }
68 #[deprecated(note = "use createdByRid instead")]
69 #[inline]
70 pub fn created_by(&self) -> conjure_object::Uuid {
71 self.created_by
72 }
73 #[inline]
74 pub fn created_by_rid(
75 &self,
76 ) -> Option<&super::super::super::scout::rids::api::UserRid> {
77 self.created_by_rid.as_ref().map(|o| &*o)
78 }
79 #[inline]
80 pub fn org_uuid(&self) -> conjure_object::Uuid {
81 self.org_uuid
82 }
83 #[inline]
84 pub fn ingest_type(&self) -> &super::IngestType {
85 &self.ingest_type
86 }
87 #[inline]
88 pub fn dataset_rid(&self) -> Option<&super::super::super::api::rids::DatasetRid> {
89 self.dataset_rid.as_ref().map(|o| &*o)
90 }
91 #[inline]
92 pub fn created_at(&self) -> Option<conjure_object::DateTime<conjure_object::Utc>> {
93 self.created_at.as_ref().map(|o| *o)
94 }
95}