1use {
10 super::{Error, configuration},
11 crate::{
12 apis::{ContentType, ResponseContent},
13 models,
14 },
15 async_trait::async_trait,
16 reqwest,
17 serde::{Deserialize, Serialize, de::Error as _},
18 std::sync::Arc,
19};
20
21#[async_trait]
22pub trait WorkspaceManagementApi: Send + Sync {
23 async fn create_api_user(
27 &self,
28 params: CreateApiUserParams,
29 ) -> Result<(), Error<CreateApiUserError>>;
30
31 async fn create_console_user(
35 &self,
36 params: CreateConsoleUserParams,
37 ) -> Result<(), Error<CreateConsoleUserError>>;
38
39 async fn create_user_group(
44 &self,
45 params: CreateUserGroupParams,
46 ) -> Result<models::CreateUserGroupResponse, Error<CreateUserGroupError>>;
47
48 async fn delete_user_group(
54 &self,
55 params: DeleteUserGroupParams,
56 ) -> Result<(), Error<DeleteUserGroupError>>;
57
58 async fn get_api_users(&self) -> Result<models::GetApiUsersResponse, Error<GetApiUsersError>>;
64
65 async fn get_audit_logs(
71 &self,
72 params: GetAuditLogsParams,
73 ) -> Result<models::GetAuditLogsResponse, Error<GetAuditLogsError>>;
74
75 async fn get_audits(
80 &self,
81 params: GetAuditsParams,
82 ) -> Result<models::GetAuditLogsResponseDto, Error<GetAuditsError>>;
83
84 async fn get_console_users(
90 &self,
91 ) -> Result<models::GetConsoleUsersResponse, Error<GetConsoleUsersError>>;
92
93 async fn get_ota_status(
97 &self,
98 ) -> Result<models::GetOtaStatusResponse, Error<GetOtaStatusError>>;
99
100 async fn get_user_group(
106 &self,
107 params: GetUserGroupParams,
108 ) -> Result<models::UserGroupResponse, Error<GetUserGroupError>>;
109
110 async fn get_user_groups(
116 &self,
117 ) -> Result<Vec<models::UserGroupResponse>, Error<GetUserGroupsError>>;
118
119 async fn get_users(&self) -> Result<Vec<models::UserResponse>, Error<GetUsersError>>;
124
125 async fn get_whitelist_ip_addresses(
132 &self,
133 params: GetWhitelistIpAddressesParams,
134 ) -> Result<models::GetWhitelistIpAddressesResponse, Error<GetWhitelistIpAddressesError>>;
135
136 async fn get_workspace_status(
144 &self,
145 ) -> Result<models::GetWorkspaceStatusResponse, Error<GetWorkspaceStatusError>>;
146
147 async fn reset_device(&self, params: ResetDeviceParams) -> Result<(), Error<ResetDeviceError>>;
154
155 async fn set_ota_status(
159 &self,
160 params: SetOtaStatusParams,
161 ) -> Result<models::SetOtaStatusResponse, Error<SetOtaStatusError>>;
162
163 async fn update_user_group(
169 &self,
170 params: UpdateUserGroupParams,
171 ) -> Result<models::UserGroupCreateResponse, Error<UpdateUserGroupError>>;
172}
173
174pub struct WorkspaceManagementApiClient {
175 configuration: Arc<configuration::Configuration>,
176}
177
178impl WorkspaceManagementApiClient {
179 pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
180 Self { configuration }
181 }
182}
183
184#[derive(Clone, Debug)]
187#[cfg_attr(feature = "bon", derive(::bon::Builder))]
188pub struct CreateApiUserParams {
189 pub idempotency_key: Option<String>,
194 pub create_api_user: Option<models::CreateApiUser>,
195}
196
197#[derive(Clone, Debug)]
200#[cfg_attr(feature = "bon", derive(::bon::Builder))]
201pub struct CreateConsoleUserParams {
202 pub idempotency_key: Option<String>,
207 pub create_console_user: Option<models::CreateConsoleUser>,
208}
209
210#[derive(Clone, Debug)]
213#[cfg_attr(feature = "bon", derive(::bon::Builder))]
214pub struct CreateUserGroupParams {
215 pub user_group_create_request: models::UserGroupCreateRequest,
216 pub idempotency_key: Option<String>,
221}
222
223#[derive(Clone, Debug)]
226#[cfg_attr(feature = "bon", derive(::bon::Builder))]
227pub struct DeleteUserGroupParams {
228 pub group_id: String,
230}
231
232#[derive(Clone, Debug)]
235#[cfg_attr(feature = "bon", derive(::bon::Builder))]
236pub struct GetAuditLogsParams {
237 pub time_period: Option<String>,
239 pub cursor: Option<String>,
241}
242
243#[derive(Clone, Debug)]
246#[cfg_attr(feature = "bon", derive(::bon::Builder))]
247pub struct GetAuditsParams {
248 pub time_period: Option<String>,
250}
251
252#[derive(Clone, Debug)]
255#[cfg_attr(feature = "bon", derive(::bon::Builder))]
256pub struct GetUserGroupParams {
257 pub group_id: String,
259}
260
261#[derive(Clone, Debug)]
264#[cfg_attr(feature = "bon", derive(::bon::Builder))]
265pub struct GetWhitelistIpAddressesParams {
266 pub user_id: String,
268}
269
270#[derive(Clone, Debug)]
273#[cfg_attr(feature = "bon", derive(::bon::Builder))]
274pub struct ResetDeviceParams {
275 pub id: String,
277 pub idempotency_key: Option<String>,
282}
283
284#[derive(Clone, Debug)]
287#[cfg_attr(feature = "bon", derive(::bon::Builder))]
288pub struct SetOtaStatusParams {
289 pub set_ota_status_request: models::SetOtaStatusRequest,
290 pub idempotency_key: Option<String>,
295}
296
297#[derive(Clone, Debug)]
300#[cfg_attr(feature = "bon", derive(::bon::Builder))]
301pub struct UpdateUserGroupParams {
302 pub group_id: String,
304 pub user_group_update_request: models::UserGroupUpdateRequest,
305 pub idempotency_key: Option<String>,
310}
311
312#[async_trait]
313impl WorkspaceManagementApi for WorkspaceManagementApiClient {
314 async fn create_api_user(
316 &self,
317 params: CreateApiUserParams,
318 ) -> Result<(), Error<CreateApiUserError>> {
319 let CreateApiUserParams {
320 idempotency_key,
321 create_api_user,
322 } = params;
323
324 let local_var_configuration = &self.configuration;
325
326 let local_var_client = &local_var_configuration.client;
327
328 let local_var_uri_str =
329 format!("{}/management/api_users", local_var_configuration.base_path);
330 let mut local_var_req_builder =
331 local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
332
333 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
334 local_var_req_builder = local_var_req_builder
335 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
336 }
337 if let Some(local_var_param_value) = idempotency_key {
338 local_var_req_builder =
339 local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
340 }
341 local_var_req_builder = local_var_req_builder.json(&create_api_user);
342
343 let local_var_req = local_var_req_builder.build()?;
344 let local_var_resp = local_var_client.execute(local_var_req).await?;
345
346 let local_var_status = local_var_resp.status();
347 let local_var_content = local_var_resp.text().await?;
348
349 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
350 Ok(())
351 } else {
352 let local_var_entity: Option<CreateApiUserError> =
353 serde_json::from_str(&local_var_content).ok();
354 let local_var_error = ResponseContent {
355 status: local_var_status,
356 content: local_var_content,
357 entity: local_var_entity,
358 };
359 Err(Error::ResponseError(local_var_error))
360 }
361 }
362
363 async fn create_console_user(
365 &self,
366 params: CreateConsoleUserParams,
367 ) -> Result<(), Error<CreateConsoleUserError>> {
368 let CreateConsoleUserParams {
369 idempotency_key,
370 create_console_user,
371 } = params;
372
373 let local_var_configuration = &self.configuration;
374
375 let local_var_client = &local_var_configuration.client;
376
377 let local_var_uri_str = format!("{}/management/users", local_var_configuration.base_path);
378 let mut local_var_req_builder =
379 local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
380
381 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
382 local_var_req_builder = local_var_req_builder
383 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
384 }
385 if let Some(local_var_param_value) = idempotency_key {
386 local_var_req_builder =
387 local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
388 }
389 local_var_req_builder = local_var_req_builder.json(&create_console_user);
390
391 let local_var_req = local_var_req_builder.build()?;
392 let local_var_resp = local_var_client.execute(local_var_req).await?;
393
394 let local_var_status = local_var_resp.status();
395 let local_var_content = local_var_resp.text().await?;
396
397 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
398 Ok(())
399 } else {
400 let local_var_entity: Option<CreateConsoleUserError> =
401 serde_json::from_str(&local_var_content).ok();
402 let local_var_error = ResponseContent {
403 status: local_var_status,
404 content: local_var_content,
405 entity: local_var_entity,
406 };
407 Err(Error::ResponseError(local_var_error))
408 }
409 }
410
411 async fn create_user_group(
414 &self,
415 params: CreateUserGroupParams,
416 ) -> Result<models::CreateUserGroupResponse, Error<CreateUserGroupError>> {
417 let CreateUserGroupParams {
418 user_group_create_request,
419 idempotency_key,
420 } = params;
421
422 let local_var_configuration = &self.configuration;
423
424 let local_var_client = &local_var_configuration.client;
425
426 let local_var_uri_str = format!(
427 "{}/management/user_groups",
428 local_var_configuration.base_path
429 );
430 let mut local_var_req_builder =
431 local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
432
433 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
434 local_var_req_builder = local_var_req_builder
435 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
436 }
437 if let Some(local_var_param_value) = idempotency_key {
438 local_var_req_builder =
439 local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
440 }
441 local_var_req_builder = local_var_req_builder.json(&user_group_create_request);
442
443 let local_var_req = local_var_req_builder.build()?;
444 let local_var_resp = local_var_client.execute(local_var_req).await?;
445
446 let local_var_status = local_var_resp.status();
447 let local_var_content_type = local_var_resp
448 .headers()
449 .get("content-type")
450 .and_then(|v| v.to_str().ok())
451 .unwrap_or("application/octet-stream");
452 let local_var_content_type = super::ContentType::from(local_var_content_type);
453 let local_var_content = local_var_resp.text().await?;
454
455 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
456 match local_var_content_type {
457 ContentType::Json => {
458 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
459 }
460 ContentType::Text => {
461 return Err(Error::from(serde_json::Error::custom(
462 "Received `text/plain` content type response that cannot be converted to \
463 `models::CreateUserGroupResponse`",
464 )));
465 }
466 ContentType::Unsupported(local_var_unknown_type) => {
467 return Err(Error::from(serde_json::Error::custom(format!(
468 "Received `{local_var_unknown_type}` content type response that cannot be \
469 converted to `models::CreateUserGroupResponse`"
470 ))));
471 }
472 }
473 } else {
474 let local_var_entity: Option<CreateUserGroupError> =
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
485 async fn delete_user_group(
489 &self,
490 params: DeleteUserGroupParams,
491 ) -> Result<(), Error<DeleteUserGroupError>> {
492 let DeleteUserGroupParams { group_id } = params;
493
494 let local_var_configuration = &self.configuration;
495
496 let local_var_client = &local_var_configuration.client;
497
498 let local_var_uri_str = format!(
499 "{}/management/user_groups/{groupId}",
500 local_var_configuration.base_path,
501 groupId = crate::apis::urlencode(group_id)
502 );
503 let mut local_var_req_builder =
504 local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
505
506 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
507 local_var_req_builder = local_var_req_builder
508 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
509 }
510
511 let local_var_req = local_var_req_builder.build()?;
512 let local_var_resp = local_var_client.execute(local_var_req).await?;
513
514 let local_var_status = local_var_resp.status();
515 let local_var_content = local_var_resp.text().await?;
516
517 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
518 Ok(())
519 } else {
520 let local_var_entity: Option<DeleteUserGroupError> =
521 serde_json::from_str(&local_var_content).ok();
522 let local_var_error = ResponseContent {
523 status: local_var_status,
524 content: local_var_content,
525 entity: local_var_entity,
526 };
527 Err(Error::ResponseError(local_var_error))
528 }
529 }
530
531 async fn get_api_users(&self) -> Result<models::GetApiUsersResponse, Error<GetApiUsersError>> {
535 let local_var_configuration = &self.configuration;
536
537 let local_var_client = &local_var_configuration.client;
538
539 let local_var_uri_str =
540 format!("{}/management/api_users", local_var_configuration.base_path);
541 let mut local_var_req_builder =
542 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
543
544 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
545 local_var_req_builder = local_var_req_builder
546 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
547 }
548
549 let local_var_req = local_var_req_builder.build()?;
550 let local_var_resp = local_var_client.execute(local_var_req).await?;
551
552 let local_var_status = local_var_resp.status();
553 let local_var_content_type = local_var_resp
554 .headers()
555 .get("content-type")
556 .and_then(|v| v.to_str().ok())
557 .unwrap_or("application/octet-stream");
558 let local_var_content_type = super::ContentType::from(local_var_content_type);
559 let local_var_content = local_var_resp.text().await?;
560
561 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
562 match local_var_content_type {
563 ContentType::Json => {
564 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
565 }
566 ContentType::Text => {
567 return Err(Error::from(serde_json::Error::custom(
568 "Received `text/plain` content type response that cannot be converted to \
569 `models::GetApiUsersResponse`",
570 )));
571 }
572 ContentType::Unsupported(local_var_unknown_type) => {
573 return Err(Error::from(serde_json::Error::custom(format!(
574 "Received `{local_var_unknown_type}` content type response that cannot be \
575 converted to `models::GetApiUsersResponse`"
576 ))));
577 }
578 }
579 } else {
580 let local_var_entity: Option<GetApiUsersError> =
581 serde_json::from_str(&local_var_content).ok();
582 let local_var_error = ResponseContent {
583 status: local_var_status,
584 content: local_var_content,
585 entity: local_var_entity,
586 };
587 Err(Error::ResponseError(local_var_error))
588 }
589 }
590
591 async fn get_audit_logs(
595 &self,
596 params: GetAuditLogsParams,
597 ) -> Result<models::GetAuditLogsResponse, Error<GetAuditLogsError>> {
598 let GetAuditLogsParams {
599 time_period,
600 cursor,
601 } = params;
602
603 let local_var_configuration = &self.configuration;
604
605 let local_var_client = &local_var_configuration.client;
606
607 let local_var_uri_str = format!(
608 "{}/management/audit_logs",
609 local_var_configuration.base_path
610 );
611 let mut local_var_req_builder =
612 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
613
614 if let Some(ref param_value) = time_period {
615 local_var_req_builder =
616 local_var_req_builder.query(&[("timePeriod", ¶m_value.to_string())]);
617 }
618 if let Some(ref param_value) = cursor {
619 local_var_req_builder =
620 local_var_req_builder.query(&[("cursor", ¶m_value.to_string())]);
621 }
622 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
623 local_var_req_builder = local_var_req_builder
624 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
625 }
626
627 let local_var_req = local_var_req_builder.build()?;
628 let local_var_resp = local_var_client.execute(local_var_req).await?;
629
630 let local_var_status = local_var_resp.status();
631 let local_var_content_type = local_var_resp
632 .headers()
633 .get("content-type")
634 .and_then(|v| v.to_str().ok())
635 .unwrap_or("application/octet-stream");
636 let local_var_content_type = super::ContentType::from(local_var_content_type);
637 let local_var_content = local_var_resp.text().await?;
638
639 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
640 match local_var_content_type {
641 ContentType::Json => {
642 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
643 }
644 ContentType::Text => {
645 return Err(Error::from(serde_json::Error::custom(
646 "Received `text/plain` content type response that cannot be converted to \
647 `models::GetAuditLogsResponse`",
648 )));
649 }
650 ContentType::Unsupported(local_var_unknown_type) => {
651 return Err(Error::from(serde_json::Error::custom(format!(
652 "Received `{local_var_unknown_type}` content type response that cannot be \
653 converted to `models::GetAuditLogsResponse`"
654 ))));
655 }
656 }
657 } else {
658 let local_var_entity: Option<GetAuditLogsError> =
659 serde_json::from_str(&local_var_content).ok();
660 let local_var_error = ResponseContent {
661 status: local_var_status,
662 content: local_var_content,
663 entity: local_var_entity,
664 };
665 Err(Error::ResponseError(local_var_error))
666 }
667 }
668
669 async fn get_audits(
672 &self,
673 params: GetAuditsParams,
674 ) -> Result<models::GetAuditLogsResponseDto, Error<GetAuditsError>> {
675 let GetAuditsParams { time_period } = params;
676
677 let local_var_configuration = &self.configuration;
678
679 let local_var_client = &local_var_configuration.client;
680
681 let local_var_uri_str = format!("{}/audits", local_var_configuration.base_path);
682 let mut local_var_req_builder =
683 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
684
685 if let Some(ref param_value) = time_period {
686 local_var_req_builder =
687 local_var_req_builder.query(&[("timePeriod", ¶m_value.to_string())]);
688 }
689 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
690 local_var_req_builder = local_var_req_builder
691 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
692 }
693
694 let local_var_req = local_var_req_builder.build()?;
695 let local_var_resp = local_var_client.execute(local_var_req).await?;
696
697 let local_var_status = local_var_resp.status();
698 let local_var_content_type = local_var_resp
699 .headers()
700 .get("content-type")
701 .and_then(|v| v.to_str().ok())
702 .unwrap_or("application/octet-stream");
703 let local_var_content_type = super::ContentType::from(local_var_content_type);
704 let local_var_content = local_var_resp.text().await?;
705
706 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
707 match local_var_content_type {
708 ContentType::Json => {
709 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
710 }
711 ContentType::Text => {
712 return Err(Error::from(serde_json::Error::custom(
713 "Received `text/plain` content type response that cannot be converted to \
714 `models::GetAuditLogsResponseDto`",
715 )));
716 }
717 ContentType::Unsupported(local_var_unknown_type) => {
718 return Err(Error::from(serde_json::Error::custom(format!(
719 "Received `{local_var_unknown_type}` content type response that cannot be \
720 converted to `models::GetAuditLogsResponseDto`"
721 ))));
722 }
723 }
724 } else {
725 let local_var_entity: Option<GetAuditsError> =
726 serde_json::from_str(&local_var_content).ok();
727 let local_var_error = ResponseContent {
728 status: local_var_status,
729 content: local_var_content,
730 entity: local_var_entity,
731 };
732 Err(Error::ResponseError(local_var_error))
733 }
734 }
735
736 async fn get_console_users(
740 &self,
741 ) -> Result<models::GetConsoleUsersResponse, Error<GetConsoleUsersError>> {
742 let local_var_configuration = &self.configuration;
743
744 let local_var_client = &local_var_configuration.client;
745
746 let local_var_uri_str = format!("{}/management/users", local_var_configuration.base_path);
747 let mut local_var_req_builder =
748 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
749
750 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
751 local_var_req_builder = local_var_req_builder
752 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
753 }
754
755 let local_var_req = local_var_req_builder.build()?;
756 let local_var_resp = local_var_client.execute(local_var_req).await?;
757
758 let local_var_status = local_var_resp.status();
759 let local_var_content_type = local_var_resp
760 .headers()
761 .get("content-type")
762 .and_then(|v| v.to_str().ok())
763 .unwrap_or("application/octet-stream");
764 let local_var_content_type = super::ContentType::from(local_var_content_type);
765 let local_var_content = local_var_resp.text().await?;
766
767 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
768 match local_var_content_type {
769 ContentType::Json => {
770 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
771 }
772 ContentType::Text => {
773 return Err(Error::from(serde_json::Error::custom(
774 "Received `text/plain` content type response that cannot be converted to \
775 `models::GetConsoleUsersResponse`",
776 )));
777 }
778 ContentType::Unsupported(local_var_unknown_type) => {
779 return Err(Error::from(serde_json::Error::custom(format!(
780 "Received `{local_var_unknown_type}` content type response that cannot be \
781 converted to `models::GetConsoleUsersResponse`"
782 ))));
783 }
784 }
785 } else {
786 let local_var_entity: Option<GetConsoleUsersError> =
787 serde_json::from_str(&local_var_content).ok();
788 let local_var_error = ResponseContent {
789 status: local_var_status,
790 content: local_var_content,
791 entity: local_var_entity,
792 };
793 Err(Error::ResponseError(local_var_error))
794 }
795 }
796
797 async fn get_ota_status(
799 &self,
800 ) -> Result<models::GetOtaStatusResponse, Error<GetOtaStatusError>> {
801 let local_var_configuration = &self.configuration;
802
803 let local_var_client = &local_var_configuration.client;
804
805 let local_var_uri_str = format!("{}/management/ota", local_var_configuration.base_path);
806 let mut local_var_req_builder =
807 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
808
809 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
810 local_var_req_builder = local_var_req_builder
811 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
812 }
813
814 let local_var_req = local_var_req_builder.build()?;
815 let local_var_resp = local_var_client.execute(local_var_req).await?;
816
817 let local_var_status = local_var_resp.status();
818 let local_var_content_type = local_var_resp
819 .headers()
820 .get("content-type")
821 .and_then(|v| v.to_str().ok())
822 .unwrap_or("application/octet-stream");
823 let local_var_content_type = super::ContentType::from(local_var_content_type);
824 let local_var_content = local_var_resp.text().await?;
825
826 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
827 match local_var_content_type {
828 ContentType::Json => {
829 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
830 }
831 ContentType::Text => {
832 return Err(Error::from(serde_json::Error::custom(
833 "Received `text/plain` content type response that cannot be converted to \
834 `models::GetOtaStatusResponse`",
835 )));
836 }
837 ContentType::Unsupported(local_var_unknown_type) => {
838 return Err(Error::from(serde_json::Error::custom(format!(
839 "Received `{local_var_unknown_type}` content type response that cannot be \
840 converted to `models::GetOtaStatusResponse`"
841 ))));
842 }
843 }
844 } else {
845 let local_var_entity: Option<GetOtaStatusError> =
846 serde_json::from_str(&local_var_content).ok();
847 let local_var_error = ResponseContent {
848 status: local_var_status,
849 content: local_var_content,
850 entity: local_var_entity,
851 };
852 Err(Error::ResponseError(local_var_error))
853 }
854 }
855
856 async fn get_user_group(
860 &self,
861 params: GetUserGroupParams,
862 ) -> Result<models::UserGroupResponse, Error<GetUserGroupError>> {
863 let GetUserGroupParams { group_id } = params;
864
865 let local_var_configuration = &self.configuration;
866
867 let local_var_client = &local_var_configuration.client;
868
869 let local_var_uri_str = format!(
870 "{}/management/user_groups/{groupId}",
871 local_var_configuration.base_path,
872 groupId = crate::apis::urlencode(group_id)
873 );
874 let mut local_var_req_builder =
875 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
876
877 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
878 local_var_req_builder = local_var_req_builder
879 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
880 }
881
882 let local_var_req = local_var_req_builder.build()?;
883 let local_var_resp = local_var_client.execute(local_var_req).await?;
884
885 let local_var_status = local_var_resp.status();
886 let local_var_content_type = local_var_resp
887 .headers()
888 .get("content-type")
889 .and_then(|v| v.to_str().ok())
890 .unwrap_or("application/octet-stream");
891 let local_var_content_type = super::ContentType::from(local_var_content_type);
892 let local_var_content = local_var_resp.text().await?;
893
894 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
895 match local_var_content_type {
896 ContentType::Json => {
897 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
898 }
899 ContentType::Text => {
900 return Err(Error::from(serde_json::Error::custom(
901 "Received `text/plain` content type response that cannot be converted to \
902 `models::UserGroupResponse`",
903 )));
904 }
905 ContentType::Unsupported(local_var_unknown_type) => {
906 return Err(Error::from(serde_json::Error::custom(format!(
907 "Received `{local_var_unknown_type}` content type response that cannot be \
908 converted to `models::UserGroupResponse`"
909 ))));
910 }
911 }
912 } else {
913 let local_var_entity: Option<GetUserGroupError> =
914 serde_json::from_str(&local_var_content).ok();
915 let local_var_error = ResponseContent {
916 status: local_var_status,
917 content: local_var_content,
918 entity: local_var_entity,
919 };
920 Err(Error::ResponseError(local_var_error))
921 }
922 }
923
924 async fn get_user_groups(
928 &self,
929 ) -> Result<Vec<models::UserGroupResponse>, Error<GetUserGroupsError>> {
930 let local_var_configuration = &self.configuration;
931
932 let local_var_client = &local_var_configuration.client;
933
934 let local_var_uri_str = format!(
935 "{}/management/user_groups",
936 local_var_configuration.base_path
937 );
938 let mut local_var_req_builder =
939 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
940
941 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
942 local_var_req_builder = local_var_req_builder
943 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
944 }
945
946 let local_var_req = local_var_req_builder.build()?;
947 let local_var_resp = local_var_client.execute(local_var_req).await?;
948
949 let local_var_status = local_var_resp.status();
950 let local_var_content_type = local_var_resp
951 .headers()
952 .get("content-type")
953 .and_then(|v| v.to_str().ok())
954 .unwrap_or("application/octet-stream");
955 let local_var_content_type = super::ContentType::from(local_var_content_type);
956 let local_var_content = local_var_resp.text().await?;
957
958 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
959 match local_var_content_type {
960 ContentType::Json => {
961 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
962 }
963 ContentType::Text => {
964 return Err(Error::from(serde_json::Error::custom(
965 "Received `text/plain` content type response that cannot be converted to \
966 `Vec<models::UserGroupResponse>`",
967 )));
968 }
969 ContentType::Unsupported(local_var_unknown_type) => {
970 return Err(Error::from(serde_json::Error::custom(format!(
971 "Received `{local_var_unknown_type}` content type response that cannot be \
972 converted to `Vec<models::UserGroupResponse>`"
973 ))));
974 }
975 }
976 } else {
977 let local_var_entity: Option<GetUserGroupsError> =
978 serde_json::from_str(&local_var_content).ok();
979 let local_var_error = ResponseContent {
980 status: local_var_status,
981 content: local_var_content,
982 entity: local_var_entity,
983 };
984 Err(Error::ResponseError(local_var_error))
985 }
986 }
987
988 async fn get_users(&self) -> Result<Vec<models::UserResponse>, Error<GetUsersError>> {
991 let local_var_configuration = &self.configuration;
992
993 let local_var_client = &local_var_configuration.client;
994
995 let local_var_uri_str = format!("{}/users", local_var_configuration.base_path);
996 let mut local_var_req_builder =
997 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
998
999 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1000 local_var_req_builder = local_var_req_builder
1001 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1002 }
1003
1004 let local_var_req = local_var_req_builder.build()?;
1005 let local_var_resp = local_var_client.execute(local_var_req).await?;
1006
1007 let local_var_status = local_var_resp.status();
1008 let local_var_content_type = local_var_resp
1009 .headers()
1010 .get("content-type")
1011 .and_then(|v| v.to_str().ok())
1012 .unwrap_or("application/octet-stream");
1013 let local_var_content_type = super::ContentType::from(local_var_content_type);
1014 let local_var_content = local_var_resp.text().await?;
1015
1016 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1017 match local_var_content_type {
1018 ContentType::Json => {
1019 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1020 }
1021 ContentType::Text => {
1022 return Err(Error::from(serde_json::Error::custom(
1023 "Received `text/plain` content type response that cannot be converted to \
1024 `Vec<models::UserResponse>`",
1025 )));
1026 }
1027 ContentType::Unsupported(local_var_unknown_type) => {
1028 return Err(Error::from(serde_json::Error::custom(format!(
1029 "Received `{local_var_unknown_type}` content type response that cannot be \
1030 converted to `Vec<models::UserResponse>`"
1031 ))));
1032 }
1033 }
1034 } else {
1035 let local_var_entity: Option<GetUsersError> =
1036 serde_json::from_str(&local_var_content).ok();
1037 let local_var_error = ResponseContent {
1038 status: local_var_status,
1039 content: local_var_content,
1040 entity: local_var_entity,
1041 };
1042 Err(Error::ResponseError(local_var_error))
1043 }
1044 }
1045
1046 async fn get_whitelist_ip_addresses(
1051 &self,
1052 params: GetWhitelistIpAddressesParams,
1053 ) -> Result<models::GetWhitelistIpAddressesResponse, Error<GetWhitelistIpAddressesError>> {
1054 let GetWhitelistIpAddressesParams { user_id } = params;
1055
1056 let local_var_configuration = &self.configuration;
1057
1058 let local_var_client = &local_var_configuration.client;
1059
1060 let local_var_uri_str = format!(
1061 "{}/management/api_users/{userId}/whitelist_ip_addresses",
1062 local_var_configuration.base_path,
1063 userId = crate::apis::urlencode(user_id)
1064 );
1065 let mut local_var_req_builder =
1066 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1067
1068 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1069 local_var_req_builder = local_var_req_builder
1070 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1071 }
1072
1073 let local_var_req = local_var_req_builder.build()?;
1074 let local_var_resp = local_var_client.execute(local_var_req).await?;
1075
1076 let local_var_status = local_var_resp.status();
1077 let local_var_content_type = local_var_resp
1078 .headers()
1079 .get("content-type")
1080 .and_then(|v| v.to_str().ok())
1081 .unwrap_or("application/octet-stream");
1082 let local_var_content_type = super::ContentType::from(local_var_content_type);
1083 let local_var_content = local_var_resp.text().await?;
1084
1085 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1086 match local_var_content_type {
1087 ContentType::Json => {
1088 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1089 }
1090 ContentType::Text => {
1091 return Err(Error::from(serde_json::Error::custom(
1092 "Received `text/plain` content type response that cannot be converted to \
1093 `models::GetWhitelistIpAddressesResponse`",
1094 )));
1095 }
1096 ContentType::Unsupported(local_var_unknown_type) => {
1097 return Err(Error::from(serde_json::Error::custom(format!(
1098 "Received `{local_var_unknown_type}` content type response that cannot be \
1099 converted to `models::GetWhitelistIpAddressesResponse`"
1100 ))));
1101 }
1102 }
1103 } else {
1104 let local_var_entity: Option<GetWhitelistIpAddressesError> =
1105 serde_json::from_str(&local_var_content).ok();
1106 let local_var_error = ResponseContent {
1107 status: local_var_status,
1108 content: local_var_content,
1109 entity: local_var_entity,
1110 };
1111 Err(Error::ResponseError(local_var_error))
1112 }
1113 }
1114
1115 async fn get_workspace_status(
1121 &self,
1122 ) -> Result<models::GetWorkspaceStatusResponse, Error<GetWorkspaceStatusError>> {
1123 let local_var_configuration = &self.configuration;
1124
1125 let local_var_client = &local_var_configuration.client;
1126
1127 let local_var_uri_str = format!(
1128 "{}/management/workspace_status",
1129 local_var_configuration.base_path
1130 );
1131 let mut local_var_req_builder =
1132 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1133
1134 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1135 local_var_req_builder = local_var_req_builder
1136 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1137 }
1138
1139 let local_var_req = local_var_req_builder.build()?;
1140 let local_var_resp = local_var_client.execute(local_var_req).await?;
1141
1142 let local_var_status = local_var_resp.status();
1143 let local_var_content_type = local_var_resp
1144 .headers()
1145 .get("content-type")
1146 .and_then(|v| v.to_str().ok())
1147 .unwrap_or("application/octet-stream");
1148 let local_var_content_type = super::ContentType::from(local_var_content_type);
1149 let local_var_content = local_var_resp.text().await?;
1150
1151 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1152 match local_var_content_type {
1153 ContentType::Json => {
1154 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1155 }
1156 ContentType::Text => {
1157 return Err(Error::from(serde_json::Error::custom(
1158 "Received `text/plain` content type response that cannot be converted to \
1159 `models::GetWorkspaceStatusResponse`",
1160 )));
1161 }
1162 ContentType::Unsupported(local_var_unknown_type) => {
1163 return Err(Error::from(serde_json::Error::custom(format!(
1164 "Received `{local_var_unknown_type}` content type response that cannot be \
1165 converted to `models::GetWorkspaceStatusResponse`"
1166 ))));
1167 }
1168 }
1169 } else {
1170 let local_var_entity: Option<GetWorkspaceStatusError> =
1171 serde_json::from_str(&local_var_content).ok();
1172 let local_var_error = ResponseContent {
1173 status: local_var_status,
1174 content: local_var_content,
1175 entity: local_var_entity,
1176 };
1177 Err(Error::ResponseError(local_var_error))
1178 }
1179 }
1180
1181 async fn reset_device(&self, params: ResetDeviceParams) -> Result<(), Error<ResetDeviceError>> {
1186 let ResetDeviceParams {
1187 id,
1188 idempotency_key,
1189 } = params;
1190
1191 let local_var_configuration = &self.configuration;
1192
1193 let local_var_client = &local_var_configuration.client;
1194
1195 let local_var_uri_str = format!(
1196 "{}/management/users/{id}/reset_device",
1197 local_var_configuration.base_path,
1198 id = crate::apis::urlencode(id)
1199 );
1200 let mut local_var_req_builder =
1201 local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1202
1203 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1204 local_var_req_builder = local_var_req_builder
1205 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1206 }
1207 if let Some(local_var_param_value) = idempotency_key {
1208 local_var_req_builder =
1209 local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1210 }
1211
1212 let local_var_req = local_var_req_builder.build()?;
1213 let local_var_resp = local_var_client.execute(local_var_req).await?;
1214
1215 let local_var_status = local_var_resp.status();
1216 let local_var_content = local_var_resp.text().await?;
1217
1218 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1219 Ok(())
1220 } else {
1221 let local_var_entity: Option<ResetDeviceError> =
1222 serde_json::from_str(&local_var_content).ok();
1223 let local_var_error = ResponseContent {
1224 status: local_var_status,
1225 content: local_var_content,
1226 entity: local_var_entity,
1227 };
1228 Err(Error::ResponseError(local_var_error))
1229 }
1230 }
1231
1232 async fn set_ota_status(
1234 &self,
1235 params: SetOtaStatusParams,
1236 ) -> Result<models::SetOtaStatusResponse, Error<SetOtaStatusError>> {
1237 let SetOtaStatusParams {
1238 set_ota_status_request,
1239 idempotency_key,
1240 } = params;
1241
1242 let local_var_configuration = &self.configuration;
1243
1244 let local_var_client = &local_var_configuration.client;
1245
1246 let local_var_uri_str = format!("{}/management/ota", local_var_configuration.base_path);
1247 let mut local_var_req_builder =
1248 local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1249
1250 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1251 local_var_req_builder = local_var_req_builder
1252 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1253 }
1254 if let Some(local_var_param_value) = idempotency_key {
1255 local_var_req_builder =
1256 local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1257 }
1258 local_var_req_builder = local_var_req_builder.json(&set_ota_status_request);
1259
1260 let local_var_req = local_var_req_builder.build()?;
1261 let local_var_resp = local_var_client.execute(local_var_req).await?;
1262
1263 let local_var_status = local_var_resp.status();
1264 let local_var_content_type = local_var_resp
1265 .headers()
1266 .get("content-type")
1267 .and_then(|v| v.to_str().ok())
1268 .unwrap_or("application/octet-stream");
1269 let local_var_content_type = super::ContentType::from(local_var_content_type);
1270 let local_var_content = local_var_resp.text().await?;
1271
1272 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1273 match local_var_content_type {
1274 ContentType::Json => {
1275 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1276 }
1277 ContentType::Text => {
1278 return Err(Error::from(serde_json::Error::custom(
1279 "Received `text/plain` content type response that cannot be converted to \
1280 `models::SetOtaStatusResponse`",
1281 )));
1282 }
1283 ContentType::Unsupported(local_var_unknown_type) => {
1284 return Err(Error::from(serde_json::Error::custom(format!(
1285 "Received `{local_var_unknown_type}` content type response that cannot be \
1286 converted to `models::SetOtaStatusResponse`"
1287 ))));
1288 }
1289 }
1290 } else {
1291 let local_var_entity: Option<SetOtaStatusError> =
1292 serde_json::from_str(&local_var_content).ok();
1293 let local_var_error = ResponseContent {
1294 status: local_var_status,
1295 content: local_var_content,
1296 entity: local_var_entity,
1297 };
1298 Err(Error::ResponseError(local_var_error))
1299 }
1300 }
1301
1302 async fn update_user_group(
1306 &self,
1307 params: UpdateUserGroupParams,
1308 ) -> Result<models::UserGroupCreateResponse, Error<UpdateUserGroupError>> {
1309 let UpdateUserGroupParams {
1310 group_id,
1311 user_group_update_request,
1312 idempotency_key,
1313 } = params;
1314
1315 let local_var_configuration = &self.configuration;
1316
1317 let local_var_client = &local_var_configuration.client;
1318
1319 let local_var_uri_str = format!(
1320 "{}/management/user_groups/{groupId}",
1321 local_var_configuration.base_path,
1322 groupId = crate::apis::urlencode(group_id)
1323 );
1324 let mut local_var_req_builder =
1325 local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1326
1327 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1328 local_var_req_builder = local_var_req_builder
1329 .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1330 }
1331 if let Some(local_var_param_value) = idempotency_key {
1332 local_var_req_builder =
1333 local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1334 }
1335 local_var_req_builder = local_var_req_builder.json(&user_group_update_request);
1336
1337 let local_var_req = local_var_req_builder.build()?;
1338 let local_var_resp = local_var_client.execute(local_var_req).await?;
1339
1340 let local_var_status = local_var_resp.status();
1341 let local_var_content_type = local_var_resp
1342 .headers()
1343 .get("content-type")
1344 .and_then(|v| v.to_str().ok())
1345 .unwrap_or("application/octet-stream");
1346 let local_var_content_type = super::ContentType::from(local_var_content_type);
1347 let local_var_content = local_var_resp.text().await?;
1348
1349 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1350 match local_var_content_type {
1351 ContentType::Json => {
1352 crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
1353 }
1354 ContentType::Text => {
1355 return Err(Error::from(serde_json::Error::custom(
1356 "Received `text/plain` content type response that cannot be converted to \
1357 `models::UserGroupCreateResponse`",
1358 )));
1359 }
1360 ContentType::Unsupported(local_var_unknown_type) => {
1361 return Err(Error::from(serde_json::Error::custom(format!(
1362 "Received `{local_var_unknown_type}` content type response that cannot be \
1363 converted to `models::UserGroupCreateResponse`"
1364 ))));
1365 }
1366 }
1367 } else {
1368 let local_var_entity: Option<UpdateUserGroupError> =
1369 serde_json::from_str(&local_var_content).ok();
1370 let local_var_error = ResponseContent {
1371 status: local_var_status,
1372 content: local_var_content,
1373 entity: local_var_entity,
1374 };
1375 Err(Error::ResponseError(local_var_error))
1376 }
1377 }
1378}
1379
1380#[derive(Debug, Clone, Serialize, Deserialize)]
1383#[serde(untagged)]
1384pub enum CreateApiUserError {
1385 Status400(),
1386 Status401(models::ErrorResponse),
1387 Status403(models::ErrorResponse),
1388 Status5XX(models::ErrorResponse),
1389 DefaultResponse(models::ErrorSchema),
1390 UnknownValue(serde_json::Value),
1391}
1392
1393#[derive(Debug, Clone, Serialize, Deserialize)]
1396#[serde(untagged)]
1397pub enum CreateConsoleUserError {
1398 Status400(),
1399 Status401(models::ErrorResponse),
1400 Status403(models::ErrorResponse),
1401 Status5XX(models::ErrorResponse),
1402 DefaultResponse(models::ErrorSchema),
1403 UnknownValue(serde_json::Value),
1404}
1405
1406#[derive(Debug, Clone, Serialize, Deserialize)]
1409#[serde(untagged)]
1410pub enum CreateUserGroupError {
1411 DefaultResponse(models::ErrorSchema),
1412 UnknownValue(serde_json::Value),
1413}
1414
1415#[derive(Debug, Clone, Serialize, Deserialize)]
1418#[serde(untagged)]
1419pub enum DeleteUserGroupError {
1420 DefaultResponse(models::ErrorSchema),
1421 UnknownValue(serde_json::Value),
1422}
1423
1424#[derive(Debug, Clone, Serialize, Deserialize)]
1426#[serde(untagged)]
1427pub enum GetApiUsersError {
1428 Status401(models::ErrorResponse),
1429 Status403(models::ErrorResponse),
1430 Status5XX(models::ErrorResponse),
1431 DefaultResponse(models::ErrorSchema),
1432 UnknownValue(serde_json::Value),
1433}
1434
1435#[derive(Debug, Clone, Serialize, Deserialize)]
1437#[serde(untagged)]
1438pub enum GetAuditLogsError {
1439 DefaultResponse(models::ErrorSchema),
1440 UnknownValue(serde_json::Value),
1441}
1442
1443#[derive(Debug, Clone, Serialize, Deserialize)]
1445#[serde(untagged)]
1446pub enum GetAuditsError {
1447 DefaultResponse(models::ErrorSchema),
1448 UnknownValue(serde_json::Value),
1449}
1450
1451#[derive(Debug, Clone, Serialize, Deserialize)]
1454#[serde(untagged)]
1455pub enum GetConsoleUsersError {
1456 Status401(models::ErrorResponse),
1457 Status403(models::ErrorResponse),
1458 Status5XX(models::ErrorResponse),
1459 DefaultResponse(models::ErrorSchema),
1460 UnknownValue(serde_json::Value),
1461}
1462
1463#[derive(Debug, Clone, Serialize, Deserialize)]
1465#[serde(untagged)]
1466pub enum GetOtaStatusError {
1467 Status404(),
1468 UnknownValue(serde_json::Value),
1469}
1470
1471#[derive(Debug, Clone, Serialize, Deserialize)]
1473#[serde(untagged)]
1474pub enum GetUserGroupError {
1475 DefaultResponse(models::ErrorSchema),
1476 UnknownValue(serde_json::Value),
1477}
1478
1479#[derive(Debug, Clone, Serialize, Deserialize)]
1482#[serde(untagged)]
1483pub enum GetUserGroupsError {
1484 DefaultResponse(models::ErrorSchema),
1485 UnknownValue(serde_json::Value),
1486}
1487
1488#[derive(Debug, Clone, Serialize, Deserialize)]
1490#[serde(untagged)]
1491pub enum GetUsersError {
1492 DefaultResponse(models::ErrorSchema),
1493 UnknownValue(serde_json::Value),
1494}
1495
1496#[derive(Debug, Clone, Serialize, Deserialize)]
1499#[serde(untagged)]
1500pub enum GetWhitelistIpAddressesError {
1501 Status401(models::ErrorResponse),
1502 Status403(models::ErrorResponse),
1503 Status5XX(models::ErrorResponse),
1504 DefaultResponse(models::ErrorSchema),
1505 UnknownValue(serde_json::Value),
1506}
1507
1508#[derive(Debug, Clone, Serialize, Deserialize)]
1511#[serde(untagged)]
1512pub enum GetWorkspaceStatusError {
1513 Status404(),
1514 UnknownValue(serde_json::Value),
1515}
1516
1517#[derive(Debug, Clone, Serialize, Deserialize)]
1519#[serde(untagged)]
1520pub enum ResetDeviceError {
1521 Status401(models::ErrorResponse),
1522 Status403(models::ErrorResponse),
1523 Status5XX(models::ErrorResponse),
1524 DefaultResponse(models::ErrorSchema),
1525 UnknownValue(serde_json::Value),
1526}
1527
1528#[derive(Debug, Clone, Serialize, Deserialize)]
1530#[serde(untagged)]
1531pub enum SetOtaStatusError {
1532 Status400(),
1533 Status409(),
1534 Status500(),
1535 UnknownValue(serde_json::Value),
1536}
1537
1538#[derive(Debug, Clone, Serialize, Deserialize)]
1541#[serde(untagged)]
1542pub enum UpdateUserGroupError {
1543 DefaultResponse(models::ErrorSchema),
1544 UnknownValue(serde_json::Value),
1545}