bitwarden_api_api/apis/
secrets_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::{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 SecretsApi: Send + Sync {
29    /// POST /secrets/delete
30    async fn bulk_delete<'a>(
31        &self,
32        uuid_colon_colon_uuid: Option<Vec<uuid::Uuid>>,
33    ) -> Result<models::BulkDeleteResponseModelListResponseModel, Error<BulkDeleteError>>;
34
35    /// POST /organizations/{organizationId}/secrets
36    async fn create<'a>(
37        &self,
38        organization_id: uuid::Uuid,
39        secret_create_request_model: Option<models::SecretCreateRequestModel>,
40    ) -> Result<models::SecretResponseModel, Error<CreateError>>;
41
42    /// GET /secrets/{id}
43    async fn get<'a>(&self, id: uuid::Uuid)
44    -> Result<models::SecretResponseModel, Error<GetError>>;
45
46    /// POST /secrets/get-by-ids
47    async fn get_secrets_by_ids<'a>(
48        &self,
49        get_secrets_request_model: Option<models::GetSecretsRequestModel>,
50    ) -> Result<models::BaseSecretResponseModelListResponseModel, Error<GetSecretsByIdsError>>;
51
52    /// GET /projects/{projectId}/secrets
53    async fn get_secrets_by_project<'a>(
54        &self,
55        project_id: uuid::Uuid,
56    ) -> Result<models::SecretWithProjectsListResponseModel, Error<GetSecretsByProjectError>>;
57
58    /// GET /organizations/{organizationId}/secrets/sync
59    async fn get_secrets_sync<'a>(
60        &self,
61        organization_id: uuid::Uuid,
62        last_synced_date: Option<String>,
63    ) -> Result<models::SecretsSyncResponseModel, Error<GetSecretsSyncError>>;
64
65    /// GET /organizations/{organizationId}/secrets
66    async fn list_by_organization<'a>(
67        &self,
68        organization_id: uuid::Uuid,
69    ) -> Result<models::SecretWithProjectsListResponseModel, Error<ListByOrganizationError>>;
70
71    /// PUT /secrets/{id}
72    async fn update_secret<'a>(
73        &self,
74        id: uuid::Uuid,
75        secret_update_request_model: Option<models::SecretUpdateRequestModel>,
76    ) -> Result<models::SecretResponseModel, Error<UpdateSecretError>>;
77}
78
79pub struct SecretsApiClient {
80    configuration: Arc<configuration::Configuration>,
81}
82
83impl SecretsApiClient {
84    pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
85        Self { configuration }
86    }
87}
88
89#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
90#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
91impl SecretsApi for SecretsApiClient {
92    async fn bulk_delete<'a>(
93        &self,
94        uuid_colon_colon_uuid: Option<Vec<uuid::Uuid>>,
95    ) -> Result<models::BulkDeleteResponseModelListResponseModel, Error<BulkDeleteError>> {
96        let local_var_configuration = &self.configuration;
97
98        let local_var_client = &local_var_configuration.client;
99
100        let local_var_uri_str = format!("{}/secrets/delete", local_var_configuration.base_path);
101        let mut local_var_req_builder =
102            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
103
104        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
105            local_var_req_builder = local_var_req_builder
106                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
107        }
108        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
109            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
110        };
111        local_var_req_builder = local_var_req_builder.json(&uuid_colon_colon_uuid);
112
113        let local_var_req = local_var_req_builder.build()?;
114        let local_var_resp = local_var_client.execute(local_var_req).await?;
115
116        let local_var_status = local_var_resp.status();
117        let local_var_content_type = local_var_resp
118            .headers()
119            .get("content-type")
120            .and_then(|v| v.to_str().ok())
121            .unwrap_or("application/octet-stream");
122        let local_var_content_type = super::ContentType::from(local_var_content_type);
123        let local_var_content = local_var_resp.text().await?;
124
125        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
126            match local_var_content_type {
127                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
128                ContentType::Text => {
129                    return Err(Error::from(serde_json::Error::custom(
130                        "Received `text/plain` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`",
131                    )));
132                }
133                ContentType::Unsupported(local_var_unknown_type) => {
134                    return Err(Error::from(serde_json::Error::custom(format!(
135                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`"
136                    ))));
137                }
138            }
139        } else {
140            let local_var_entity: Option<BulkDeleteError> =
141                serde_json::from_str(&local_var_content).ok();
142            let local_var_error = ResponseContent {
143                status: local_var_status,
144                content: local_var_content,
145                entity: local_var_entity,
146            };
147            Err(Error::ResponseError(local_var_error))
148        }
149    }
150
151    async fn create<'a>(
152        &self,
153        organization_id: uuid::Uuid,
154        secret_create_request_model: Option<models::SecretCreateRequestModel>,
155    ) -> Result<models::SecretResponseModel, Error<CreateError>> {
156        let local_var_configuration = &self.configuration;
157
158        let local_var_client = &local_var_configuration.client;
159
160        let local_var_uri_str = format!(
161            "{}/organizations/{organizationId}/secrets",
162            local_var_configuration.base_path,
163            organizationId = organization_id
164        );
165        let mut local_var_req_builder =
166            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
167
168        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
169            local_var_req_builder = local_var_req_builder
170                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
171        }
172        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
173            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
174        };
175        local_var_req_builder = local_var_req_builder.json(&secret_create_request_model);
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_type = local_var_resp
182            .headers()
183            .get("content-type")
184            .and_then(|v| v.to_str().ok())
185            .unwrap_or("application/octet-stream");
186        let local_var_content_type = super::ContentType::from(local_var_content_type);
187        let local_var_content = local_var_resp.text().await?;
188
189        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
190            match local_var_content_type {
191                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
192                ContentType::Text => {
193                    return Err(Error::from(serde_json::Error::custom(
194                        "Received `text/plain` content type response that cannot be converted to `models::SecretResponseModel`",
195                    )));
196                }
197                ContentType::Unsupported(local_var_unknown_type) => {
198                    return Err(Error::from(serde_json::Error::custom(format!(
199                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::SecretResponseModel`"
200                    ))));
201                }
202            }
203        } else {
204            let local_var_entity: Option<CreateError> =
205                serde_json::from_str(&local_var_content).ok();
206            let local_var_error = ResponseContent {
207                status: local_var_status,
208                content: local_var_content,
209                entity: local_var_entity,
210            };
211            Err(Error::ResponseError(local_var_error))
212        }
213    }
214
215    async fn get<'a>(
216        &self,
217        id: uuid::Uuid,
218    ) -> Result<models::SecretResponseModel, Error<GetError>> {
219        let local_var_configuration = &self.configuration;
220
221        let local_var_client = &local_var_configuration.client;
222
223        let local_var_uri_str = format!(
224            "{}/secrets/{id}",
225            local_var_configuration.base_path,
226            id = id
227        );
228        let mut local_var_req_builder =
229            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
230
231        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
232            local_var_req_builder = local_var_req_builder
233                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
234        }
235        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
236            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
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_type = local_var_resp
244            .headers()
245            .get("content-type")
246            .and_then(|v| v.to_str().ok())
247            .unwrap_or("application/octet-stream");
248        let local_var_content_type = super::ContentType::from(local_var_content_type);
249        let local_var_content = local_var_resp.text().await?;
250
251        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
252            match local_var_content_type {
253                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
254                ContentType::Text => {
255                    return Err(Error::from(serde_json::Error::custom(
256                        "Received `text/plain` content type response that cannot be converted to `models::SecretResponseModel`",
257                    )));
258                }
259                ContentType::Unsupported(local_var_unknown_type) => {
260                    return Err(Error::from(serde_json::Error::custom(format!(
261                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::SecretResponseModel`"
262                    ))));
263                }
264            }
265        } else {
266            let local_var_entity: Option<GetError> = serde_json::from_str(&local_var_content).ok();
267            let local_var_error = ResponseContent {
268                status: local_var_status,
269                content: local_var_content,
270                entity: local_var_entity,
271            };
272            Err(Error::ResponseError(local_var_error))
273        }
274    }
275
276    async fn get_secrets_by_ids<'a>(
277        &self,
278        get_secrets_request_model: Option<models::GetSecretsRequestModel>,
279    ) -> Result<models::BaseSecretResponseModelListResponseModel, Error<GetSecretsByIdsError>> {
280        let local_var_configuration = &self.configuration;
281
282        let local_var_client = &local_var_configuration.client;
283
284        let local_var_uri_str = format!("{}/secrets/get-by-ids", local_var_configuration.base_path);
285        let mut local_var_req_builder =
286            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
287
288        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
289            local_var_req_builder = local_var_req_builder
290                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
291        }
292        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
293            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
294        };
295        local_var_req_builder = local_var_req_builder.json(&get_secrets_request_model);
296
297        let local_var_req = local_var_req_builder.build()?;
298        let local_var_resp = local_var_client.execute(local_var_req).await?;
299
300        let local_var_status = local_var_resp.status();
301        let local_var_content_type = local_var_resp
302            .headers()
303            .get("content-type")
304            .and_then(|v| v.to_str().ok())
305            .unwrap_or("application/octet-stream");
306        let local_var_content_type = super::ContentType::from(local_var_content_type);
307        let local_var_content = local_var_resp.text().await?;
308
309        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
310            match local_var_content_type {
311                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
312                ContentType::Text => {
313                    return Err(Error::from(serde_json::Error::custom(
314                        "Received `text/plain` content type response that cannot be converted to `models::BaseSecretResponseModelListResponseModel`",
315                    )));
316                }
317                ContentType::Unsupported(local_var_unknown_type) => {
318                    return Err(Error::from(serde_json::Error::custom(format!(
319                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::BaseSecretResponseModelListResponseModel`"
320                    ))));
321                }
322            }
323        } else {
324            let local_var_entity: Option<GetSecretsByIdsError> =
325                serde_json::from_str(&local_var_content).ok();
326            let local_var_error = ResponseContent {
327                status: local_var_status,
328                content: local_var_content,
329                entity: local_var_entity,
330            };
331            Err(Error::ResponseError(local_var_error))
332        }
333    }
334
335    async fn get_secrets_by_project<'a>(
336        &self,
337        project_id: uuid::Uuid,
338    ) -> Result<models::SecretWithProjectsListResponseModel, Error<GetSecretsByProjectError>> {
339        let local_var_configuration = &self.configuration;
340
341        let local_var_client = &local_var_configuration.client;
342
343        let local_var_uri_str = format!(
344            "{}/projects/{projectId}/secrets",
345            local_var_configuration.base_path,
346            projectId = project_id
347        );
348        let mut local_var_req_builder =
349            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
350
351        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
352            local_var_req_builder = local_var_req_builder
353                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
354        }
355        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
356            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
357        };
358
359        let local_var_req = local_var_req_builder.build()?;
360        let local_var_resp = local_var_client.execute(local_var_req).await?;
361
362        let local_var_status = local_var_resp.status();
363        let local_var_content_type = local_var_resp
364            .headers()
365            .get("content-type")
366            .and_then(|v| v.to_str().ok())
367            .unwrap_or("application/octet-stream");
368        let local_var_content_type = super::ContentType::from(local_var_content_type);
369        let local_var_content = local_var_resp.text().await?;
370
371        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
372            match local_var_content_type {
373                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
374                ContentType::Text => {
375                    return Err(Error::from(serde_json::Error::custom(
376                        "Received `text/plain` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`",
377                    )));
378                }
379                ContentType::Unsupported(local_var_unknown_type) => {
380                    return Err(Error::from(serde_json::Error::custom(format!(
381                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`"
382                    ))));
383                }
384            }
385        } else {
386            let local_var_entity: Option<GetSecretsByProjectError> =
387                serde_json::from_str(&local_var_content).ok();
388            let local_var_error = ResponseContent {
389                status: local_var_status,
390                content: local_var_content,
391                entity: local_var_entity,
392            };
393            Err(Error::ResponseError(local_var_error))
394        }
395    }
396
397    async fn get_secrets_sync<'a>(
398        &self,
399        organization_id: uuid::Uuid,
400        last_synced_date: Option<String>,
401    ) -> Result<models::SecretsSyncResponseModel, Error<GetSecretsSyncError>> {
402        let local_var_configuration = &self.configuration;
403
404        let local_var_client = &local_var_configuration.client;
405
406        let local_var_uri_str = format!(
407            "{}/organizations/{organizationId}/secrets/sync",
408            local_var_configuration.base_path,
409            organizationId = organization_id
410        );
411        let mut local_var_req_builder =
412            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
413
414        if let Some(ref param_value) = last_synced_date {
415            local_var_req_builder =
416                local_var_req_builder.query(&[("lastSyncedDate", &param_value.to_string())]);
417        }
418        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
419            local_var_req_builder = local_var_req_builder
420                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
421        }
422        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
423            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
424        };
425
426        let local_var_req = local_var_req_builder.build()?;
427        let local_var_resp = local_var_client.execute(local_var_req).await?;
428
429        let local_var_status = local_var_resp.status();
430        let local_var_content_type = local_var_resp
431            .headers()
432            .get("content-type")
433            .and_then(|v| v.to_str().ok())
434            .unwrap_or("application/octet-stream");
435        let local_var_content_type = super::ContentType::from(local_var_content_type);
436        let local_var_content = local_var_resp.text().await?;
437
438        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
439            match local_var_content_type {
440                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
441                ContentType::Text => {
442                    return Err(Error::from(serde_json::Error::custom(
443                        "Received `text/plain` content type response that cannot be converted to `models::SecretsSyncResponseModel`",
444                    )));
445                }
446                ContentType::Unsupported(local_var_unknown_type) => {
447                    return Err(Error::from(serde_json::Error::custom(format!(
448                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::SecretsSyncResponseModel`"
449                    ))));
450                }
451            }
452        } else {
453            let local_var_entity: Option<GetSecretsSyncError> =
454                serde_json::from_str(&local_var_content).ok();
455            let local_var_error = ResponseContent {
456                status: local_var_status,
457                content: local_var_content,
458                entity: local_var_entity,
459            };
460            Err(Error::ResponseError(local_var_error))
461        }
462    }
463
464    async fn list_by_organization<'a>(
465        &self,
466        organization_id: uuid::Uuid,
467    ) -> Result<models::SecretWithProjectsListResponseModel, Error<ListByOrganizationError>> {
468        let local_var_configuration = &self.configuration;
469
470        let local_var_client = &local_var_configuration.client;
471
472        let local_var_uri_str = format!(
473            "{}/organizations/{organizationId}/secrets",
474            local_var_configuration.base_path,
475            organizationId = organization_id
476        );
477        let mut local_var_req_builder =
478            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
479
480        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
481            local_var_req_builder = local_var_req_builder
482                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
483        }
484        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
485            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
486        };
487
488        let local_var_req = local_var_req_builder.build()?;
489        let local_var_resp = local_var_client.execute(local_var_req).await?;
490
491        let local_var_status = local_var_resp.status();
492        let local_var_content_type = local_var_resp
493            .headers()
494            .get("content-type")
495            .and_then(|v| v.to_str().ok())
496            .unwrap_or("application/octet-stream");
497        let local_var_content_type = super::ContentType::from(local_var_content_type);
498        let local_var_content = local_var_resp.text().await?;
499
500        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
501            match local_var_content_type {
502                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
503                ContentType::Text => {
504                    return Err(Error::from(serde_json::Error::custom(
505                        "Received `text/plain` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`",
506                    )));
507                }
508                ContentType::Unsupported(local_var_unknown_type) => {
509                    return Err(Error::from(serde_json::Error::custom(format!(
510                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`"
511                    ))));
512                }
513            }
514        } else {
515            let local_var_entity: Option<ListByOrganizationError> =
516                serde_json::from_str(&local_var_content).ok();
517            let local_var_error = ResponseContent {
518                status: local_var_status,
519                content: local_var_content,
520                entity: local_var_entity,
521            };
522            Err(Error::ResponseError(local_var_error))
523        }
524    }
525
526    async fn update_secret<'a>(
527        &self,
528        id: uuid::Uuid,
529        secret_update_request_model: Option<models::SecretUpdateRequestModel>,
530    ) -> Result<models::SecretResponseModel, Error<UpdateSecretError>> {
531        let local_var_configuration = &self.configuration;
532
533        let local_var_client = &local_var_configuration.client;
534
535        let local_var_uri_str = format!(
536            "{}/secrets/{id}",
537            local_var_configuration.base_path,
538            id = id
539        );
540        let mut local_var_req_builder =
541            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
542
543        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
544            local_var_req_builder = local_var_req_builder
545                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
546        }
547        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
548            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
549        };
550        local_var_req_builder = local_var_req_builder.json(&secret_update_request_model);
551
552        let local_var_req = local_var_req_builder.build()?;
553        let local_var_resp = local_var_client.execute(local_var_req).await?;
554
555        let local_var_status = local_var_resp.status();
556        let local_var_content_type = local_var_resp
557            .headers()
558            .get("content-type")
559            .and_then(|v| v.to_str().ok())
560            .unwrap_or("application/octet-stream");
561        let local_var_content_type = super::ContentType::from(local_var_content_type);
562        let local_var_content = local_var_resp.text().await?;
563
564        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
565            match local_var_content_type {
566                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
567                ContentType::Text => {
568                    return Err(Error::from(serde_json::Error::custom(
569                        "Received `text/plain` content type response that cannot be converted to `models::SecretResponseModel`",
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 converted to `models::SecretResponseModel`"
575                    ))));
576                }
577            }
578        } else {
579            let local_var_entity: Option<UpdateSecretError> =
580                serde_json::from_str(&local_var_content).ok();
581            let local_var_error = ResponseContent {
582                status: local_var_status,
583                content: local_var_content,
584                entity: local_var_entity,
585            };
586            Err(Error::ResponseError(local_var_error))
587        }
588    }
589}
590
591/// struct for typed errors of method [`SecretsApi::bulk_delete`]
592#[derive(Debug, Clone, Serialize, Deserialize)]
593#[serde(untagged)]
594pub enum BulkDeleteError {
595    UnknownValue(serde_json::Value),
596}
597/// struct for typed errors of method [`SecretsApi::create`]
598#[derive(Debug, Clone, Serialize, Deserialize)]
599#[serde(untagged)]
600pub enum CreateError {
601    UnknownValue(serde_json::Value),
602}
603/// struct for typed errors of method [`SecretsApi::get`]
604#[derive(Debug, Clone, Serialize, Deserialize)]
605#[serde(untagged)]
606pub enum GetError {
607    UnknownValue(serde_json::Value),
608}
609/// struct for typed errors of method [`SecretsApi::get_secrets_by_ids`]
610#[derive(Debug, Clone, Serialize, Deserialize)]
611#[serde(untagged)]
612pub enum GetSecretsByIdsError {
613    UnknownValue(serde_json::Value),
614}
615/// struct for typed errors of method [`SecretsApi::get_secrets_by_project`]
616#[derive(Debug, Clone, Serialize, Deserialize)]
617#[serde(untagged)]
618pub enum GetSecretsByProjectError {
619    UnknownValue(serde_json::Value),
620}
621/// struct for typed errors of method [`SecretsApi::get_secrets_sync`]
622#[derive(Debug, Clone, Serialize, Deserialize)]
623#[serde(untagged)]
624pub enum GetSecretsSyncError {
625    UnknownValue(serde_json::Value),
626}
627/// struct for typed errors of method [`SecretsApi::list_by_organization`]
628#[derive(Debug, Clone, Serialize, Deserialize)]
629#[serde(untagged)]
630pub enum ListByOrganizationError {
631    UnknownValue(serde_json::Value),
632}
633/// struct for typed errors of method [`SecretsApi::update_secret`]
634#[derive(Debug, Clone, Serialize, Deserialize)]
635#[serde(untagged)]
636pub enum UpdateSecretError {
637    UnknownValue(serde_json::Value),
638}