Skip to main content

nominal_api/conjure/clients/ingest/api/
internal_ingest_job_service.rs

1use conjure_http::endpoint;
2/// Internal API for managing ingest jobs. This service is filtered out from public documentation.
3#[conjure_http::conjure_client(name = "InternalIngestJobService")]
4pub trait InternalIngestJobService<
5    #[response_body]
6    I: Iterator<
7            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
8        >,
9> {
10    /// Creates an ingest job, returning a RID for the job.
11    #[endpoint(
12        method = POST,
13        path = "/internal/ingest/v1/ingest-job",
14        name = "createIngestJob",
15        accept = conjure_http::client::StdResponseDeserializer
16    )]
17    fn create_ingest_job(
18        &self,
19        #[auth]
20        auth_: &conjure_object::BearerToken,
21        #[body(serializer = conjure_http::client::StdRequestSerializer)]
22        create_ingest_job_request: &super::super::super::super::objects::ingest::api::CreateIngestJobRequest,
23    ) -> Result<
24        super::super::super::super::objects::ingest::api::IngestJobRid,
25        conjure_http::private::Error,
26    >;
27    /// Returns a single ingest job by RID with full details including the ingest request.
28    #[endpoint(
29        method = GET,
30        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}",
31        name = "getIngestJobInternal",
32        accept = conjure_http::client::StdResponseDeserializer
33    )]
34    fn get_ingest_job_internal(
35        &self,
36        #[auth]
37        auth_: &conjure_object::BearerToken,
38        #[path(
39            name = "ingestJobRid",
40            encoder = conjure_http::client::conjure::PlainEncoder
41        )]
42        ingest_job_rid: &super::super::super::super::objects::ingest::api::IngestJobRid,
43    ) -> Result<
44        super::super::super::super::objects::ingest::api::InternalIngestJob,
45        conjure_http::private::Error,
46    >;
47    /// Updates the status of an ingest job.
48    #[endpoint(
49        method = PUT,
50        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}/status",
51        name = "updateIngestJobStatus",
52        accept = conjure_http::client::StdResponseDeserializer
53    )]
54    fn update_ingest_job_status(
55        &self,
56        #[auth]
57        auth_: &conjure_object::BearerToken,
58        #[path(
59            name = "ingestJobRid",
60            encoder = conjure_http::client::conjure::PlainEncoder
61        )]
62        ingest_job_rid: &super::super::super::super::objects::ingest::api::IngestJobRid,
63        #[body(serializer = conjure_http::client::StdRequestSerializer)]
64        status: &super::super::super::super::objects::ingest::api::IngestJobStatus,
65    ) -> Result<
66        super::super::super::super::objects::ingest::api::IngestJobStatus,
67        conjure_http::private::Error,
68    >;
69}
70/// Internal API for managing ingest jobs. This service is filtered out from public documentation.
71#[conjure_http::conjure_client(name = "InternalIngestJobService")]
72pub trait AsyncInternalIngestJobService<
73    #[response_body]
74    I: conjure_http::private::Stream<
75            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
76        >,
77> {
78    /// Creates an ingest job, returning a RID for the job.
79    #[endpoint(
80        method = POST,
81        path = "/internal/ingest/v1/ingest-job",
82        name = "createIngestJob",
83        accept = conjure_http::client::StdResponseDeserializer
84    )]
85    async fn create_ingest_job(
86        &self,
87        #[auth]
88        auth_: &conjure_object::BearerToken,
89        #[body(serializer = conjure_http::client::StdRequestSerializer)]
90        create_ingest_job_request: &super::super::super::super::objects::ingest::api::CreateIngestJobRequest,
91    ) -> Result<
92        super::super::super::super::objects::ingest::api::IngestJobRid,
93        conjure_http::private::Error,
94    >;
95    /// Returns a single ingest job by RID with full details including the ingest request.
96    #[endpoint(
97        method = GET,
98        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}",
99        name = "getIngestJobInternal",
100        accept = conjure_http::client::StdResponseDeserializer
101    )]
102    async fn get_ingest_job_internal(
103        &self,
104        #[auth]
105        auth_: &conjure_object::BearerToken,
106        #[path(
107            name = "ingestJobRid",
108            encoder = conjure_http::client::conjure::PlainEncoder
109        )]
110        ingest_job_rid: &super::super::super::super::objects::ingest::api::IngestJobRid,
111    ) -> Result<
112        super::super::super::super::objects::ingest::api::InternalIngestJob,
113        conjure_http::private::Error,
114    >;
115    /// Updates the status of an ingest job.
116    #[endpoint(
117        method = PUT,
118        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}/status",
119        name = "updateIngestJobStatus",
120        accept = conjure_http::client::StdResponseDeserializer
121    )]
122    async fn update_ingest_job_status(
123        &self,
124        #[auth]
125        auth_: &conjure_object::BearerToken,
126        #[path(
127            name = "ingestJobRid",
128            encoder = conjure_http::client::conjure::PlainEncoder
129        )]
130        ingest_job_rid: &super::super::super::super::objects::ingest::api::IngestJobRid,
131        #[body(serializer = conjure_http::client::StdRequestSerializer)]
132        status: &super::super::super::super::objects::ingest::api::IngestJobStatus,
133    ) -> Result<
134        super::super::super::super::objects::ingest::api::IngestJobStatus,
135        conjure_http::private::Error,
136    >;
137}
138/// Internal API for managing ingest jobs. This service is filtered out from public documentation.
139#[conjure_http::conjure_client(name = "InternalIngestJobService", local)]
140pub trait LocalAsyncInternalIngestJobService<
141    #[response_body]
142    I: conjure_http::private::Stream<
143            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
144        >,
145> {
146    /// Creates an ingest job, returning a RID for the job.
147    #[endpoint(
148        method = POST,
149        path = "/internal/ingest/v1/ingest-job",
150        name = "createIngestJob",
151        accept = conjure_http::client::StdResponseDeserializer
152    )]
153    async fn create_ingest_job(
154        &self,
155        #[auth]
156        auth_: &conjure_object::BearerToken,
157        #[body(serializer = conjure_http::client::StdRequestSerializer)]
158        create_ingest_job_request: &super::super::super::super::objects::ingest::api::CreateIngestJobRequest,
159    ) -> Result<
160        super::super::super::super::objects::ingest::api::IngestJobRid,
161        conjure_http::private::Error,
162    >;
163    /// Returns a single ingest job by RID with full details including the ingest request.
164    #[endpoint(
165        method = GET,
166        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}",
167        name = "getIngestJobInternal",
168        accept = conjure_http::client::StdResponseDeserializer
169    )]
170    async fn get_ingest_job_internal(
171        &self,
172        #[auth]
173        auth_: &conjure_object::BearerToken,
174        #[path(
175            name = "ingestJobRid",
176            encoder = conjure_http::client::conjure::PlainEncoder
177        )]
178        ingest_job_rid: &super::super::super::super::objects::ingest::api::IngestJobRid,
179    ) -> Result<
180        super::super::super::super::objects::ingest::api::InternalIngestJob,
181        conjure_http::private::Error,
182    >;
183    /// Updates the status of an ingest job.
184    #[endpoint(
185        method = PUT,
186        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}/status",
187        name = "updateIngestJobStatus",
188        accept = conjure_http::client::StdResponseDeserializer
189    )]
190    async fn update_ingest_job_status(
191        &self,
192        #[auth]
193        auth_: &conjure_object::BearerToken,
194        #[path(
195            name = "ingestJobRid",
196            encoder = conjure_http::client::conjure::PlainEncoder
197        )]
198        ingest_job_rid: &super::super::super::super::objects::ingest::api::IngestJobRid,
199        #[body(serializer = conjure_http::client::StdRequestSerializer)]
200        status: &super::super::super::super::objects::ingest::api::IngestJobStatus,
201    ) -> Result<
202        super::super::super::super::objects::ingest::api::IngestJobStatus,
203        conjure_http::private::Error,
204    >;
205}