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