Skip to main content

orvanta_api/apis/
bpmn_instance_api.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.2.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration};
16
17
18/// struct for typed errors of method [`bulk_migrate_bpmn_instances`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum BulkMigrateBpmnInstancesError {
22    Status400(models::BpmnMigrationRefusal),
23    Status402(String),
24    UnknownValue(serde_json::Value),
25}
26
27/// struct for typed errors of method [`cancel_bpmn_instance`]
28#[derive(Debug, Clone, Serialize, Deserialize)]
29#[serde(untagged)]
30pub enum CancelBpmnInstanceError {
31    Status402(String),
32    UnknownValue(serde_json::Value),
33}
34
35/// struct for typed errors of method [`check_bpmn_instance_migration`]
36#[derive(Debug, Clone, Serialize, Deserialize)]
37#[serde(untagged)]
38pub enum CheckBpmnInstanceMigrationError {
39    Status402(String),
40    UnknownValue(serde_json::Value),
41}
42
43/// struct for typed errors of method [`check_bpmn_version_pair`]
44#[derive(Debug, Clone, Serialize, Deserialize)]
45#[serde(untagged)]
46pub enum CheckBpmnVersionPairError {
47    Status402(String),
48    UnknownValue(serde_json::Value),
49}
50
51/// struct for typed errors of method [`complete_bpmn_user_task`]
52#[derive(Debug, Clone, Serialize, Deserialize)]
53#[serde(untagged)]
54pub enum CompleteBpmnUserTaskError {
55    Status401(String),
56    Status402(String),
57    UnknownValue(serde_json::Value),
58}
59
60/// struct for typed errors of method [`get_bpmn_flow_version_rollup`]
61#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum GetBpmnFlowVersionRollupError {
64    Status402(String),
65    UnknownValue(serde_json::Value),
66}
67
68/// struct for typed errors of method [`get_bpmn_instance`]
69#[derive(Debug, Clone, Serialize, Deserialize)]
70#[serde(untagged)]
71pub enum GetBpmnInstanceError {
72    Status402(String),
73    UnknownValue(serde_json::Value),
74}
75
76/// struct for typed errors of method [`get_bpmn_instance_status`]
77#[derive(Debug, Clone, Serialize, Deserialize)]
78#[serde(untagged)]
79pub enum GetBpmnInstanceStatusError {
80    Status402(String),
81    UnknownValue(serde_json::Value),
82}
83
84/// struct for typed errors of method [`get_bpmn_version_rollup`]
85#[derive(Debug, Clone, Serialize, Deserialize)]
86#[serde(untagged)]
87pub enum GetBpmnVersionRollupError {
88    Status402(String),
89    UnknownValue(serde_json::Value),
90}
91
92/// struct for typed errors of method [`list_bpmn_incidents`]
93#[derive(Debug, Clone, Serialize, Deserialize)]
94#[serde(untagged)]
95pub enum ListBpmnIncidentsError {
96    Status402(String),
97    UnknownValue(serde_json::Value),
98}
99
100/// struct for typed errors of method [`list_bpmn_instances`]
101#[derive(Debug, Clone, Serialize, Deserialize)]
102#[serde(untagged)]
103pub enum ListBpmnInstancesError {
104    Status402(String),
105    UnknownValue(serde_json::Value),
106}
107
108/// struct for typed errors of method [`list_pending_bpmn_user_tasks`]
109#[derive(Debug, Clone, Serialize, Deserialize)]
110#[serde(untagged)]
111pub enum ListPendingBpmnUserTasksError {
112    Status402(String),
113    UnknownValue(serde_json::Value),
114}
115
116/// struct for typed errors of method [`migrate_bpmn_instance`]
117#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum MigrateBpmnInstanceError {
120    Status400(models::BpmnMigrationRefusal),
121    Status402(String),
122    UnknownValue(serde_json::Value),
123}
124
125/// struct for typed errors of method [`plan_bpmn_instance_migration`]
126#[derive(Debug, Clone, Serialize, Deserialize)]
127#[serde(untagged)]
128pub enum PlanBpmnInstanceMigrationError {
129    Status402(String),
130    UnknownValue(serde_json::Value),
131}
132
133/// struct for typed errors of method [`plan_bpmn_version_pair_migration`]
134#[derive(Debug, Clone, Serialize, Deserialize)]
135#[serde(untagged)]
136pub enum PlanBpmnVersionPairMigrationError {
137    Status402(String),
138    UnknownValue(serde_json::Value),
139}
140
141/// struct for typed errors of method [`preview_bpmn_instance`]
142#[derive(Debug, Clone, Serialize, Deserialize)]
143#[serde(untagged)]
144pub enum PreviewBpmnInstanceError {
145    Status400(models::BpmnValidationProblem),
146    Status402(String),
147    UnknownValue(serde_json::Value),
148}
149
150/// struct for typed errors of method [`request_bpmn_instance_migration`]
151#[derive(Debug, Clone, Serialize, Deserialize)]
152#[serde(untagged)]
153pub enum RequestBpmnInstanceMigrationError {
154    Status400(models::BpmnMappingRefusal),
155    Status404(String),
156    Status402(String),
157    UnknownValue(serde_json::Value),
158}
159
160/// struct for typed errors of method [`retry_bpmn_incident`]
161#[derive(Debug, Clone, Serialize, Deserialize)]
162#[serde(untagged)]
163pub enum RetryBpmnIncidentError {
164    Status402(String),
165    UnknownValue(serde_json::Value),
166}
167
168/// struct for typed errors of method [`start_bpmn_instance`]
169#[derive(Debug, Clone, Serialize, Deserialize)]
170#[serde(untagged)]
171pub enum StartBpmnInstanceError {
172    Status402(String),
173    UnknownValue(serde_json::Value),
174}
175
176
177/// Bulk identity migration (#922). One validation for the whole batch, because eligibility is a property of the version pair, not of an instance. `from_version` is the whole bulk key -- a `bpmn_flow_version` row belongs to exactly one flow -- and both versions are checked to belong to the same flow before anything moves. Matching no running instance is a 200 with an empty `migrated`, not an error.
178pub async fn bulk_migrate_bpmn_instances(configuration: &configuration::Configuration, workspace: &str, bulk_migrate_bpmn_instances_request: models::BulkMigrateBpmnInstancesRequest) -> Result<models::BpmnMigrationResult, Error<BulkMigrateBpmnInstancesError>> {
179    let local_var_configuration = configuration;
180
181    let local_var_client = &local_var_configuration.client;
182
183    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/migrate", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
184    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
185
186    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
187        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
188    }
189    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
190        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
191    };
192    local_var_req_builder = local_var_req_builder.json(&bulk_migrate_bpmn_instances_request);
193
194    let local_var_req = local_var_req_builder.build()?;
195    let local_var_resp = local_var_client.execute(local_var_req).await?;
196
197    let local_var_status = local_var_resp.status();
198    let local_var_content = local_var_resp.text().await?;
199
200    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
201        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
202    } else {
203        let local_var_entity: Option<BulkMigrateBpmnInstancesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
204        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
205        Err(Error::ResponseError(local_var_error))
206    }
207}
208
209pub async fn cancel_bpmn_instance(configuration: &configuration::Configuration, workspace: &str, id: &str, cancel_bpmn_instance: models::CancelBpmnInstance) -> Result<String, Error<CancelBpmnInstanceError>> {
210    let local_var_configuration = configuration;
211
212    let local_var_client = &local_var_configuration.client;
213
214    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/cancel/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
215    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
216
217    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
218        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
219    }
220    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
221        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
222    };
223    local_var_req_builder = local_var_req_builder.json(&cancel_bpmn_instance);
224
225    let local_var_req = local_var_req_builder.build()?;
226    let local_var_resp = local_var_client.execute(local_var_req).await?;
227
228    let local_var_status = local_var_resp.status();
229    let local_var_content = local_var_resp.text().await?;
230
231    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
232        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
233    } else {
234        let local_var_entity: Option<CancelBpmnInstanceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
235        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
236        Err(Error::ResponseError(local_var_error))
237    }
238}
239
240/// The same per-pair verdict as checkBpmnVersionPair, but resolving this instance's own current pin and its runtime preconditions (it must not be an inline preview run, and it must still be running).
241pub async fn check_bpmn_instance_migration(configuration: &configuration::Configuration, workspace: &str, id: &str, target_version: i64) -> Result<models::BpmnMigrationCheck, Error<CheckBpmnInstanceMigrationError>> {
242    let local_var_configuration = configuration;
243
244    let local_var_client = &local_var_configuration.client;
245
246    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/{id}/migration/check", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
247    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
248
249    local_var_req_builder = local_var_req_builder.query(&[("target_version", &target_version.to_string())]);
250    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
251        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
252    }
253    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
254        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
255    };
256
257    let local_var_req = local_var_req_builder.build()?;
258    let local_var_resp = local_var_client.execute(local_var_req).await?;
259
260    let local_var_status = local_var_resp.status();
261    let local_var_content = local_var_resp.text().await?;
262
263    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
264        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
265    } else {
266        let local_var_entity: Option<CheckBpmnInstanceMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
267        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
268        Err(Error::ResponseError(local_var_error))
269    }
270}
271
272/// Runs the identity-migration contract (#922) over two compiled definitions of the same flow and reports every blocker, grouped by rule. Reads no runtime state at all, so the verdict is a property of the (from_version, to_version) *pair* and applies to every instance pinned to from_version -- which is what makes it answerable with no instance and cacheable per version.
273pub async fn check_bpmn_version_pair(configuration: &configuration::Configuration, workspace: &str, path: &str, from_version: i64, to_version: i64) -> Result<models::BpmnMigrationCheck, Error<CheckBpmnVersionPairError>> {
274    let local_var_configuration = configuration;
275
276    let local_var_client = &local_var_configuration.client;
277
278    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/migration/check/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
279    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
280
281    local_var_req_builder = local_var_req_builder.query(&[("from_version", &from_version.to_string())]);
282    local_var_req_builder = local_var_req_builder.query(&[("to_version", &to_version.to_string())]);
283    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
284        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
285    }
286    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
287        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
288    };
289
290    let local_var_req = local_var_req_builder.build()?;
291    let local_var_resp = local_var_client.execute(local_var_req).await?;
292
293    let local_var_status = local_var_resp.status();
294    let local_var_content = local_var_resp.text().await?;
295
296    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
297        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
298    } else {
299        let local_var_entity: Option<CheckBpmnVersionPairError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
300        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
301        Err(Error::ResponseError(local_var_error))
302    }
303}
304
305/// Deliver a user task's form data and unpark the instance. The body is the completion payload; when the task declares form fields it is validated against them server-side (required fields, declared defaults, enum values -- see #833), unless the model sets `flowable:formFieldValidation=\"false\"`.  Since #1104 the caller must be in the task's declared audience. This was previously unenforced: anyone who could see an instance could complete any of its user tasks, including one assigned to somebody else. 
306pub async fn complete_bpmn_user_task(configuration: &configuration::Configuration, workspace: &str, id: &str, user_task_id: &str, request_body: std::collections::HashMap<String, serde_json::Value>) -> Result<String, Error<CompleteBpmnUserTaskError>> {
307    let local_var_configuration = configuration;
308
309    let local_var_client = &local_var_configuration.client;
310
311    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/{id}/user-tasks/{user_task_id}/complete", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), user_task_id=crate::apis::urlencode(user_task_id));
312    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
313
314    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
315        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
316    }
317    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
318        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
319    };
320    local_var_req_builder = local_var_req_builder.json(&request_body);
321
322    let local_var_req = local_var_req_builder.build()?;
323    let local_var_resp = local_var_client.execute(local_var_req).await?;
324
325    let local_var_status = local_var_resp.status();
326    let local_var_content = local_var_resp.text().await?;
327
328    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
329        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
330    } else {
331        let local_var_entity: Option<CompleteBpmnUserTaskError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
332        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
333        Err(Error::ResponseError(local_var_error))
334    }
335}
336
337/// #919, narrowed to a single flow. Identical shape to the workspace rollup. A flow that exists but has nothing running answers with an empty `flows` list, not a 404.
338pub async fn get_bpmn_flow_version_rollup(configuration: &configuration::Configuration, workspace: &str, path: &str, check: Option<bool>) -> Result<models::BpmnVersionRollup, Error<GetBpmnFlowVersionRollupError>> {
339    let local_var_configuration = configuration;
340
341    let local_var_client = &local_var_configuration.client;
342
343    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/version_rollup/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
344    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
345
346    if let Some(ref local_var_str) = check {
347        local_var_req_builder = local_var_req_builder.query(&[("check", &local_var_str.to_string())]);
348    }
349    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
350        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
351    }
352    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
353        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
354    };
355
356    let local_var_req = local_var_req_builder.build()?;
357    let local_var_resp = local_var_client.execute(local_var_req).await?;
358
359    let local_var_status = local_var_resp.status();
360    let local_var_content = local_var_resp.text().await?;
361
362    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
363        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
364    } else {
365        let local_var_entity: Option<GetBpmnFlowVersionRollupError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
366        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
367        Err(Error::ResponseError(local_var_error))
368    }
369}
370
371pub async fn get_bpmn_instance(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::BpmnInstanceDetail, Error<GetBpmnInstanceError>> {
372    let local_var_configuration = configuration;
373
374    let local_var_client = &local_var_configuration.client;
375
376    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/get/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
377    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
378
379    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
380        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
381    }
382    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
383        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
384    };
385
386    let local_var_req = local_var_req_builder.build()?;
387    let local_var_resp = local_var_client.execute(local_var_req).await?;
388
389    let local_var_status = local_var_resp.status();
390    let local_var_content = local_var_resp.text().await?;
391
392    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
393        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
394    } else {
395        let local_var_entity: Option<GetBpmnInstanceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
396        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
397        Err(Error::ResponseError(local_var_error))
398    }
399}
400
401/// Frontend-facing projection of the process instance's live runtime state (lifecycle, per-activity status, variables, history, incidents), consumed by the live process token overlay. 404 if the instance isn't in the workspace, or if the engine has not picked it up yet (no runtime state).
402pub async fn get_bpmn_instance_status(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::ProcessInstanceStatus, Error<GetBpmnInstanceStatusError>> {
403    let local_var_configuration = configuration;
404
405    let local_var_client = &local_var_configuration.client;
406
407    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/get/{id}/status", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
408    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
409
410    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
411        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
412    }
413    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
414        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
415    };
416
417    let local_var_req = local_var_req_builder.build()?;
418    let local_var_resp = local_var_client.execute(local_var_req).await?;
419
420    let local_var_status = local_var_resp.status();
421    let local_var_content = local_var_resp.text().await?;
422
423    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
424        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
425    } else {
426        let local_var_entity: Option<GetBpmnInstanceStatusError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
427        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
428        Err(Error::ResponseError(local_var_error))
429    }
430}
431
432/// #919. Answers \"which of my running instances are on an old definition?\" for the whole workspace, and per pinned version whether it is migratable to that flow's latest and if not why (#922's validator, computed once per version because eligibility is a property of the (version, latest) pair rather than of an instance). Read-only.  An instance is pinned at start to one `bpmn_flow_version` (`v2_job.runnable_id`) and resolves its model from that row on every step, so instances complete on the version they started on while new starts use the latest. `runnable_id` is the source here, never the denormalised `bpmn_process_status.bpmn_version`, which the engine writes on insert and never refreshes.  \"Running\" means a root instance still queued and uncancelled -- the same set a bulk migrate would move. Inline preview runs are excluded: they carry their model on the job row and are on no version.
433pub async fn get_bpmn_version_rollup(configuration: &configuration::Configuration, workspace: &str, check: Option<bool>) -> Result<models::BpmnVersionRollup, Error<GetBpmnVersionRollupError>> {
434    let local_var_configuration = configuration;
435
436    let local_var_client = &local_var_configuration.client;
437
438    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/version_rollup", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
439    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
440
441    if let Some(ref local_var_str) = check {
442        local_var_req_builder = local_var_req_builder.query(&[("check", &local_var_str.to_string())]);
443    }
444    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
445        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
446    }
447    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
448        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
449    };
450
451    let local_var_req = local_var_req_builder.build()?;
452    let local_var_resp = local_var_client.execute(local_var_req).await?;
453
454    let local_var_status = local_var_resp.status();
455    let local_var_content = local_var_resp.text().await?;
456
457    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
458        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
459    } else {
460        let local_var_entity: Option<GetBpmnVersionRollupError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
461        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
462        Err(Error::ResponseError(local_var_error))
463    }
464}
465
466pub async fn list_bpmn_incidents(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<Vec<models::BpmnIncident>, Error<ListBpmnIncidentsError>> {
467    let local_var_configuration = configuration;
468
469    let local_var_client = &local_var_configuration.client;
470
471    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/{id}/incidents", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
472    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
473
474    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
475        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
476    }
477    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
478        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
479    };
480
481    let local_var_req = local_var_req_builder.build()?;
482    let local_var_resp = local_var_client.execute(local_var_req).await?;
483
484    let local_var_status = local_var_resp.status();
485    let local_var_content = local_var_resp.text().await?;
486
487    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
488        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
489    } else {
490        let local_var_entity: Option<ListBpmnIncidentsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
491        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
492        Err(Error::ResponseError(local_var_error))
493    }
494}
495
496pub async fn list_bpmn_instances(configuration: &configuration::Configuration, workspace: &str, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::BpmnInstanceSummary>, Error<ListBpmnInstancesError>> {
497    let local_var_configuration = configuration;
498
499    let local_var_client = &local_var_configuration.client;
500
501    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
502    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
503
504    if let Some(ref local_var_str) = page {
505        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
506    }
507    if let Some(ref local_var_str) = per_page {
508        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
509    }
510    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
511        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
512    }
513    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
514        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
515    };
516
517    let local_var_req = local_var_req_builder.build()?;
518    let local_var_resp = local_var_client.execute(local_var_req).await?;
519
520    let local_var_status = local_var_resp.status();
521    let local_var_content = local_var_resp.text().await?;
522
523    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
524        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
525    } else {
526        let local_var_entity: Option<ListBpmnInstancesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
527        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
528        Err(Error::ResponseError(local_var_error))
529    }
530}
531
532/// Every `<userTask>` in the workspace that is parked awaiting a human and that the caller may act on (#1104). This is the read side the completion operation below always presumed: that operation is addressed by `(instance id, element id)`, which a human has no way to discover otherwise.  Filtering is **server-side and is the same rule the completion operation enforces**. A task is returned when the caller is an admin, when the task declares no assignment it can resolve, or when the caller matches a declared literal `assignee`/`owner`/`candidateUsers` entry or one of the `candidateGroups`. Assignment written as an expression (`${approver}`) cannot be resolved on this path -- there is no runtime identity resolution in the engine -- and is reported via `assignment_unresolved` rather than guessed at.  Pagination applies to process *instances*, not to tasks: one instance can hold several parked tasks on parallel branches. 
533pub async fn list_pending_bpmn_user_tasks(configuration: &configuration::Configuration, workspace: &str, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::PendingUserTask>, Error<ListPendingBpmnUserTasksError>> {
534    let local_var_configuration = configuration;
535
536    let local_var_client = &local_var_configuration.client;
537
538    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/user-tasks/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
539    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
540
541    if let Some(ref local_var_str) = page {
542        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
543    }
544    if let Some(ref local_var_str) = per_page {
545        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
546    }
547    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
548        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
549    }
550    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
551        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
552    };
553
554    let local_var_req = local_var_req_builder.build()?;
555    let local_var_resp = local_var_client.execute(local_var_req).await?;
556
557    let local_var_status = local_var_resp.status();
558    let local_var_content = local_var_resp.text().await?;
559
560    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
561        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
562    } else {
563        let local_var_entity: Option<ListPendingBpmnUserTasksError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
564        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
565        Err(Error::ResponseError(local_var_error))
566    }
567}
568
569/// Validated pointer swap (#922). Validates the (current, target) pair against the identity-migration contract and, only if it passes, moves `v2_job.runnable_id` to the target version, refreshes the denormalised `bpmn_process_status.bpmn_version` (which no engine writer ever refreshes) and appends a `bpmn_instance_migration` ledger row -- all in one transaction. `process_status` is never written and `suspend_until` is never nudged; the instance runs on the target version from its next step, because the engine re-resolves the pinned definition on every step. A pair that fails the contract is refused with a 400 naming every offending identifier -- it is never migrated and flagged.
570pub async fn migrate_bpmn_instance(configuration: &configuration::Configuration, workspace: &str, id: &str, migrate_bpmn_instance_request: models::MigrateBpmnInstanceRequest) -> Result<models::BpmnMigrationResult, Error<MigrateBpmnInstanceError>> {
571    let local_var_configuration = configuration;
572
573    let local_var_client = &local_var_configuration.client;
574
575    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/{id}/migrate", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
576    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
577
578    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
579        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
580    }
581    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
582        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
583    };
584    local_var_req_builder = local_var_req_builder.json(&migrate_bpmn_instance_request);
585
586    let local_var_req = local_var_req_builder.build()?;
587    let local_var_resp = local_var_client.execute(local_var_req).await?;
588
589    let local_var_status = local_var_resp.status();
590    let local_var_content = local_var_resp.text().await?;
591
592    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
593        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
594    } else {
595        let local_var_entity: Option<MigrateBpmnInstanceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
596        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
597        Err(Error::ResponseError(local_var_error))
598    }
599}
600
601/// The same resolution as planBpmnVersionPairMigration, but resolving this instance's own current pin and its runtime preconditions (it must not be an inline preview run, and it must still be running). Writes nothing.
602pub async fn plan_bpmn_instance_migration(configuration: &configuration::Configuration, workspace: &str, id: &str, plan_bpmn_instance_migration_request: models::PlanBpmnInstanceMigrationRequest) -> Result<models::BpmnMigrationPlanCheck, Error<PlanBpmnInstanceMigrationError>> {
603    let local_var_configuration = configuration;
604
605    let local_var_client = &local_var_configuration.client;
606
607    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/{id}/migration/plan", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
608    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
609
610    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
611        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
612    }
613    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
614        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
615    };
616    local_var_req_builder = local_var_req_builder.json(&plan_bpmn_instance_migration_request);
617
618    let local_var_req = local_var_req_builder.build()?;
619    let local_var_resp = local_var_client.execute(local_var_req).await?;
620
621    let local_var_status = local_var_resp.status();
622    let local_var_content = local_var_resp.text().await?;
623
624    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
625        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
626    } else {
627        let local_var_entity: Option<PlanBpmnInstanceMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
628        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
629        Err(Error::ResponseError(local_var_error))
630    }
631}
632
633/// Runs the *mapped* migration contract (#925, stage 4) over two compiled definitions of the same flow and, if the document holds, returns the resolved substitution as a plan. `POST` because the mapping is a document rather than a query parameter -- the call reads two definitions and **writes nothing**. Where the identity contract (checkBpmnVersionPair) asks \"may this instance run on the target unchanged\", this asks the strictly larger \"may it run on the target after renaming the identifiers this document names\". It admits renames -- of elements, of sequence flows (derived from their endpoints, never declared) and of the process id -- and refuses every topological change: a deleted activity with no replacement, an N:1 merge, a cross-scope move, a changed set of incoming flows, a re-attached boundary event. An element the document does not name is implicitly mapped to its own id, and is then subject to every rule an explicit mapping is. An element that is neither named nor present in the target is a hard refusal (`activity_deleted`), never a silently dropped token. Rule 9 additionally refuses a mapping that renames an identifier away while the target version still defines it (which includes every permutation): the engine derives job, token and scope ids from these identifiers, so a later dispatch at the reused id would re-derive ids the instance has already used and hang there with no incident. A plan this returns is submitted with requestBpmnInstanceMigration.
634pub async fn plan_bpmn_version_pair_migration(configuration: &configuration::Configuration, workspace: &str, path: &str, plan_bpmn_version_pair_migration_request: models::PlanBpmnVersionPairMigrationRequest) -> Result<models::BpmnMigrationPlanCheck, Error<PlanBpmnVersionPairMigrationError>> {
635    let local_var_configuration = configuration;
636
637    let local_var_client = &local_var_configuration.client;
638
639    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/migration/plan/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
640    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
641
642    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
643        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
644    }
645    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
646        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
647    };
648    local_var_req_builder = local_var_req_builder.json(&plan_bpmn_version_pair_migration_request);
649
650    let local_var_req = local_var_req_builder.build()?;
651    let local_var_resp = local_var_client.execute(local_var_req).await?;
652
653    let local_var_status = local_var_resp.status();
654    let local_var_content = local_var_resp.text().await?;
655
656    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
657        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
658    } else {
659        let local_var_entity: Option<PlanBpmnVersionPairMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
660        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
661        Err(Error::ResponseError(local_var_error))
662    }
663}
664
665/// Start a process instance from an undeployed diagram (#710 stage 3), the \"run without deploying\" counterpart to `POST /bpmn/run/p/{path}`. The submitted XML is parsed and validated exactly as a real deploy would -- nothing is written to `bpmn_flow`/`bpmn_flow_version`.
666pub async fn preview_bpmn_instance(configuration: &configuration::Configuration, workspace: &str, preview_bpmn_instance: models::PreviewBpmnInstance) -> Result<String, Error<PreviewBpmnInstanceError>> {
667    let local_var_configuration = configuration;
668
669    let local_var_client = &local_var_configuration.client;
670
671    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/run/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
672    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
673
674    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
675        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
676    }
677    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
678        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
679    };
680    local_var_req_builder = local_var_req_builder.json(&preview_bpmn_instance);
681
682    let local_var_req = local_var_req_builder.build()?;
683    let local_var_resp = local_var_client.execute(local_var_req).await?;
684
685    let local_var_status = local_var_resp.status();
686    let local_var_content = local_var_resp.text().await?;
687
688    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
689        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
690    } else {
691        let local_var_entity: Option<PreviewBpmnInstanceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
692        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
693        Err(Error::ResponseError(local_var_error))
694    }
695}
696
697/// The write half of the mapped migration contract (#925, stage 4). Resolves the mapping against this instance's own pin exactly as planBpmnInstanceMigration does and, only if it resolves to a plan, writes a migration **request** into `process_status.control.migrate` and pulls an existing park forward so the engine re-pulls the instance promptly. Validate-then-write in one transaction: a mapping that does not hold leaves nothing behind. Unlike migrateBpmnInstance this does **not** perform the migration. A mapped migration rewrites `process_status`, which the engine owns, so the pin move, the blob rewrite and the `bpmn_instance_migration` ledger row all happen together in the engine's next step. A 200 here means the request was accepted and stored, not that the instance has moved -- poll the pin, or the instance's status, to observe it. The stored request carries the **mapping document**, never the resolved plan. A plan is a bare identifier substitution, so a control entry carrying one would let anything able to write the control channel substitute arbitrary identifiers into a running instance; the engine re-derives the plan from the document against the two definitions it actually resolved. The `plan` in this response is informational. The engine can still refuse what this accepts, for the one reason that is not a property of the version pair: an activity `Started` on a renamed element holds a live child job id derived from the source id. That is refused at apply time and the signal is that the pin did not move. Everything that *is* a model-vs-model property, including rule 9 (vacating an identifier the target still defines), is refused here with a 400.
698pub async fn request_bpmn_instance_migration(configuration: &configuration::Configuration, workspace: &str, id: &str, request_bpmn_instance_migration_request: models::RequestBpmnInstanceMigrationRequest) -> Result<models::BpmnMigrationRequested, Error<RequestBpmnInstanceMigrationError>> {
699    let local_var_configuration = configuration;
700
701    let local_var_client = &local_var_configuration.client;
702
703    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/{id}/migration/request", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
704    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
705
706    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
707        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
708    }
709    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
710        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
711    };
712    local_var_req_builder = local_var_req_builder.json(&request_bpmn_instance_migration_request);
713
714    let local_var_req = local_var_req_builder.build()?;
715    let local_var_resp = local_var_client.execute(local_var_req).await?;
716
717    let local_var_status = local_var_resp.status();
718    let local_var_content = local_var_resp.text().await?;
719
720    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
721        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
722    } else {
723        let local_var_entity: Option<RequestBpmnInstanceMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
724        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
725        Err(Error::ResponseError(local_var_error))
726    }
727}
728
729/// Validates the ActivityFailed incident, identified by the original failed child job's id, and records a retry intent on the process instance. The execution engine does not yet act on this intent: retrying an incident is not yet functional end-to-end. This endpoint only validates ownership of the incident and records the intent for a future engine version to consume.
730pub async fn retry_bpmn_incident(configuration: &configuration::Configuration, workspace: &str, id: &str, job_id: &str) -> Result<String, Error<RetryBpmnIncidentError>> {
731    let local_var_configuration = configuration;
732
733    let local_var_client = &local_var_configuration.client;
734
735    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/instances/{id}/incidents/{job_id}/retry", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), job_id=crate::apis::urlencode(job_id));
736    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
737
738    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
739        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
740    }
741    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
742        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
743    };
744
745    let local_var_req = local_var_req_builder.build()?;
746    let local_var_resp = local_var_client.execute(local_var_req).await?;
747
748    let local_var_status = local_var_resp.status();
749    let local_var_content = local_var_resp.text().await?;
750
751    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
752        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
753    } else {
754        let local_var_entity: Option<RetryBpmnIncidentError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
755        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
756        Err(Error::ResponseError(local_var_error))
757    }
758}
759
760pub async fn start_bpmn_instance(configuration: &configuration::Configuration, workspace: &str, path: &str, start_bpmn_instance: models::StartBpmnInstance) -> Result<String, Error<StartBpmnInstanceError>> {
761    let local_var_configuration = configuration;
762
763    let local_var_client = &local_var_configuration.client;
764
765    let local_var_uri_str = format!("{}/w/{workspace}/bpmn/run/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
766    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
767
768    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
769        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
770    }
771    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
772        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
773    };
774    local_var_req_builder = local_var_req_builder.json(&start_bpmn_instance);
775
776    let local_var_req = local_var_req_builder.build()?;
777    let local_var_resp = local_var_client.execute(local_var_req).await?;
778
779    let local_var_status = local_var_resp.status();
780    let local_var_content = local_var_resp.text().await?;
781
782    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
783        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
784    } else {
785        let local_var_entity: Option<StartBpmnInstanceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
786        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
787        Err(Error::ResponseError(local_var_error))
788    }
789}
790