Skip to main content

nominal_api/conjure/objects/ingest/api/
create_ingest_job_request.rs

1/// Request to create a new ingest job.
2#[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 CreateIngestJobRequest {
14    #[serde(rename = "workspaceRid")]
15    workspace_rid: super::super::super::api::rids::WorkspaceRid,
16    #[builder(custom(type = super::IngestJobRequest, convert = Box::new))]
17    #[serde(rename = "ingestJobRequest")]
18    ingest_job_request: Box<super::IngestJobRequest>,
19}
20impl CreateIngestJobRequest {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(
24        workspace_rid: super::super::super::api::rids::WorkspaceRid,
25        ingest_job_request: super::IngestJobRequest,
26    ) -> Self {
27        Self::builder()
28            .workspace_rid(workspace_rid)
29            .ingest_job_request(ingest_job_request)
30            .build()
31    }
32    #[inline]
33    pub fn workspace_rid(&self) -> &super::super::super::api::rids::WorkspaceRid {
34        &self.workspace_rid
35    }
36    #[inline]
37    pub fn ingest_job_request(&self) -> &super::IngestJobRequest {
38        &*self.ingest_job_request
39    }
40}