1use reqwest;
13use serde::{Deserialize, Serialize};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration};
16
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum ChecksSlashCreateError {
22 UnknownValue(serde_json::Value),
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum ChecksSlashCreateSuiteError {
29 UnknownValue(serde_json::Value),
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum ChecksSlashGetError {
36 UnknownValue(serde_json::Value),
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum ChecksSlashGetSuiteError {
43 UnknownValue(serde_json::Value),
44}
45
46#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum ChecksSlashListAnnotationsError {
50 UnknownValue(serde_json::Value),
51}
52
53#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum ChecksSlashListForRefError {
57 UnknownValue(serde_json::Value),
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum ChecksSlashListForSuiteError {
64 UnknownValue(serde_json::Value),
65}
66
67#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum ChecksSlashListSuitesForRefError {
71 UnknownValue(serde_json::Value),
72}
73
74#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum ChecksSlashRerequestRunError {
78 Status403(models::BasicError),
79 Status404(models::BasicError),
80 Status422(models::BasicError),
81 UnknownValue(serde_json::Value),
82}
83
84#[derive(Debug, Clone, Serialize, Deserialize)]
86#[serde(untagged)]
87pub enum ChecksSlashRerequestSuiteError {
88 UnknownValue(serde_json::Value),
89}
90
91#[derive(Debug, Clone, Serialize, Deserialize)]
93#[serde(untagged)]
94pub enum ChecksSlashSetSuitesPreferencesError {
95 UnknownValue(serde_json::Value),
96}
97
98#[derive(Debug, Clone, Serialize, Deserialize)]
100#[serde(untagged)]
101pub enum ChecksSlashUpdateError {
102 UnknownValue(serde_json::Value),
103}
104
105
106pub async fn checks_slash_create(configuration: &configuration::Configuration, owner: &str, repo: &str, checks_create_request: models::ChecksCreateRequest) -> Result<models::CheckRun, Error<ChecksSlashCreateError>> {
108 let local_var_configuration = configuration;
109
110 let local_var_client = &local_var_configuration.client;
111
112 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-runs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
113 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
114
115 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
116 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
117 }
118 local_var_req_builder = local_var_req_builder.json(&checks_create_request);
119
120 let local_var_req = local_var_req_builder.build()?;
121 let local_var_resp = local_var_client.execute(local_var_req).await?;
122
123 let local_var_status = local_var_resp.status();
124 let local_var_content = local_var_resp.text().await?;
125
126 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
127 serde_json::from_str(&local_var_content).map_err(Error::from)
128 } else {
129 let local_var_entity: Option<ChecksSlashCreateError> = serde_json::from_str(&local_var_content).ok();
130 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
131 Err(Error::ResponseError(local_var_error))
132 }
133}
134
135pub async fn checks_slash_create_suite(configuration: &configuration::Configuration, owner: &str, repo: &str, checks_create_suite_request: models::ChecksCreateSuiteRequest) -> Result<models::CheckSuite, Error<ChecksSlashCreateSuiteError>> {
137 let local_var_configuration = configuration;
138
139 let local_var_client = &local_var_configuration.client;
140
141 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-suites", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
142 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
143
144 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
145 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
146 }
147 local_var_req_builder = local_var_req_builder.json(&checks_create_suite_request);
148
149 let local_var_req = local_var_req_builder.build()?;
150 let local_var_resp = local_var_client.execute(local_var_req).await?;
151
152 let local_var_status = local_var_resp.status();
153 let local_var_content = local_var_resp.text().await?;
154
155 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
156 serde_json::from_str(&local_var_content).map_err(Error::from)
157 } else {
158 let local_var_entity: Option<ChecksSlashCreateSuiteError> = serde_json::from_str(&local_var_content).ok();
159 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
160 Err(Error::ResponseError(local_var_error))
161 }
162}
163
164pub async fn checks_slash_get(configuration: &configuration::Configuration, owner: &str, repo: &str, check_run_id: i32) -> Result<models::CheckRun, Error<ChecksSlashGetError>> {
166 let local_var_configuration = configuration;
167
168 let local_var_client = &local_var_configuration.client;
169
170 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-runs/{check_run_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), check_run_id=check_run_id);
171 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
172
173 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
174 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
175 }
176
177 let local_var_req = local_var_req_builder.build()?;
178 let local_var_resp = local_var_client.execute(local_var_req).await?;
179
180 let local_var_status = local_var_resp.status();
181 let local_var_content = local_var_resp.text().await?;
182
183 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
184 serde_json::from_str(&local_var_content).map_err(Error::from)
185 } else {
186 let local_var_entity: Option<ChecksSlashGetError> = serde_json::from_str(&local_var_content).ok();
187 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
188 Err(Error::ResponseError(local_var_error))
189 }
190}
191
192pub async fn checks_slash_get_suite(configuration: &configuration::Configuration, owner: &str, repo: &str, check_suite_id: i32) -> Result<models::CheckSuite, Error<ChecksSlashGetSuiteError>> {
194 let local_var_configuration = configuration;
195
196 let local_var_client = &local_var_configuration.client;
197
198 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-suites/{check_suite_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), check_suite_id=check_suite_id);
199 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
200
201 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
202 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
203 }
204
205 let local_var_req = local_var_req_builder.build()?;
206 let local_var_resp = local_var_client.execute(local_var_req).await?;
207
208 let local_var_status = local_var_resp.status();
209 let local_var_content = local_var_resp.text().await?;
210
211 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
212 serde_json::from_str(&local_var_content).map_err(Error::from)
213 } else {
214 let local_var_entity: Option<ChecksSlashGetSuiteError> = serde_json::from_str(&local_var_content).ok();
215 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
216 Err(Error::ResponseError(local_var_error))
217 }
218}
219
220pub async fn checks_slash_list_annotations(configuration: &configuration::Configuration, owner: &str, repo: &str, check_run_id: i32, per_page: Option<i32>, page: Option<i32>) -> Result<Vec<models::CheckAnnotation>, Error<ChecksSlashListAnnotationsError>> {
222 let local_var_configuration = configuration;
223
224 let local_var_client = &local_var_configuration.client;
225
226 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), check_run_id=check_run_id);
227 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
228
229 if let Some(ref local_var_str) = per_page {
230 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
231 }
232 if let Some(ref local_var_str) = page {
233 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
234 }
235 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
236 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
237 }
238
239 let local_var_req = local_var_req_builder.build()?;
240 let local_var_resp = local_var_client.execute(local_var_req).await?;
241
242 let local_var_status = local_var_resp.status();
243 let local_var_content = local_var_resp.text().await?;
244
245 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
246 serde_json::from_str(&local_var_content).map_err(Error::from)
247 } else {
248 let local_var_entity: Option<ChecksSlashListAnnotationsError> = serde_json::from_str(&local_var_content).ok();
249 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
250 Err(Error::ResponseError(local_var_error))
251 }
252}
253
254pub async fn checks_slash_list_for_ref(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: &str, check_name: Option<&str>, status: Option<&str>, filter: Option<&str>, per_page: Option<i32>, page: Option<i32>, app_id: Option<i32>) -> Result<models::ChecksListForSuite200Response, Error<ChecksSlashListForRefError>> {
256 let local_var_configuration = configuration;
257
258 let local_var_client = &local_var_configuration.client;
259
260 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/commits/{ref}/check-runs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), ref=crate::apis::urlencode(r#ref));
261 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
262
263 if let Some(ref local_var_str) = check_name {
264 local_var_req_builder = local_var_req_builder.query(&[("check_name", &local_var_str.to_string())]);
265 }
266 if let Some(ref local_var_str) = status {
267 local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]);
268 }
269 if let Some(ref local_var_str) = filter {
270 local_var_req_builder = local_var_req_builder.query(&[("filter", &local_var_str.to_string())]);
271 }
272 if let Some(ref local_var_str) = per_page {
273 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
274 }
275 if let Some(ref local_var_str) = page {
276 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
277 }
278 if let Some(ref local_var_str) = app_id {
279 local_var_req_builder = local_var_req_builder.query(&[("app_id", &local_var_str.to_string())]);
280 }
281 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
282 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
283 }
284
285 let local_var_req = local_var_req_builder.build()?;
286 let local_var_resp = local_var_client.execute(local_var_req).await?;
287
288 let local_var_status = local_var_resp.status();
289 let local_var_content = local_var_resp.text().await?;
290
291 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
292 serde_json::from_str(&local_var_content).map_err(Error::from)
293 } else {
294 let local_var_entity: Option<ChecksSlashListForRefError> = serde_json::from_str(&local_var_content).ok();
295 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
296 Err(Error::ResponseError(local_var_error))
297 }
298}
299
300pub async fn checks_slash_list_for_suite(configuration: &configuration::Configuration, owner: &str, repo: &str, check_suite_id: i32, check_name: Option<&str>, status: Option<&str>, filter: Option<&str>, per_page: Option<i32>, page: Option<i32>) -> Result<models::ChecksListForSuite200Response, Error<ChecksSlashListForSuiteError>> {
302 let local_var_configuration = configuration;
303
304 let local_var_client = &local_var_configuration.client;
305
306 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), check_suite_id=check_suite_id);
307 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
308
309 if let Some(ref local_var_str) = check_name {
310 local_var_req_builder = local_var_req_builder.query(&[("check_name", &local_var_str.to_string())]);
311 }
312 if let Some(ref local_var_str) = status {
313 local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]);
314 }
315 if let Some(ref local_var_str) = filter {
316 local_var_req_builder = local_var_req_builder.query(&[("filter", &local_var_str.to_string())]);
317 }
318 if let Some(ref local_var_str) = per_page {
319 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
320 }
321 if let Some(ref local_var_str) = page {
322 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
323 }
324 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
325 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
326 }
327
328 let local_var_req = local_var_req_builder.build()?;
329 let local_var_resp = local_var_client.execute(local_var_req).await?;
330
331 let local_var_status = local_var_resp.status();
332 let local_var_content = local_var_resp.text().await?;
333
334 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
335 serde_json::from_str(&local_var_content).map_err(Error::from)
336 } else {
337 let local_var_entity: Option<ChecksSlashListForSuiteError> = serde_json::from_str(&local_var_content).ok();
338 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
339 Err(Error::ResponseError(local_var_error))
340 }
341}
342
343pub async fn checks_slash_list_suites_for_ref(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: &str, app_id: Option<i32>, check_name: Option<&str>, per_page: Option<i32>, page: Option<i32>) -> Result<models::ChecksListSuitesForRef200Response, Error<ChecksSlashListSuitesForRefError>> {
345 let local_var_configuration = configuration;
346
347 let local_var_client = &local_var_configuration.client;
348
349 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/commits/{ref}/check-suites", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), ref=crate::apis::urlencode(r#ref));
350 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
351
352 if let Some(ref local_var_str) = app_id {
353 local_var_req_builder = local_var_req_builder.query(&[("app_id", &local_var_str.to_string())]);
354 }
355 if let Some(ref local_var_str) = check_name {
356 local_var_req_builder = local_var_req_builder.query(&[("check_name", &local_var_str.to_string())]);
357 }
358 if let Some(ref local_var_str) = per_page {
359 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
360 }
361 if let Some(ref local_var_str) = page {
362 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
363 }
364 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
365 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
366 }
367
368 let local_var_req = local_var_req_builder.build()?;
369 let local_var_resp = local_var_client.execute(local_var_req).await?;
370
371 let local_var_status = local_var_resp.status();
372 let local_var_content = local_var_resp.text().await?;
373
374 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
375 serde_json::from_str(&local_var_content).map_err(Error::from)
376 } else {
377 let local_var_entity: Option<ChecksSlashListSuitesForRefError> = serde_json::from_str(&local_var_content).ok();
378 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
379 Err(Error::ResponseError(local_var_error))
380 }
381}
382
383pub async fn checks_slash_rerequest_run(configuration: &configuration::Configuration, owner: &str, repo: &str, check_run_id: i32) -> Result<serde_json::Value, Error<ChecksSlashRerequestRunError>> {
385 let local_var_configuration = configuration;
386
387 let local_var_client = &local_var_configuration.client;
388
389 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), check_run_id=check_run_id);
390 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
391
392 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
393 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
394 }
395
396 let local_var_req = local_var_req_builder.build()?;
397 let local_var_resp = local_var_client.execute(local_var_req).await?;
398
399 let local_var_status = local_var_resp.status();
400 let local_var_content = local_var_resp.text().await?;
401
402 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
403 serde_json::from_str(&local_var_content).map_err(Error::from)
404 } else {
405 let local_var_entity: Option<ChecksSlashRerequestRunError> = serde_json::from_str(&local_var_content).ok();
406 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
407 Err(Error::ResponseError(local_var_error))
408 }
409}
410
411pub async fn checks_slash_rerequest_suite(configuration: &configuration::Configuration, owner: &str, repo: &str, check_suite_id: i32) -> Result<serde_json::Value, Error<ChecksSlashRerequestSuiteError>> {
413 let local_var_configuration = configuration;
414
415 let local_var_client = &local_var_configuration.client;
416
417 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), check_suite_id=check_suite_id);
418 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
419
420 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
421 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
422 }
423
424 let local_var_req = local_var_req_builder.build()?;
425 let local_var_resp = local_var_client.execute(local_var_req).await?;
426
427 let local_var_status = local_var_resp.status();
428 let local_var_content = local_var_resp.text().await?;
429
430 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
431 serde_json::from_str(&local_var_content).map_err(Error::from)
432 } else {
433 let local_var_entity: Option<ChecksSlashRerequestSuiteError> = serde_json::from_str(&local_var_content).ok();
434 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
435 Err(Error::ResponseError(local_var_error))
436 }
437}
438
439pub async fn checks_slash_set_suites_preferences(configuration: &configuration::Configuration, owner: &str, repo: &str, checks_set_suites_preferences_request: models::ChecksSetSuitesPreferencesRequest) -> Result<models::CheckSuitePreference, Error<ChecksSlashSetSuitesPreferencesError>> {
441 let local_var_configuration = configuration;
442
443 let local_var_client = &local_var_configuration.client;
444
445 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-suites/preferences", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
446 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
447
448 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
449 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
450 }
451 local_var_req_builder = local_var_req_builder.json(&checks_set_suites_preferences_request);
452
453 let local_var_req = local_var_req_builder.build()?;
454 let local_var_resp = local_var_client.execute(local_var_req).await?;
455
456 let local_var_status = local_var_resp.status();
457 let local_var_content = local_var_resp.text().await?;
458
459 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
460 serde_json::from_str(&local_var_content).map_err(Error::from)
461 } else {
462 let local_var_entity: Option<ChecksSlashSetSuitesPreferencesError> = serde_json::from_str(&local_var_content).ok();
463 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
464 Err(Error::ResponseError(local_var_error))
465 }
466}
467
468pub async fn checks_slash_update(configuration: &configuration::Configuration, owner: &str, repo: &str, check_run_id: i32, checks_update_request: models::ChecksUpdateRequest) -> Result<models::CheckRun, Error<ChecksSlashUpdateError>> {
470 let local_var_configuration = configuration;
471
472 let local_var_client = &local_var_configuration.client;
473
474 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/check-runs/{check_run_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), check_run_id=check_run_id);
475 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
476
477 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
478 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
479 }
480 local_var_req_builder = local_var_req_builder.json(&checks_update_request);
481
482 let local_var_req = local_var_req_builder.build()?;
483 let local_var_resp = local_var_client.execute(local_var_req).await?;
484
485 let local_var_status = local_var_resp.status();
486 let local_var_content = local_var_resp.text().await?;
487
488 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
489 serde_json::from_str(&local_var_content).map_err(Error::from)
490 } else {
491 let local_var_entity: Option<ChecksSlashUpdateError> = serde_json::from_str(&local_var_content).ok();
492 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
493 Err(Error::ResponseError(local_var_error))
494 }
495}
496