Skip to main content

bitwarden_api_api/apis/
organization_sponsorships_api.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use std::sync::Arc;
12
13use async_trait::async_trait;
14#[cfg(feature = "mockall")]
15use mockall::automock;
16use reqwest;
17use serde::{Deserialize, Serialize, de::Error as _};
18
19use super::{Error, configuration};
20use crate::{
21    apis::{AuthRequired, ContentType, ResponseContent},
22    models,
23};
24
25#[cfg_attr(feature = "mockall", automock)]
26#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
27#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
28pub trait OrganizationSponsorshipsApi: Send + Sync {
29    /// DELETE /organization/sponsorship/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke
30    async fn admin_initiated_revoke_sponsorship<'a>(
31        &self,
32        sponsoring_org_id: uuid::Uuid,
33        sponsored_friendly_name: &'a str,
34    ) -> Result<(), Error<AdminInitiatedRevokeSponsorshipError>>;
35
36    /// POST /organization/sponsorship/{sponsoringOrgId}/families-for-enterprise
37    async fn create_sponsorship<'a>(
38        &self,
39        sponsoring_org_id: uuid::Uuid,
40        organization_sponsorship_create_request_model: Option<
41            models::OrganizationSponsorshipCreateRequestModel,
42        >,
43    ) -> Result<(), Error<CreateSponsorshipError>>;
44
45    /// GET /organization/sponsorship/{sponsoringOrgId}/sponsored
46    async fn get_sponsored_organizations<'a>(
47        &self,
48        sponsoring_org_id: uuid::Uuid,
49    ) -> Result<
50        models::OrganizationSponsorshipInvitesResponseModelListResponseModel,
51        Error<GetSponsoredOrganizationsError>,
52    >;
53
54    /// GET /organization/sponsorship/{sponsoringOrgId}/sync-status
55    async fn get_sync_status<'a>(
56        &self,
57        sponsoring_org_id: uuid::Uuid,
58    ) -> Result<(), Error<GetSyncStatusError>>;
59
60    /// POST /organization/sponsorship/validate-token
61    async fn pre_validate_sponsorship_token<'a>(
62        &self,
63        sponsorship_token: Option<&'a str>,
64    ) -> Result<models::PreValidateSponsorshipResponseModel, Error<PreValidateSponsorshipTokenError>>;
65
66    /// POST /organization/sponsorship/redeem
67    async fn redeem_sponsorship<'a>(
68        &self,
69        sponsorship_token: Option<&'a str>,
70        organization_sponsorship_redeem_request_model: Option<
71            models::OrganizationSponsorshipRedeemRequestModel,
72        >,
73    ) -> Result<(), Error<RedeemSponsorshipError>>;
74
75    /// DELETE /organization/sponsorship/sponsored/{sponsoredOrgId}
76    async fn remove_sponsorship<'a>(
77        &self,
78        sponsored_org_id: uuid::Uuid,
79    ) -> Result<(), Error<RemoveSponsorshipError>>;
80
81    /// POST /organization/sponsorship/{sponsoringOrgId}/families-for-enterprise/resend
82    async fn resend_sponsorship_offer<'a>(
83        &self,
84        sponsoring_org_id: uuid::Uuid,
85        sponsored_friendly_name: Option<&'a str>,
86    ) -> Result<(), Error<ResendSponsorshipOfferError>>;
87
88    /// DELETE /organization/sponsorship/{sponsoringOrganizationId}
89    async fn revoke_sponsorship<'a>(
90        &self,
91        sponsoring_organization_id: uuid::Uuid,
92    ) -> Result<(), Error<RevokeSponsorshipError>>;
93
94    /// POST /organization/sponsorship/sync
95    async fn sync<'a>(
96        &self,
97        organization_sponsorship_sync_request_model: Option<
98            models::OrganizationSponsorshipSyncRequestModel,
99        >,
100    ) -> Result<models::OrganizationSponsorshipSyncResponseModel, Error<SyncError>>;
101}
102
103pub struct OrganizationSponsorshipsApiClient {
104    configuration: Arc<configuration::Configuration>,
105}
106
107impl OrganizationSponsorshipsApiClient {
108    pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
109        Self { configuration }
110    }
111}
112
113#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
114#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
115impl OrganizationSponsorshipsApi for OrganizationSponsorshipsApiClient {
116    async fn admin_initiated_revoke_sponsorship<'a>(
117        &self,
118        sponsoring_org_id: uuid::Uuid,
119        sponsored_friendly_name: &'a str,
120    ) -> Result<(), Error<AdminInitiatedRevokeSponsorshipError>> {
121        let local_var_configuration = &self.configuration;
122
123        let local_var_client = &local_var_configuration.client;
124
125        let local_var_uri_str = format!(
126            "{}/organization/sponsorship/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke",
127            local_var_configuration.base_path,
128            sponsoringOrgId = sponsoring_org_id,
129            sponsoredFriendlyName = crate::apis::urlencode(sponsored_friendly_name)
130        );
131        let mut local_var_req_builder =
132            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
133
134        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
135
136        let local_var_resp = local_var_req_builder.send().await?;
137
138        let local_var_status = local_var_resp.status();
139        let local_var_content = local_var_resp.text().await?;
140
141        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
142            Ok(())
143        } else {
144            let local_var_entity: Option<AdminInitiatedRevokeSponsorshipError> =
145                serde_json::from_str(&local_var_content).ok();
146            let local_var_error = ResponseContent {
147                status: local_var_status,
148                content: local_var_content,
149                entity: local_var_entity,
150            };
151            Err(Error::ResponseError(local_var_error))
152        }
153    }
154
155    async fn create_sponsorship<'a>(
156        &self,
157        sponsoring_org_id: uuid::Uuid,
158        organization_sponsorship_create_request_model: Option<
159            models::OrganizationSponsorshipCreateRequestModel,
160        >,
161    ) -> Result<(), Error<CreateSponsorshipError>> {
162        let local_var_configuration = &self.configuration;
163
164        let local_var_client = &local_var_configuration.client;
165
166        let local_var_uri_str = format!(
167            "{}/organization/sponsorship/{sponsoringOrgId}/families-for-enterprise",
168            local_var_configuration.base_path,
169            sponsoringOrgId = sponsoring_org_id
170        );
171        let mut local_var_req_builder =
172            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
173
174        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
175        local_var_req_builder =
176            local_var_req_builder.json(&organization_sponsorship_create_request_model);
177
178        let local_var_resp = local_var_req_builder.send().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            Ok(())
185        } else {
186            let local_var_entity: Option<CreateSponsorshipError> =
187                serde_json::from_str(&local_var_content).ok();
188            let local_var_error = ResponseContent {
189                status: local_var_status,
190                content: local_var_content,
191                entity: local_var_entity,
192            };
193            Err(Error::ResponseError(local_var_error))
194        }
195    }
196
197    async fn get_sponsored_organizations<'a>(
198        &self,
199        sponsoring_org_id: uuid::Uuid,
200    ) -> Result<
201        models::OrganizationSponsorshipInvitesResponseModelListResponseModel,
202        Error<GetSponsoredOrganizationsError>,
203    > {
204        let local_var_configuration = &self.configuration;
205
206        let local_var_client = &local_var_configuration.client;
207
208        let local_var_uri_str = format!(
209            "{}/organization/sponsorship/{sponsoringOrgId}/sponsored",
210            local_var_configuration.base_path,
211            sponsoringOrgId = sponsoring_org_id
212        );
213        let mut local_var_req_builder =
214            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
215
216        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
217
218        let local_var_resp = local_var_req_builder.send().await?;
219
220        let local_var_status = local_var_resp.status();
221        let local_var_content_type = local_var_resp
222            .headers()
223            .get("content-type")
224            .and_then(|v| v.to_str().ok())
225            .unwrap_or("application/octet-stream");
226        let local_var_content_type = super::ContentType::from(local_var_content_type);
227        let local_var_content = local_var_resp.text().await?;
228
229        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
230            match local_var_content_type {
231                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
232                ContentType::Text => {
233                    return Err(Error::from(serde_json::Error::custom(
234                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`",
235                    )));
236                }
237                ContentType::Unsupported(local_var_unknown_type) => {
238                    return Err(Error::from(serde_json::Error::custom(format!(
239                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`"
240                    ))));
241                }
242            }
243        } else {
244            let local_var_entity: Option<GetSponsoredOrganizationsError> =
245                serde_json::from_str(&local_var_content).ok();
246            let local_var_error = ResponseContent {
247                status: local_var_status,
248                content: local_var_content,
249                entity: local_var_entity,
250            };
251            Err(Error::ResponseError(local_var_error))
252        }
253    }
254
255    async fn get_sync_status<'a>(
256        &self,
257        sponsoring_org_id: uuid::Uuid,
258    ) -> Result<(), Error<GetSyncStatusError>> {
259        let local_var_configuration = &self.configuration;
260
261        let local_var_client = &local_var_configuration.client;
262
263        let local_var_uri_str = format!(
264            "{}/organization/sponsorship/{sponsoringOrgId}/sync-status",
265            local_var_configuration.base_path,
266            sponsoringOrgId = sponsoring_org_id
267        );
268        let mut local_var_req_builder =
269            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
270
271        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
272
273        let local_var_resp = local_var_req_builder.send().await?;
274
275        let local_var_status = local_var_resp.status();
276        let local_var_content = local_var_resp.text().await?;
277
278        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
279            Ok(())
280        } else {
281            let local_var_entity: Option<GetSyncStatusError> =
282                serde_json::from_str(&local_var_content).ok();
283            let local_var_error = ResponseContent {
284                status: local_var_status,
285                content: local_var_content,
286                entity: local_var_entity,
287            };
288            Err(Error::ResponseError(local_var_error))
289        }
290    }
291
292    async fn pre_validate_sponsorship_token<'a>(
293        &self,
294        sponsorship_token: Option<&'a str>,
295    ) -> Result<models::PreValidateSponsorshipResponseModel, Error<PreValidateSponsorshipTokenError>>
296    {
297        let local_var_configuration = &self.configuration;
298
299        let local_var_client = &local_var_configuration.client;
300
301        let local_var_uri_str = format!(
302            "{}/organization/sponsorship/validate-token",
303            local_var_configuration.base_path
304        );
305        let mut local_var_req_builder =
306            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
307
308        if let Some(ref param_value) = sponsorship_token {
309            local_var_req_builder =
310                local_var_req_builder.query(&[("sponsorshipToken", &param_value.to_string())]);
311        }
312        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
313
314        let local_var_resp = local_var_req_builder.send().await?;
315
316        let local_var_status = local_var_resp.status();
317        let local_var_content_type = local_var_resp
318            .headers()
319            .get("content-type")
320            .and_then(|v| v.to_str().ok())
321            .unwrap_or("application/octet-stream");
322        let local_var_content_type = super::ContentType::from(local_var_content_type);
323        let local_var_content = local_var_resp.text().await?;
324
325        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
326            match local_var_content_type {
327                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
328                ContentType::Text => {
329                    return Err(Error::from(serde_json::Error::custom(
330                        "Received `text/plain` content type response that cannot be converted to `models::PreValidateSponsorshipResponseModel`",
331                    )));
332                }
333                ContentType::Unsupported(local_var_unknown_type) => {
334                    return Err(Error::from(serde_json::Error::custom(format!(
335                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::PreValidateSponsorshipResponseModel`"
336                    ))));
337                }
338            }
339        } else {
340            let local_var_entity: Option<PreValidateSponsorshipTokenError> =
341                serde_json::from_str(&local_var_content).ok();
342            let local_var_error = ResponseContent {
343                status: local_var_status,
344                content: local_var_content,
345                entity: local_var_entity,
346            };
347            Err(Error::ResponseError(local_var_error))
348        }
349    }
350
351    async fn redeem_sponsorship<'a>(
352        &self,
353        sponsorship_token: Option<&'a str>,
354        organization_sponsorship_redeem_request_model: Option<
355            models::OrganizationSponsorshipRedeemRequestModel,
356        >,
357    ) -> Result<(), Error<RedeemSponsorshipError>> {
358        let local_var_configuration = &self.configuration;
359
360        let local_var_client = &local_var_configuration.client;
361
362        let local_var_uri_str = format!(
363            "{}/organization/sponsorship/redeem",
364            local_var_configuration.base_path
365        );
366        let mut local_var_req_builder =
367            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
368
369        if let Some(ref param_value) = sponsorship_token {
370            local_var_req_builder =
371                local_var_req_builder.query(&[("sponsorshipToken", &param_value.to_string())]);
372        }
373        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
374        local_var_req_builder =
375            local_var_req_builder.json(&organization_sponsorship_redeem_request_model);
376
377        let local_var_resp = local_var_req_builder.send().await?;
378
379        let local_var_status = local_var_resp.status();
380        let local_var_content = local_var_resp.text().await?;
381
382        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
383            Ok(())
384        } else {
385            let local_var_entity: Option<RedeemSponsorshipError> =
386                serde_json::from_str(&local_var_content).ok();
387            let local_var_error = ResponseContent {
388                status: local_var_status,
389                content: local_var_content,
390                entity: local_var_entity,
391            };
392            Err(Error::ResponseError(local_var_error))
393        }
394    }
395
396    async fn remove_sponsorship<'a>(
397        &self,
398        sponsored_org_id: uuid::Uuid,
399    ) -> Result<(), Error<RemoveSponsorshipError>> {
400        let local_var_configuration = &self.configuration;
401
402        let local_var_client = &local_var_configuration.client;
403
404        let local_var_uri_str = format!(
405            "{}/organization/sponsorship/sponsored/{sponsoredOrgId}",
406            local_var_configuration.base_path,
407            sponsoredOrgId = sponsored_org_id
408        );
409        let mut local_var_req_builder =
410            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
411
412        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
413
414        let local_var_resp = local_var_req_builder.send().await?;
415
416        let local_var_status = local_var_resp.status();
417        let local_var_content = local_var_resp.text().await?;
418
419        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
420            Ok(())
421        } else {
422            let local_var_entity: Option<RemoveSponsorshipError> =
423                serde_json::from_str(&local_var_content).ok();
424            let local_var_error = ResponseContent {
425                status: local_var_status,
426                content: local_var_content,
427                entity: local_var_entity,
428            };
429            Err(Error::ResponseError(local_var_error))
430        }
431    }
432
433    async fn resend_sponsorship_offer<'a>(
434        &self,
435        sponsoring_org_id: uuid::Uuid,
436        sponsored_friendly_name: Option<&'a str>,
437    ) -> Result<(), Error<ResendSponsorshipOfferError>> {
438        let local_var_configuration = &self.configuration;
439
440        let local_var_client = &local_var_configuration.client;
441
442        let local_var_uri_str = format!(
443            "{}/organization/sponsorship/{sponsoringOrgId}/families-for-enterprise/resend",
444            local_var_configuration.base_path,
445            sponsoringOrgId = sponsoring_org_id
446        );
447        let mut local_var_req_builder =
448            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
449
450        if let Some(ref param_value) = sponsored_friendly_name {
451            local_var_req_builder =
452                local_var_req_builder.query(&[("sponsoredFriendlyName", &param_value.to_string())]);
453        }
454        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
455
456        let local_var_resp = local_var_req_builder.send().await?;
457
458        let local_var_status = local_var_resp.status();
459        let local_var_content = local_var_resp.text().await?;
460
461        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
462            Ok(())
463        } else {
464            let local_var_entity: Option<ResendSponsorshipOfferError> =
465                serde_json::from_str(&local_var_content).ok();
466            let local_var_error = ResponseContent {
467                status: local_var_status,
468                content: local_var_content,
469                entity: local_var_entity,
470            };
471            Err(Error::ResponseError(local_var_error))
472        }
473    }
474
475    async fn revoke_sponsorship<'a>(
476        &self,
477        sponsoring_organization_id: uuid::Uuid,
478    ) -> Result<(), Error<RevokeSponsorshipError>> {
479        let local_var_configuration = &self.configuration;
480
481        let local_var_client = &local_var_configuration.client;
482
483        let local_var_uri_str = format!(
484            "{}/organization/sponsorship/{sponsoringOrganizationId}",
485            local_var_configuration.base_path,
486            sponsoringOrganizationId = sponsoring_organization_id
487        );
488        let mut local_var_req_builder =
489            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
490
491        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
492
493        let local_var_resp = local_var_req_builder.send().await?;
494
495        let local_var_status = local_var_resp.status();
496        let local_var_content = local_var_resp.text().await?;
497
498        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
499            Ok(())
500        } else {
501            let local_var_entity: Option<RevokeSponsorshipError> =
502                serde_json::from_str(&local_var_content).ok();
503            let local_var_error = ResponseContent {
504                status: local_var_status,
505                content: local_var_content,
506                entity: local_var_entity,
507            };
508            Err(Error::ResponseError(local_var_error))
509        }
510    }
511
512    async fn sync<'a>(
513        &self,
514        organization_sponsorship_sync_request_model: Option<
515            models::OrganizationSponsorshipSyncRequestModel,
516        >,
517    ) -> Result<models::OrganizationSponsorshipSyncResponseModel, Error<SyncError>> {
518        let local_var_configuration = &self.configuration;
519
520        let local_var_client = &local_var_configuration.client;
521
522        let local_var_uri_str = format!(
523            "{}/organization/sponsorship/sync",
524            local_var_configuration.base_path
525        );
526        let mut local_var_req_builder =
527            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
528
529        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
530        local_var_req_builder =
531            local_var_req_builder.json(&organization_sponsorship_sync_request_model);
532
533        let local_var_resp = local_var_req_builder.send().await?;
534
535        let local_var_status = local_var_resp.status();
536        let local_var_content_type = local_var_resp
537            .headers()
538            .get("content-type")
539            .and_then(|v| v.to_str().ok())
540            .unwrap_or("application/octet-stream");
541        let local_var_content_type = super::ContentType::from(local_var_content_type);
542        let local_var_content = local_var_resp.text().await?;
543
544        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
545            match local_var_content_type {
546                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
547                ContentType::Text => {
548                    return Err(Error::from(serde_json::Error::custom(
549                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationSponsorshipSyncResponseModel`",
550                    )));
551                }
552                ContentType::Unsupported(local_var_unknown_type) => {
553                    return Err(Error::from(serde_json::Error::custom(format!(
554                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationSponsorshipSyncResponseModel`"
555                    ))));
556                }
557            }
558        } else {
559            let local_var_entity: Option<SyncError> = serde_json::from_str(&local_var_content).ok();
560            let local_var_error = ResponseContent {
561                status: local_var_status,
562                content: local_var_content,
563                entity: local_var_entity,
564            };
565            Err(Error::ResponseError(local_var_error))
566        }
567    }
568}
569
570/// struct for typed errors of method
571/// [`OrganizationSponsorshipsApi::admin_initiated_revoke_sponsorship`]
572#[derive(Debug, Clone, Serialize, Deserialize)]
573#[serde(untagged)]
574pub enum AdminInitiatedRevokeSponsorshipError {
575    UnknownValue(serde_json::Value),
576}
577/// struct for typed errors of method [`OrganizationSponsorshipsApi::create_sponsorship`]
578#[derive(Debug, Clone, Serialize, Deserialize)]
579#[serde(untagged)]
580pub enum CreateSponsorshipError {
581    UnknownValue(serde_json::Value),
582}
583/// struct for typed errors of method [`OrganizationSponsorshipsApi::get_sponsored_organizations`]
584#[derive(Debug, Clone, Serialize, Deserialize)]
585#[serde(untagged)]
586pub enum GetSponsoredOrganizationsError {
587    UnknownValue(serde_json::Value),
588}
589/// struct for typed errors of method [`OrganizationSponsorshipsApi::get_sync_status`]
590#[derive(Debug, Clone, Serialize, Deserialize)]
591#[serde(untagged)]
592pub enum GetSyncStatusError {
593    UnknownValue(serde_json::Value),
594}
595/// struct for typed errors of method
596/// [`OrganizationSponsorshipsApi::pre_validate_sponsorship_token`]
597#[derive(Debug, Clone, Serialize, Deserialize)]
598#[serde(untagged)]
599pub enum PreValidateSponsorshipTokenError {
600    UnknownValue(serde_json::Value),
601}
602/// struct for typed errors of method [`OrganizationSponsorshipsApi::redeem_sponsorship`]
603#[derive(Debug, Clone, Serialize, Deserialize)]
604#[serde(untagged)]
605pub enum RedeemSponsorshipError {
606    UnknownValue(serde_json::Value),
607}
608/// struct for typed errors of method [`OrganizationSponsorshipsApi::remove_sponsorship`]
609#[derive(Debug, Clone, Serialize, Deserialize)]
610#[serde(untagged)]
611pub enum RemoveSponsorshipError {
612    UnknownValue(serde_json::Value),
613}
614/// struct for typed errors of method [`OrganizationSponsorshipsApi::resend_sponsorship_offer`]
615#[derive(Debug, Clone, Serialize, Deserialize)]
616#[serde(untagged)]
617pub enum ResendSponsorshipOfferError {
618    UnknownValue(serde_json::Value),
619}
620/// struct for typed errors of method [`OrganizationSponsorshipsApi::revoke_sponsorship`]
621#[derive(Debug, Clone, Serialize, Deserialize)]
622#[serde(untagged)]
623pub enum RevokeSponsorshipError {
624    UnknownValue(serde_json::Value),
625}
626/// struct for typed errors of method [`OrganizationSponsorshipsApi::sync`]
627#[derive(Debug, Clone, Serialize, Deserialize)]
628#[serde(untagged)]
629pub enum SyncError {
630    UnknownValue(serde_json::Value),
631}