rusty_falcon/apis/
message_center_api.rs

1/*
2 * CrowdStrike API Specification
3 *
4 * Use this API specification as a reference for the API endpoints you can use to interact with your Falcon environment. These endpoints support authentication via OAuth2 and interact with detections and network containment. For detailed usage guides and examples, see our [documentation inside the Falcon console](https://falcon.crowdstrike.com/support/documentation).     To use the APIs described below, combine the base URL with the path shown for each API endpoint. For commercial cloud customers, your base URL is `https://api.crowdstrike.com`.    Each API endpoint requires authorization via an OAuth2 token. Your first API request should retrieve an OAuth2 token using the `oauth2/token` endpoint, such as `https://api.crowdstrike.com/oauth2/token`. For subsequent requests, include the OAuth2 token in an HTTP authorization header. Tokens expire after 30 minutes, after which you should make a new token request to continue making API requests.
5 *
6 * The version of the OpenAPI document: rolling
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use reqwest;
12
13use super::{configuration, Error};
14use crate::{apis::ResponseContent, models};
15
16/// struct for typed errors of method [`aggregate_cases`]
17#[derive(Debug, Clone, Serialize, Deserialize)]
18#[serde(untagged)]
19pub enum AggregateCasesError {
20    Status403(models::MsaPeriodReplyMetaOnly),
21    Status429(models::MsaPeriodReplyMetaOnly),
22    Status500(models::MsaPeriodReplyMetaOnly),
23    UnknownValue(serde_json::Value),
24}
25
26/// struct for typed errors of method [`case_add_activity`]
27#[derive(Debug, Clone, Serialize, Deserialize)]
28#[serde(untagged)]
29pub enum CaseAddActivityError {
30    Status400(models::MsaspecPeriodResponseFields),
31    Status403(models::MsaspecPeriodResponseFields),
32    Status429(models::MsaPeriodReplyMetaOnly),
33    Status500(models::MsaspecPeriodResponseFields),
34    UnknownValue(serde_json::Value),
35}
36
37/// struct for typed errors of method [`case_add_attachment`]
38#[derive(Debug, Clone, Serialize, Deserialize)]
39#[serde(untagged)]
40pub enum CaseAddAttachmentError {
41    Status400(models::MsaspecPeriodResponseFields),
42    Status403(models::MsaspecPeriodResponseFields),
43    Status429(models::MsaPeriodReplyMetaOnly),
44    Status500(models::MsaspecPeriodResponseFields),
45    UnknownValue(serde_json::Value),
46}
47
48/// struct for typed errors of method [`case_download_attachment`]
49#[derive(Debug, Clone, Serialize, Deserialize)]
50#[serde(untagged)]
51pub enum CaseDownloadAttachmentError {
52    Status400(models::MsaspecPeriodResponseFields),
53    Status403(models::MsaspecPeriodResponseFields),
54    Status404(models::MsaspecPeriodResponseFields),
55    Status429(models::MsaPeriodReplyMetaOnly),
56    Status500(models::MsaspecPeriodResponseFields),
57    UnknownValue(serde_json::Value),
58}
59
60/// struct for typed errors of method [`create_case`]
61#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum CreateCaseError {
64    Status400(models::MsaspecPeriodResponseFields),
65    Status403(models::MsaspecPeriodResponseFields),
66    Status429(models::MsaPeriodReplyMetaOnly),
67    Status500(models::MsaspecPeriodResponseFields),
68    UnknownValue(serde_json::Value),
69}
70
71/// struct for typed errors of method [`create_case_v2`]
72#[derive(Debug, Clone, Serialize, Deserialize)]
73#[serde(untagged)]
74pub enum CreateCaseV2Error {
75    Status400(models::MsaspecPeriodResponseFields),
76    Status403(models::MsaspecPeriodResponseFields),
77    Status429(models::MsaPeriodReplyMetaOnly),
78    Status500(models::MsaspecPeriodResponseFields),
79    UnknownValue(serde_json::Value),
80}
81
82/// struct for typed errors of method [`get_case_activity_by_ids`]
83#[derive(Debug, Clone, Serialize, Deserialize)]
84#[serde(untagged)]
85pub enum GetCaseActivityByIdsError {
86    Status400(models::MsaspecPeriodResponseFields),
87    Status403(models::MsaspecPeriodResponseFields),
88    Status429(models::MsaPeriodReplyMetaOnly),
89    Status500(models::MsaspecPeriodResponseFields),
90    UnknownValue(serde_json::Value),
91}
92
93/// struct for typed errors of method [`get_case_entities_by_ids`]
94#[derive(Debug, Clone, Serialize, Deserialize)]
95#[serde(untagged)]
96pub enum GetCaseEntitiesByIdsError {
97    Status400(models::MsaspecPeriodResponseFields),
98    Status403(models::MsaspecPeriodResponseFields),
99    Status429(models::MsaPeriodReplyMetaOnly),
100    Status500(models::MsaspecPeriodResponseFields),
101    UnknownValue(serde_json::Value),
102}
103
104/// struct for typed errors of method [`query_activity_by_case_id`]
105#[derive(Debug, Clone, Serialize, Deserialize)]
106#[serde(untagged)]
107pub enum QueryActivityByCaseIdError {
108    Status400(models::MsaspecPeriodResponseFields),
109    Status403(models::MsaspecPeriodResponseFields),
110    Status429(models::MsaPeriodReplyMetaOnly),
111    Status500(models::MsaspecPeriodResponseFields),
112    UnknownValue(serde_json::Value),
113}
114
115/// struct for typed errors of method [`query_cases_ids_by_filter`]
116#[derive(Debug, Clone, Serialize, Deserialize)]
117#[serde(untagged)]
118pub enum QueryCasesIdsByFilterError {
119    Status400(models::MsaspecPeriodResponseFields),
120    Status403(models::MsaspecPeriodResponseFields),
121    Status429(models::MsaPeriodReplyMetaOnly),
122    Status500(models::MsaspecPeriodResponseFields),
123    UnknownValue(serde_json::Value),
124}
125
126pub async fn aggregate_cases(
127    configuration: &configuration::Configuration,
128    body: Vec<models::MsaPeriodAggregateQueryRequest>,
129) -> Result<models::MsaPeriodAggregatesResponse, Error<AggregateCasesError>> {
130    let local_var_configuration = configuration;
131
132    let local_var_client = &local_var_configuration.client;
133
134    let local_var_uri_str = format!(
135        "{}/message-center/aggregates/cases/GET/v1",
136        local_var_configuration.base_path
137    );
138    let mut local_var_req_builder =
139        local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
140
141    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
142        local_var_req_builder =
143            local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
144    }
145    if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
146        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
147    };
148    local_var_req_builder = local_var_req_builder.json(&body);
149
150    let local_var_req = local_var_req_builder.build()?;
151    let local_var_resp = local_var_client.execute(local_var_req).await?;
152
153    let local_var_status = local_var_resp.status();
154    let local_var_content = local_var_resp.text().await?;
155
156    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
157        serde_json::from_str(&local_var_content).map_err(Error::from)
158    } else {
159        let local_var_entity: Option<AggregateCasesError> =
160            serde_json::from_str(&local_var_content).ok();
161        let local_var_error = ResponseContent {
162            status: local_var_status,
163            content: local_var_content,
164            entity: local_var_entity,
165        };
166        Err(Error::ResponseError(local_var_error))
167    }
168}
169
170pub async fn case_add_activity(
171    configuration: &configuration::Configuration,
172    body: models::DomainPeriodActivityCreationRequest,
173) -> Result<models::MsaspecPeriodResponseFields, Error<CaseAddActivityError>> {
174    let local_var_configuration = configuration;
175
176    let local_var_client = &local_var_configuration.client;
177
178    let local_var_uri_str = format!(
179        "{}/message-center/entities/case-activity/v1",
180        local_var_configuration.base_path
181    );
182    let mut local_var_req_builder =
183        local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
184
185    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
186        local_var_req_builder =
187            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.oauth_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(&body);
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        serde_json::from_str(&local_var_content).map_err(Error::from)
202    } else {
203        let local_var_entity: Option<CaseAddActivityError> =
204            serde_json::from_str(&local_var_content).ok();
205        let local_var_error = ResponseContent {
206            status: local_var_status,
207            content: local_var_content,
208            entity: local_var_entity,
209        };
210        Err(Error::ResponseError(local_var_error))
211    }
212}
213
214/// Upload an attachment for the case. Maximum upload size allowed is *15 MB*.   Filename must start with *[a-zA-Z0-9_-]*. Allowed characters in file name are *[a-zA-Z0-9-_.\\s]*.    Maximum file name is *255* characters      Following attachment types are allowed:   - png   - bmp   - jpg   - jpeg   - gif   - pdf   - doc   - docx   - xls   - xlsx   - pptx   - txt   - csv
215pub async fn case_add_attachment(
216    configuration: &configuration::Configuration,
217    case_id: &str,
218    user_uuid: &str,
219    _file: std::path::PathBuf,
220) -> Result<models::ApiPeriodMessageCenterAttachmentUploadResponse, Error<CaseAddAttachmentError>> {
221    let local_var_configuration = configuration;
222
223    let local_var_client = &local_var_configuration.client;
224
225    let local_var_uri_str = format!(
226        "{}/message-center/entities/case-attachment/v1",
227        local_var_configuration.base_path
228    );
229    let mut local_var_req_builder =
230        local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
231
232    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
233        local_var_req_builder =
234            local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
235    }
236    if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
237        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
238    };
239    let mut local_var_form = reqwest::multipart::Form::new();
240    local_var_form = local_var_form.text("case_id", case_id.to_string());
241    local_var_form = local_var_form.text("user_uuid", user_uuid.to_string());
242    // TODO: support file upload for 'file' parameter
243    local_var_req_builder = local_var_req_builder.multipart(local_var_form);
244
245    let local_var_req = local_var_req_builder.build()?;
246    let local_var_resp = local_var_client.execute(local_var_req).await?;
247
248    let local_var_status = local_var_resp.status();
249    let local_var_content = local_var_resp.text().await?;
250
251    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
252        serde_json::from_str(&local_var_content).map_err(Error::from)
253    } else {
254        let local_var_entity: Option<CaseAddAttachmentError> =
255            serde_json::from_str(&local_var_content).ok();
256        let local_var_error = ResponseContent {
257            status: local_var_status,
258            content: local_var_content,
259            entity: local_var_entity,
260        };
261        Err(Error::ResponseError(local_var_error))
262    }
263}
264
265pub async fn case_download_attachment(
266    configuration: &configuration::Configuration,
267    id: &str,
268) -> Result<String, Error<CaseDownloadAttachmentError>> {
269    let local_var_configuration = configuration;
270
271    let local_var_client = &local_var_configuration.client;
272
273    let local_var_uri_str = format!(
274        "{}/message-center/entities/case-attachment/v1",
275        local_var_configuration.base_path
276    );
277    let mut local_var_req_builder =
278        local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
279
280    local_var_req_builder = local_var_req_builder.query(&[("id", &id.to_string())]);
281    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
282        local_var_req_builder =
283            local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
284    }
285    if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
286        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
287    };
288
289    let local_var_req = local_var_req_builder.build()?;
290    let local_var_resp = local_var_client.execute(local_var_req).await?;
291
292    let local_var_status = local_var_resp.status();
293    let local_var_content = local_var_resp.text().await?;
294
295    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
296        serde_json::from_str(&local_var_content).map_err(Error::from)
297    } else {
298        let local_var_entity: Option<CaseDownloadAttachmentError> =
299            serde_json::from_str(&local_var_content).ok();
300        let local_var_error = ResponseContent {
301            status: local_var_status,
302            content: local_var_content,
303            entity: local_var_entity,
304        };
305        Err(Error::ResponseError(local_var_error))
306    }
307}
308
309pub async fn create_case(
310    configuration: &configuration::Configuration,
311    body: models::DomainPeriodCaseCreationRequest,
312) -> Result<models::MsaPeriodReplyAffectedEntities, Error<CreateCaseError>> {
313    let local_var_configuration = configuration;
314
315    let local_var_client = &local_var_configuration.client;
316
317    let local_var_uri_str = format!(
318        "{}/message-center/entities/case/v1",
319        local_var_configuration.base_path
320    );
321    let mut local_var_req_builder =
322        local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
323
324    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
325        local_var_req_builder =
326            local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
327    }
328    if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
329        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
330    };
331    local_var_req_builder = local_var_req_builder.json(&body);
332
333    let local_var_req = local_var_req_builder.build()?;
334    let local_var_resp = local_var_client.execute(local_var_req).await?;
335
336    let local_var_status = local_var_resp.status();
337    let local_var_content = local_var_resp.text().await?;
338
339    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
340        serde_json::from_str(&local_var_content).map_err(Error::from)
341    } else {
342        let local_var_entity: Option<CreateCaseError> =
343            serde_json::from_str(&local_var_content).ok();
344        let local_var_error = ResponseContent {
345            status: local_var_status,
346            content: local_var_content,
347            entity: local_var_entity,
348        };
349        Err(Error::ResponseError(local_var_error))
350    }
351}
352
353pub async fn create_case_v2(
354    configuration: &configuration::Configuration,
355    body: models::DomainPeriodCaseCreationRequestV2,
356) -> Result<models::MsaPeriodReplyAffectedEntities, Error<CreateCaseV2Error>> {
357    let local_var_configuration = configuration;
358
359    let local_var_client = &local_var_configuration.client;
360
361    let local_var_uri_str = format!(
362        "{}/message-center/entities/case/v2",
363        local_var_configuration.base_path
364    );
365    let mut local_var_req_builder =
366        local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
367
368    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
369        local_var_req_builder =
370            local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
371    }
372    if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
373        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
374    };
375    local_var_req_builder = local_var_req_builder.json(&body);
376
377    let local_var_req = local_var_req_builder.build()?;
378    let local_var_resp = local_var_client.execute(local_var_req).await?;
379
380    let local_var_status = local_var_resp.status();
381    let local_var_content = local_var_resp.text().await?;
382
383    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
384        serde_json::from_str(&local_var_content).map_err(Error::from)
385    } else {
386        let local_var_entity: Option<CreateCaseV2Error> =
387            serde_json::from_str(&local_var_content).ok();
388        let local_var_error = ResponseContent {
389            status: local_var_status,
390            content: local_var_content,
391            entity: local_var_entity,
392        };
393        Err(Error::ResponseError(local_var_error))
394    }
395}
396
397pub async fn get_case_activity_by_ids(
398    configuration: &configuration::Configuration,
399    body: models::MsaPeriodIdsRequest,
400) -> Result<models::ApiPeriodMessageCenterActivityResponse, Error<GetCaseActivityByIdsError>> {
401    let local_var_configuration = configuration;
402
403    let local_var_client = &local_var_configuration.client;
404
405    let local_var_uri_str = format!(
406        "{}/message-center/entities/case-activities/GET/v1",
407        local_var_configuration.base_path
408    );
409    let mut local_var_req_builder =
410        local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
411
412    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
413        local_var_req_builder =
414            local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
415    }
416    if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
417        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
418    };
419    local_var_req_builder = local_var_req_builder.json(&body);
420
421    let local_var_req = local_var_req_builder.build()?;
422    let local_var_resp = local_var_client.execute(local_var_req).await?;
423
424    let local_var_status = local_var_resp.status();
425    let local_var_content = local_var_resp.text().await?;
426
427    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
428        serde_json::from_str(&local_var_content).map_err(Error::from)
429    } else {
430        let local_var_entity: Option<GetCaseActivityByIdsError> =
431            serde_json::from_str(&local_var_content).ok();
432        let local_var_error = ResponseContent {
433            status: local_var_status,
434            content: local_var_content,
435            entity: local_var_entity,
436        };
437        Err(Error::ResponseError(local_var_error))
438    }
439}
440
441pub async fn get_case_entities_by_ids(
442    configuration: &configuration::Configuration,
443    body: models::MsaPeriodIdsRequest,
444) -> Result<models::ApiPeriodMessageCenterCasesResponse, Error<GetCaseEntitiesByIdsError>> {
445    let local_var_configuration = configuration;
446
447    let local_var_client = &local_var_configuration.client;
448
449    let local_var_uri_str = format!(
450        "{}/message-center/entities/cases/GET/v1",
451        local_var_configuration.base_path
452    );
453    let mut local_var_req_builder =
454        local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
455
456    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
457        local_var_req_builder =
458            local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
459    }
460    if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
461        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
462    };
463    local_var_req_builder = local_var_req_builder.json(&body);
464
465    let local_var_req = local_var_req_builder.build()?;
466    let local_var_resp = local_var_client.execute(local_var_req).await?;
467
468    let local_var_status = local_var_resp.status();
469    let local_var_content = local_var_resp.text().await?;
470
471    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
472        serde_json::from_str(&local_var_content).map_err(Error::from)
473    } else {
474        let local_var_entity: Option<GetCaseEntitiesByIdsError> =
475            serde_json::from_str(&local_var_content).ok();
476        let local_var_error = ResponseContent {
477            status: local_var_status,
478            content: local_var_content,
479            entity: local_var_entity,
480        };
481        Err(Error::ResponseError(local_var_error))
482    }
483}
484
485pub async fn query_activity_by_case_id(
486    configuration: &configuration::Configuration,
487    case_id: &str,
488    limit: Option<i32>,
489    sort: Option<&str>,
490    filter: Option<&str>,
491    offset: Option<&str>,
492) -> Result<models::MsaspecPeriodQueryResponse, Error<QueryActivityByCaseIdError>> {
493    let local_var_configuration = configuration;
494
495    let local_var_client = &local_var_configuration.client;
496
497    let local_var_uri_str = format!(
498        "{}/message-center/queries/case-activities/v1",
499        local_var_configuration.base_path
500    );
501    let mut local_var_req_builder =
502        local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
503
504    if let Some(ref local_var_str) = limit {
505        local_var_req_builder =
506            local_var_req_builder.query(&[("limit", &local_var_str.to_string())]);
507    }
508    if let Some(ref local_var_str) = sort {
509        local_var_req_builder =
510            local_var_req_builder.query(&[("sort", &local_var_str.to_string())]);
511    }
512    if let Some(ref local_var_str) = filter {
513        local_var_req_builder =
514            local_var_req_builder.query(&[("filter", &local_var_str.to_string())]);
515    }
516    if let Some(ref local_var_str) = offset {
517        local_var_req_builder =
518            local_var_req_builder.query(&[("offset", &local_var_str.to_string())]);
519    }
520    local_var_req_builder = local_var_req_builder.query(&[("case_id", &case_id.to_string())]);
521    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
522        local_var_req_builder =
523            local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
524    }
525    if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
526        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
527    };
528
529    let local_var_req = local_var_req_builder.build()?;
530    let local_var_resp = local_var_client.execute(local_var_req).await?;
531
532    let local_var_status = local_var_resp.status();
533    let local_var_content = local_var_resp.text().await?;
534
535    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
536        serde_json::from_str(&local_var_content).map_err(Error::from)
537    } else {
538        let local_var_entity: Option<QueryActivityByCaseIdError> =
539            serde_json::from_str(&local_var_content).ok();
540        let local_var_error = ResponseContent {
541            status: local_var_status,
542            content: local_var_content,
543            entity: local_var_entity,
544        };
545        Err(Error::ResponseError(local_var_error))
546    }
547}
548
549pub async fn query_cases_ids_by_filter(
550    configuration: &configuration::Configuration,
551    limit: Option<i32>,
552    sort: Option<&str>,
553    filter: Option<&str>,
554    offset: Option<&str>,
555) -> Result<models::MsaspecPeriodQueryResponse, Error<QueryCasesIdsByFilterError>> {
556    let local_var_configuration = configuration;
557
558    let local_var_client = &local_var_configuration.client;
559
560    let local_var_uri_str = format!(
561        "{}/message-center/queries/cases/v1",
562        local_var_configuration.base_path
563    );
564    let mut local_var_req_builder =
565        local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
566
567    if let Some(ref local_var_str) = limit {
568        local_var_req_builder =
569            local_var_req_builder.query(&[("limit", &local_var_str.to_string())]);
570    }
571    if let Some(ref local_var_str) = sort {
572        local_var_req_builder =
573            local_var_req_builder.query(&[("sort", &local_var_str.to_string())]);
574    }
575    if let Some(ref local_var_str) = filter {
576        local_var_req_builder =
577            local_var_req_builder.query(&[("filter", &local_var_str.to_string())]);
578    }
579    if let Some(ref local_var_str) = offset {
580        local_var_req_builder =
581            local_var_req_builder.query(&[("offset", &local_var_str.to_string())]);
582    }
583    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
584        local_var_req_builder =
585            local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
586    }
587    if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
588        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
589    };
590
591    let local_var_req = local_var_req_builder.build()?;
592    let local_var_resp = local_var_client.execute(local_var_req).await?;
593
594    let local_var_status = local_var_resp.status();
595    let local_var_content = local_var_resp.text().await?;
596
597    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
598        serde_json::from_str(&local_var_content).map_err(Error::from)
599    } else {
600        let local_var_entity: Option<QueryCasesIdsByFilterError> =
601            serde_json::from_str(&local_var_content).ok();
602        let local_var_error = ResponseContent {
603            status: local_var_status,
604            content: local_var_content,
605            entity: local_var_entity,
606        };
607        Err(Error::ResponseError(local_var_error))
608    }
609}