Skip to main content

bitwarden_api_api/apis/
ciphers_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 CiphersApi: Send + Sync {
29    /// POST /ciphers/attachment/validate/azure
30    async fn azure_validate_file(&self) -> Result<(), Error<AzureValidateFileError>>;
31
32    /// DELETE /ciphers/{id}
33    async fn delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error<DeleteError>>;
34
35    /// DELETE /ciphers/{id}/admin
36    async fn delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error<DeleteAdminError>>;
37
38    /// DELETE /ciphers/{id}/attachment/{attachmentId}
39    async fn delete_attachment<'a>(
40        &self,
41        id: uuid::Uuid,
42        attachment_id: &'a str,
43    ) -> Result<models::DeleteAttachmentResponseModel, Error<DeleteAttachmentError>>;
44
45    /// DELETE /ciphers/{id}/attachment/{attachmentId}/admin
46    async fn delete_attachment_admin<'a>(
47        &self,
48        id: uuid::Uuid,
49        attachment_id: &'a str,
50    ) -> Result<models::DeleteAttachmentResponseModel, Error<DeleteAttachmentAdminError>>;
51
52    /// DELETE /ciphers
53    async fn delete_many<'a>(
54        &self,
55        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
56    ) -> Result<(), Error<DeleteManyError>>;
57
58    /// DELETE /ciphers/admin
59    async fn delete_many_admin<'a>(
60        &self,
61        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
62    ) -> Result<(), Error<DeleteManyAdminError>>;
63
64    /// GET /ciphers/attachment/download
65    async fn download_attachment<'a>(
66        &self,
67        token: Option<&'a str>,
68    ) -> Result<(), Error<DownloadAttachmentError>>;
69
70    /// GET /ciphers/{id}
71    async fn get<'a>(&self, id: uuid::Uuid)
72    -> Result<models::CipherResponseModel, Error<GetError>>;
73
74    /// GET /ciphers/{id}/admin
75    async fn get_admin<'a>(
76        &self,
77        id: &'a str,
78    ) -> Result<models::CipherMiniResponseModel, Error<GetAdminError>>;
79
80    /// GET /ciphers
81    async fn get_all(
82        &self,
83    ) -> Result<models::CipherDetailsResponseModelListResponseModel, Error<GetAllError>>;
84
85    /// GET /ciphers/organization-details/assigned
86    async fn get_assigned_organization_ciphers<'a>(
87        &self,
88        organization_id: Option<uuid::Uuid>,
89    ) -> Result<
90        models::CipherDetailsResponseModelListResponseModel,
91        Error<GetAssignedOrganizationCiphersError>,
92    >;
93
94    /// GET /ciphers/{id}/attachment/{attachmentId}
95    async fn get_attachment_data<'a>(
96        &self,
97        id: uuid::Uuid,
98        attachment_id: &'a str,
99    ) -> Result<models::AttachmentResponseModel, Error<GetAttachmentDataError>>;
100
101    /// GET /ciphers/{id}/attachment/{attachmentId}/admin
102    async fn get_attachment_data_admin<'a>(
103        &self,
104        id: uuid::Uuid,
105        attachment_id: &'a str,
106    ) -> Result<models::AttachmentResponseModel, Error<GetAttachmentDataAdminError>>;
107
108    /// GET /ciphers/{id}/details
109    async fn get_details<'a>(
110        &self,
111        id: uuid::Uuid,
112    ) -> Result<models::CipherDetailsResponseModel, Error<GetDetailsError>>;
113
114    /// GET /ciphers/organization-details
115    async fn get_organization_ciphers<'a>(
116        &self,
117        organization_id: Option<uuid::Uuid>,
118        include_member_items: Option<bool>,
119    ) -> Result<
120        models::CipherMiniDetailsResponseModelListResponseModel,
121        Error<GetOrganizationCiphersError>,
122    >;
123
124    /// PUT /ciphers/move
125    async fn move_many<'a>(
126        &self,
127        cipher_bulk_move_request_model: Option<models::CipherBulkMoveRequestModel>,
128    ) -> Result<(), Error<MoveManyError>>;
129
130    /// POST /ciphers
131    async fn post<'a>(
132        &self,
133        cipher_request_model: Option<models::CipherRequestModel>,
134    ) -> Result<models::CipherResponseModel, Error<PostError>>;
135
136    /// POST /ciphers/admin
137    async fn post_admin<'a>(
138        &self,
139        cipher_create_request_model: Option<models::CipherCreateRequestModel>,
140    ) -> Result<models::CipherMiniResponseModel, Error<PostAdminError>>;
141
142    /// POST /ciphers/{id}/attachment/v2
143    async fn post_attachment<'a>(
144        &self,
145        id: uuid::Uuid,
146        attachment_request_model: Option<models::AttachmentRequestModel>,
147    ) -> Result<models::AttachmentUploadDataResponseModel, Error<PostAttachmentError>>;
148
149    /// POST /ciphers/{id}/attachment-admin
150    async fn post_attachment_admin<'a>(
151        &self,
152        id: &'a str,
153    ) -> Result<models::CipherMiniResponseModel, Error<PostAttachmentAdminError>>;
154
155    /// POST /ciphers/{id}/attachment/{attachmentId}/share
156    async fn post_attachment_share<'a>(
157        &self,
158        id: &'a str,
159        attachment_id: &'a str,
160        organization_id: Option<uuid::Uuid>,
161    ) -> Result<(), Error<PostAttachmentShareError>>;
162
163    /// POST /ciphers/bulk-collections
164    async fn post_bulk_collections<'a>(
165        &self,
166        cipher_bulk_update_collections_request_model: Option<
167            models::CipherBulkUpdateCollectionsRequestModel,
168        >,
169    ) -> Result<(), Error<PostBulkCollectionsError>>;
170
171    /// POST /ciphers/create
172    async fn post_create<'a>(
173        &self,
174        cipher_create_request_model: Option<models::CipherCreateRequestModel>,
175    ) -> Result<models::CipherResponseModel, Error<PostCreateError>>;
176
177    /// POST /ciphers/{id}/attachment/{attachmentId}
178    async fn post_file_for_existing_attachment<'a>(
179        &self,
180        id: uuid::Uuid,
181        attachment_id: &'a str,
182    ) -> Result<(), Error<PostFileForExistingAttachmentError>>;
183
184    /// POST /ciphers/purge
185    async fn post_purge<'a>(
186        &self,
187        organization_id: Option<uuid::Uuid>,
188        secret_verification_request_model: Option<models::SecretVerificationRequestModel>,
189    ) -> Result<(), Error<PostPurgeError>>;
190
191    /// PUT /ciphers/{id}
192    async fn put<'a>(
193        &self,
194        id: uuid::Uuid,
195        cipher_request_model: Option<models::CipherRequestModel>,
196    ) -> Result<models::CipherResponseModel, Error<PutError>>;
197
198    /// PUT /ciphers/{id}/admin
199    async fn put_admin<'a>(
200        &self,
201        id: uuid::Uuid,
202        cipher_request_model: Option<models::CipherRequestModel>,
203    ) -> Result<models::CipherMiniResponseModel, Error<PutAdminError>>;
204
205    /// PUT /ciphers/{id}/archive
206    async fn put_archive<'a>(
207        &self,
208        id: uuid::Uuid,
209    ) -> Result<models::CipherResponseModel, Error<PutArchiveError>>;
210
211    /// PUT /ciphers/archive
212    async fn put_archive_many<'a>(
213        &self,
214        cipher_bulk_archive_request_model: Option<models::CipherBulkArchiveRequestModel>,
215    ) -> Result<models::CipherResponseModelListResponseModel, Error<PutArchiveManyError>>;
216
217    /// PUT /ciphers/{id}/collections
218    async fn put_collections<'a>(
219        &self,
220        id: uuid::Uuid,
221        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
222    ) -> Result<models::CipherDetailsResponseModel, Error<PutCollectionsError>>;
223
224    /// PUT /ciphers/{id}/collections-admin
225    async fn put_collections_admin<'a>(
226        &self,
227        id: &'a str,
228        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
229    ) -> Result<models::CipherMiniDetailsResponseModel, Error<PutCollectionsAdminError>>;
230
231    /// PUT /ciphers/{id}/collections_v2
232    async fn put_collections_v_next<'a>(
233        &self,
234        id: uuid::Uuid,
235        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
236    ) -> Result<models::OptionalCipherDetailsResponseModel, Error<PutCollections_vNextError>>;
237
238    /// PUT /ciphers/{id}/delete
239    async fn put_delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error<PutDeleteError>>;
240
241    /// PUT /ciphers/{id}/delete-admin
242    async fn put_delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error<PutDeleteAdminError>>;
243
244    /// PUT /ciphers/delete
245    async fn put_delete_many<'a>(
246        &self,
247        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
248    ) -> Result<(), Error<PutDeleteManyError>>;
249
250    /// PUT /ciphers/delete-admin
251    async fn put_delete_many_admin<'a>(
252        &self,
253        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
254    ) -> Result<(), Error<PutDeleteManyAdminError>>;
255
256    /// PUT /ciphers/{id}/partial
257    async fn put_partial<'a>(
258        &self,
259        id: uuid::Uuid,
260        cipher_partial_request_model: Option<models::CipherPartialRequestModel>,
261    ) -> Result<models::CipherResponseModel, Error<PutPartialError>>;
262
263    /// PUT /ciphers/{id}/restore
264    async fn put_restore<'a>(
265        &self,
266        id: uuid::Uuid,
267    ) -> Result<models::CipherResponseModel, Error<PutRestoreError>>;
268
269    /// PUT /ciphers/{id}/restore-admin
270    async fn put_restore_admin<'a>(
271        &self,
272        id: uuid::Uuid,
273    ) -> Result<models::CipherMiniResponseModel, Error<PutRestoreAdminError>>;
274
275    /// PUT /ciphers/restore
276    async fn put_restore_many<'a>(
277        &self,
278        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
279    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error<PutRestoreManyError>>;
280
281    /// PUT /ciphers/restore-admin
282    async fn put_restore_many_admin<'a>(
283        &self,
284        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
285    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error<PutRestoreManyAdminError>>;
286
287    /// PUT /ciphers/{id}/share
288    async fn put_share<'a>(
289        &self,
290        id: uuid::Uuid,
291        cipher_share_request_model: Option<models::CipherShareRequestModel>,
292    ) -> Result<models::CipherResponseModel, Error<PutShareError>>;
293
294    /// PUT /ciphers/share
295    async fn put_share_many<'a>(
296        &self,
297        cipher_bulk_share_request_model: Option<models::CipherBulkShareRequestModel>,
298    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error<PutShareManyError>>;
299
300    /// PUT /ciphers/{id}/unarchive
301    async fn put_unarchive<'a>(
302        &self,
303        id: uuid::Uuid,
304    ) -> Result<models::CipherResponseModel, Error<PutUnarchiveError>>;
305
306    /// PUT /ciphers/unarchive
307    async fn put_unarchive_many<'a>(
308        &self,
309        cipher_bulk_unarchive_request_model: Option<models::CipherBulkUnarchiveRequestModel>,
310    ) -> Result<models::CipherResponseModelListResponseModel, Error<PutUnarchiveManyError>>;
311
312    /// GET /ciphers/{id}/attachment/{attachmentId}/renew
313    async fn renew_file_upload_url<'a>(
314        &self,
315        id: uuid::Uuid,
316        attachment_id: &'a str,
317    ) -> Result<models::AttachmentUploadDataResponseModel, Error<RenewFileUploadUrlError>>;
318}
319
320pub struct CiphersApiClient {
321    configuration: Arc<configuration::Configuration>,
322}
323
324impl CiphersApiClient {
325    pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
326        Self { configuration }
327    }
328}
329
330#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
331#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
332impl CiphersApi for CiphersApiClient {
333    async fn azure_validate_file(&self) -> Result<(), Error<AzureValidateFileError>> {
334        let local_var_configuration = &self.configuration;
335
336        let local_var_client = &local_var_configuration.client;
337
338        let local_var_uri_str = format!(
339            "{}/ciphers/attachment/validate/azure",
340            local_var_configuration.base_path
341        );
342        let mut local_var_req_builder =
343            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
344
345        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
346
347        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
348    }
349
350    async fn delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error<DeleteError>> {
351        let local_var_configuration = &self.configuration;
352
353        let local_var_client = &local_var_configuration.client;
354
355        let local_var_uri_str = format!(
356            "{}/ciphers/{id}",
357            local_var_configuration.base_path,
358            id = id
359        );
360        let mut local_var_req_builder =
361            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
362
363        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
364
365        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
366    }
367
368    async fn delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error<DeleteAdminError>> {
369        let local_var_configuration = &self.configuration;
370
371        let local_var_client = &local_var_configuration.client;
372
373        let local_var_uri_str = format!(
374            "{}/ciphers/{id}/admin",
375            local_var_configuration.base_path,
376            id = id
377        );
378        let mut local_var_req_builder =
379            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
380
381        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
382
383        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
384    }
385
386    async fn delete_attachment<'a>(
387        &self,
388        id: uuid::Uuid,
389        attachment_id: &'a str,
390    ) -> Result<models::DeleteAttachmentResponseModel, Error<DeleteAttachmentError>> {
391        let local_var_configuration = &self.configuration;
392
393        let local_var_client = &local_var_configuration.client;
394
395        let local_var_uri_str = format!(
396            "{}/ciphers/{id}/attachment/{attachmentId}",
397            local_var_configuration.base_path,
398            id = id,
399            attachmentId = crate::apis::urlencode(attachment_id)
400        );
401        let mut local_var_req_builder =
402            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
403
404        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
405
406        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
407    }
408
409    async fn delete_attachment_admin<'a>(
410        &self,
411        id: uuid::Uuid,
412        attachment_id: &'a str,
413    ) -> Result<models::DeleteAttachmentResponseModel, Error<DeleteAttachmentAdminError>> {
414        let local_var_configuration = &self.configuration;
415
416        let local_var_client = &local_var_configuration.client;
417
418        let local_var_uri_str = format!(
419            "{}/ciphers/{id}/attachment/{attachmentId}/admin",
420            local_var_configuration.base_path,
421            id = id,
422            attachmentId = crate::apis::urlencode(attachment_id)
423        );
424        let mut local_var_req_builder =
425            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
426
427        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
428
429        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
430    }
431
432    async fn delete_many<'a>(
433        &self,
434        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
435    ) -> Result<(), Error<DeleteManyError>> {
436        let local_var_configuration = &self.configuration;
437
438        let local_var_client = &local_var_configuration.client;
439
440        let local_var_uri_str = format!("{}/ciphers", local_var_configuration.base_path);
441        let mut local_var_req_builder =
442            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
443
444        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
445        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
446
447        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
448    }
449
450    async fn delete_many_admin<'a>(
451        &self,
452        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
453    ) -> Result<(), Error<DeleteManyAdminError>> {
454        let local_var_configuration = &self.configuration;
455
456        let local_var_client = &local_var_configuration.client;
457
458        let local_var_uri_str = format!("{}/ciphers/admin", local_var_configuration.base_path);
459        let mut local_var_req_builder =
460            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
461
462        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
463        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
464
465        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
466    }
467
468    async fn download_attachment<'a>(
469        &self,
470        token: Option<&'a str>,
471    ) -> Result<(), Error<DownloadAttachmentError>> {
472        let local_var_configuration = &self.configuration;
473
474        let local_var_client = &local_var_configuration.client;
475
476        let local_var_uri_str = format!(
477            "{}/ciphers/attachment/download",
478            local_var_configuration.base_path
479        );
480        let mut local_var_req_builder =
481            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
482
483        if let Some(ref param_value) = token {
484            local_var_req_builder =
485                local_var_req_builder.query(&[("token", &param_value.to_string())]);
486        }
487        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
488
489        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
490    }
491
492    async fn get<'a>(
493        &self,
494        id: uuid::Uuid,
495    ) -> Result<models::CipherResponseModel, Error<GetError>> {
496        let local_var_configuration = &self.configuration;
497
498        let local_var_client = &local_var_configuration.client;
499
500        let local_var_uri_str = format!(
501            "{}/ciphers/{id}",
502            local_var_configuration.base_path,
503            id = id
504        );
505        let mut local_var_req_builder =
506            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
507
508        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
509
510        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
511    }
512
513    async fn get_admin<'a>(
514        &self,
515        id: &'a str,
516    ) -> Result<models::CipherMiniResponseModel, Error<GetAdminError>> {
517        let local_var_configuration = &self.configuration;
518
519        let local_var_client = &local_var_configuration.client;
520
521        let local_var_uri_str = format!(
522            "{}/ciphers/{id}/admin",
523            local_var_configuration.base_path,
524            id = crate::apis::urlencode(id)
525        );
526        let mut local_var_req_builder =
527            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
528
529        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
530
531        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
532    }
533
534    async fn get_all(
535        &self,
536    ) -> Result<models::CipherDetailsResponseModelListResponseModel, Error<GetAllError>> {
537        let local_var_configuration = &self.configuration;
538
539        let local_var_client = &local_var_configuration.client;
540
541        let local_var_uri_str = format!("{}/ciphers", local_var_configuration.base_path);
542        let mut local_var_req_builder =
543            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
544
545        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
546
547        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
548    }
549
550    async fn get_assigned_organization_ciphers<'a>(
551        &self,
552        organization_id: Option<uuid::Uuid>,
553    ) -> Result<
554        models::CipherDetailsResponseModelListResponseModel,
555        Error<GetAssignedOrganizationCiphersError>,
556    > {
557        let local_var_configuration = &self.configuration;
558
559        let local_var_client = &local_var_configuration.client;
560
561        let local_var_uri_str = format!(
562            "{}/ciphers/organization-details/assigned",
563            local_var_configuration.base_path
564        );
565        let mut local_var_req_builder =
566            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
567
568        if let Some(ref param_value) = organization_id {
569            local_var_req_builder =
570                local_var_req_builder.query(&[("organizationId", &param_value.to_string())]);
571        }
572        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
573
574        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
575    }
576
577    async fn get_attachment_data<'a>(
578        &self,
579        id: uuid::Uuid,
580        attachment_id: &'a str,
581    ) -> Result<models::AttachmentResponseModel, Error<GetAttachmentDataError>> {
582        let local_var_configuration = &self.configuration;
583
584        let local_var_client = &local_var_configuration.client;
585
586        let local_var_uri_str = format!(
587            "{}/ciphers/{id}/attachment/{attachmentId}",
588            local_var_configuration.base_path,
589            id = id,
590            attachmentId = crate::apis::urlencode(attachment_id)
591        );
592        let mut local_var_req_builder =
593            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
594
595        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
596
597        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
598    }
599
600    async fn get_attachment_data_admin<'a>(
601        &self,
602        id: uuid::Uuid,
603        attachment_id: &'a str,
604    ) -> Result<models::AttachmentResponseModel, Error<GetAttachmentDataAdminError>> {
605        let local_var_configuration = &self.configuration;
606
607        let local_var_client = &local_var_configuration.client;
608
609        let local_var_uri_str = format!(
610            "{}/ciphers/{id}/attachment/{attachmentId}/admin",
611            local_var_configuration.base_path,
612            id = id,
613            attachmentId = crate::apis::urlencode(attachment_id)
614        );
615        let mut local_var_req_builder =
616            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
617
618        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
619
620        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
621    }
622
623    async fn get_details<'a>(
624        &self,
625        id: uuid::Uuid,
626    ) -> Result<models::CipherDetailsResponseModel, Error<GetDetailsError>> {
627        let local_var_configuration = &self.configuration;
628
629        let local_var_client = &local_var_configuration.client;
630
631        let local_var_uri_str = format!(
632            "{}/ciphers/{id}/details",
633            local_var_configuration.base_path,
634            id = id
635        );
636        let mut local_var_req_builder =
637            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
638
639        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
640
641        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
642    }
643
644    async fn get_organization_ciphers<'a>(
645        &self,
646        organization_id: Option<uuid::Uuid>,
647        include_member_items: Option<bool>,
648    ) -> Result<
649        models::CipherMiniDetailsResponseModelListResponseModel,
650        Error<GetOrganizationCiphersError>,
651    > {
652        let local_var_configuration = &self.configuration;
653
654        let local_var_client = &local_var_configuration.client;
655
656        let local_var_uri_str = format!(
657            "{}/ciphers/organization-details",
658            local_var_configuration.base_path
659        );
660        let mut local_var_req_builder =
661            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
662
663        if let Some(ref param_value) = organization_id {
664            local_var_req_builder =
665                local_var_req_builder.query(&[("organizationId", &param_value.to_string())]);
666        }
667        if let Some(ref param_value) = include_member_items {
668            local_var_req_builder =
669                local_var_req_builder.query(&[("includeMemberItems", &param_value.to_string())]);
670        }
671        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
672
673        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
674    }
675
676    async fn move_many<'a>(
677        &self,
678        cipher_bulk_move_request_model: Option<models::CipherBulkMoveRequestModel>,
679    ) -> Result<(), Error<MoveManyError>> {
680        let local_var_configuration = &self.configuration;
681
682        let local_var_client = &local_var_configuration.client;
683
684        let local_var_uri_str = format!("{}/ciphers/move", local_var_configuration.base_path);
685        let mut local_var_req_builder =
686            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
687
688        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
689        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_move_request_model);
690
691        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
692    }
693
694    async fn post<'a>(
695        &self,
696        cipher_request_model: Option<models::CipherRequestModel>,
697    ) -> Result<models::CipherResponseModel, Error<PostError>> {
698        let local_var_configuration = &self.configuration;
699
700        let local_var_client = &local_var_configuration.client;
701
702        let local_var_uri_str = format!("{}/ciphers", local_var_configuration.base_path);
703        let mut local_var_req_builder =
704            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
705
706        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
707        local_var_req_builder = local_var_req_builder.json(&cipher_request_model);
708
709        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
710    }
711
712    async fn post_admin<'a>(
713        &self,
714        cipher_create_request_model: Option<models::CipherCreateRequestModel>,
715    ) -> Result<models::CipherMiniResponseModel, Error<PostAdminError>> {
716        let local_var_configuration = &self.configuration;
717
718        let local_var_client = &local_var_configuration.client;
719
720        let local_var_uri_str = format!("{}/ciphers/admin", local_var_configuration.base_path);
721        let mut local_var_req_builder =
722            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
723
724        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
725        local_var_req_builder = local_var_req_builder.json(&cipher_create_request_model);
726
727        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
728    }
729
730    async fn post_attachment<'a>(
731        &self,
732        id: uuid::Uuid,
733        attachment_request_model: Option<models::AttachmentRequestModel>,
734    ) -> Result<models::AttachmentUploadDataResponseModel, Error<PostAttachmentError>> {
735        let local_var_configuration = &self.configuration;
736
737        let local_var_client = &local_var_configuration.client;
738
739        let local_var_uri_str = format!(
740            "{}/ciphers/{id}/attachment/v2",
741            local_var_configuration.base_path,
742            id = id
743        );
744        let mut local_var_req_builder =
745            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
746
747        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
748        local_var_req_builder = local_var_req_builder.json(&attachment_request_model);
749
750        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
751    }
752
753    async fn post_attachment_admin<'a>(
754        &self,
755        id: &'a str,
756    ) -> Result<models::CipherMiniResponseModel, Error<PostAttachmentAdminError>> {
757        let local_var_configuration = &self.configuration;
758
759        let local_var_client = &local_var_configuration.client;
760
761        let local_var_uri_str = format!(
762            "{}/ciphers/{id}/attachment-admin",
763            local_var_configuration.base_path,
764            id = crate::apis::urlencode(id)
765        );
766        let mut local_var_req_builder =
767            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
768
769        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
770
771        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
772    }
773
774    async fn post_attachment_share<'a>(
775        &self,
776        id: &'a str,
777        attachment_id: &'a str,
778        organization_id: Option<uuid::Uuid>,
779    ) -> Result<(), Error<PostAttachmentShareError>> {
780        let local_var_configuration = &self.configuration;
781
782        let local_var_client = &local_var_configuration.client;
783
784        let local_var_uri_str = format!(
785            "{}/ciphers/{id}/attachment/{attachmentId}/share",
786            local_var_configuration.base_path,
787            id = crate::apis::urlencode(id),
788            attachmentId = crate::apis::urlencode(attachment_id)
789        );
790        let mut local_var_req_builder =
791            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
792
793        if let Some(ref param_value) = organization_id {
794            local_var_req_builder =
795                local_var_req_builder.query(&[("organizationId", &param_value.to_string())]);
796        }
797        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
798
799        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
800    }
801
802    async fn post_bulk_collections<'a>(
803        &self,
804        cipher_bulk_update_collections_request_model: Option<
805            models::CipherBulkUpdateCollectionsRequestModel,
806        >,
807    ) -> Result<(), Error<PostBulkCollectionsError>> {
808        let local_var_configuration = &self.configuration;
809
810        let local_var_client = &local_var_configuration.client;
811
812        let local_var_uri_str = format!(
813            "{}/ciphers/bulk-collections",
814            local_var_configuration.base_path
815        );
816        let mut local_var_req_builder =
817            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
818
819        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
820        local_var_req_builder =
821            local_var_req_builder.json(&cipher_bulk_update_collections_request_model);
822
823        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
824    }
825
826    async fn post_create<'a>(
827        &self,
828        cipher_create_request_model: Option<models::CipherCreateRequestModel>,
829    ) -> Result<models::CipherResponseModel, Error<PostCreateError>> {
830        let local_var_configuration = &self.configuration;
831
832        let local_var_client = &local_var_configuration.client;
833
834        let local_var_uri_str = format!("{}/ciphers/create", local_var_configuration.base_path);
835        let mut local_var_req_builder =
836            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
837
838        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
839        local_var_req_builder = local_var_req_builder.json(&cipher_create_request_model);
840
841        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
842    }
843
844    async fn post_file_for_existing_attachment<'a>(
845        &self,
846        id: uuid::Uuid,
847        attachment_id: &'a str,
848    ) -> Result<(), Error<PostFileForExistingAttachmentError>> {
849        let local_var_configuration = &self.configuration;
850
851        let local_var_client = &local_var_configuration.client;
852
853        let local_var_uri_str = format!(
854            "{}/ciphers/{id}/attachment/{attachmentId}",
855            local_var_configuration.base_path,
856            id = id,
857            attachmentId = crate::apis::urlencode(attachment_id)
858        );
859        let mut local_var_req_builder =
860            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
861
862        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
863
864        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
865    }
866
867    async fn post_purge<'a>(
868        &self,
869        organization_id: Option<uuid::Uuid>,
870        secret_verification_request_model: Option<models::SecretVerificationRequestModel>,
871    ) -> Result<(), Error<PostPurgeError>> {
872        let local_var_configuration = &self.configuration;
873
874        let local_var_client = &local_var_configuration.client;
875
876        let local_var_uri_str = format!("{}/ciphers/purge", local_var_configuration.base_path);
877        let mut local_var_req_builder =
878            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
879
880        if let Some(ref param_value) = organization_id {
881            local_var_req_builder =
882                local_var_req_builder.query(&[("organizationId", &param_value.to_string())]);
883        }
884        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
885        local_var_req_builder = local_var_req_builder.json(&secret_verification_request_model);
886
887        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
888    }
889
890    async fn put<'a>(
891        &self,
892        id: uuid::Uuid,
893        cipher_request_model: Option<models::CipherRequestModel>,
894    ) -> Result<models::CipherResponseModel, Error<PutError>> {
895        let local_var_configuration = &self.configuration;
896
897        let local_var_client = &local_var_configuration.client;
898
899        let local_var_uri_str = format!(
900            "{}/ciphers/{id}",
901            local_var_configuration.base_path,
902            id = id
903        );
904        let mut local_var_req_builder =
905            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
906
907        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
908        local_var_req_builder = local_var_req_builder.json(&cipher_request_model);
909
910        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
911    }
912
913    async fn put_admin<'a>(
914        &self,
915        id: uuid::Uuid,
916        cipher_request_model: Option<models::CipherRequestModel>,
917    ) -> Result<models::CipherMiniResponseModel, Error<PutAdminError>> {
918        let local_var_configuration = &self.configuration;
919
920        let local_var_client = &local_var_configuration.client;
921
922        let local_var_uri_str = format!(
923            "{}/ciphers/{id}/admin",
924            local_var_configuration.base_path,
925            id = id
926        );
927        let mut local_var_req_builder =
928            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
929
930        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
931        local_var_req_builder = local_var_req_builder.json(&cipher_request_model);
932
933        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
934    }
935
936    async fn put_archive<'a>(
937        &self,
938        id: uuid::Uuid,
939    ) -> Result<models::CipherResponseModel, Error<PutArchiveError>> {
940        let local_var_configuration = &self.configuration;
941
942        let local_var_client = &local_var_configuration.client;
943
944        let local_var_uri_str = format!(
945            "{}/ciphers/{id}/archive",
946            local_var_configuration.base_path,
947            id = id
948        );
949        let mut local_var_req_builder =
950            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
951
952        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
953
954        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
955    }
956
957    async fn put_archive_many<'a>(
958        &self,
959        cipher_bulk_archive_request_model: Option<models::CipherBulkArchiveRequestModel>,
960    ) -> Result<models::CipherResponseModelListResponseModel, Error<PutArchiveManyError>> {
961        let local_var_configuration = &self.configuration;
962
963        let local_var_client = &local_var_configuration.client;
964
965        let local_var_uri_str = format!("{}/ciphers/archive", local_var_configuration.base_path);
966        let mut local_var_req_builder =
967            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
968
969        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
970        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_archive_request_model);
971
972        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
973    }
974
975    async fn put_collections<'a>(
976        &self,
977        id: uuid::Uuid,
978        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
979    ) -> Result<models::CipherDetailsResponseModel, Error<PutCollectionsError>> {
980        let local_var_configuration = &self.configuration;
981
982        let local_var_client = &local_var_configuration.client;
983
984        let local_var_uri_str = format!(
985            "{}/ciphers/{id}/collections",
986            local_var_configuration.base_path,
987            id = id
988        );
989        let mut local_var_req_builder =
990            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
991
992        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
993        local_var_req_builder = local_var_req_builder.json(&cipher_collections_request_model);
994
995        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
996    }
997
998    async fn put_collections_admin<'a>(
999        &self,
1000        id: &'a str,
1001        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
1002    ) -> Result<models::CipherMiniDetailsResponseModel, Error<PutCollectionsAdminError>> {
1003        let local_var_configuration = &self.configuration;
1004
1005        let local_var_client = &local_var_configuration.client;
1006
1007        let local_var_uri_str = format!(
1008            "{}/ciphers/{id}/collections-admin",
1009            local_var_configuration.base_path,
1010            id = crate::apis::urlencode(id)
1011        );
1012        let mut local_var_req_builder =
1013            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1014
1015        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1016        local_var_req_builder = local_var_req_builder.json(&cipher_collections_request_model);
1017
1018        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1019    }
1020
1021    async fn put_collections_v_next<'a>(
1022        &self,
1023        id: uuid::Uuid,
1024        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
1025    ) -> Result<models::OptionalCipherDetailsResponseModel, Error<PutCollections_vNextError>> {
1026        let local_var_configuration = &self.configuration;
1027
1028        let local_var_client = &local_var_configuration.client;
1029
1030        let local_var_uri_str = format!(
1031            "{}/ciphers/{id}/collections_v2",
1032            local_var_configuration.base_path,
1033            id = id
1034        );
1035        let mut local_var_req_builder =
1036            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1037
1038        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1039        local_var_req_builder = local_var_req_builder.json(&cipher_collections_request_model);
1040
1041        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1042    }
1043
1044    async fn put_delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error<PutDeleteError>> {
1045        let local_var_configuration = &self.configuration;
1046
1047        let local_var_client = &local_var_configuration.client;
1048
1049        let local_var_uri_str = format!(
1050            "{}/ciphers/{id}/delete",
1051            local_var_configuration.base_path,
1052            id = id
1053        );
1054        let mut local_var_req_builder =
1055            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1056
1057        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1058
1059        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1060    }
1061
1062    async fn put_delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error<PutDeleteAdminError>> {
1063        let local_var_configuration = &self.configuration;
1064
1065        let local_var_client = &local_var_configuration.client;
1066
1067        let local_var_uri_str = format!(
1068            "{}/ciphers/{id}/delete-admin",
1069            local_var_configuration.base_path,
1070            id = id
1071        );
1072        let mut local_var_req_builder =
1073            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1074
1075        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1076
1077        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1078    }
1079
1080    async fn put_delete_many<'a>(
1081        &self,
1082        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
1083    ) -> Result<(), Error<PutDeleteManyError>> {
1084        let local_var_configuration = &self.configuration;
1085
1086        let local_var_client = &local_var_configuration.client;
1087
1088        let local_var_uri_str = format!("{}/ciphers/delete", local_var_configuration.base_path);
1089        let mut local_var_req_builder =
1090            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1091
1092        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1093        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
1094
1095        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1096    }
1097
1098    async fn put_delete_many_admin<'a>(
1099        &self,
1100        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
1101    ) -> Result<(), Error<PutDeleteManyAdminError>> {
1102        let local_var_configuration = &self.configuration;
1103
1104        let local_var_client = &local_var_configuration.client;
1105
1106        let local_var_uri_str =
1107            format!("{}/ciphers/delete-admin", local_var_configuration.base_path);
1108        let mut local_var_req_builder =
1109            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1110
1111        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1112        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
1113
1114        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1115    }
1116
1117    async fn put_partial<'a>(
1118        &self,
1119        id: uuid::Uuid,
1120        cipher_partial_request_model: Option<models::CipherPartialRequestModel>,
1121    ) -> Result<models::CipherResponseModel, Error<PutPartialError>> {
1122        let local_var_configuration = &self.configuration;
1123
1124        let local_var_client = &local_var_configuration.client;
1125
1126        let local_var_uri_str = format!(
1127            "{}/ciphers/{id}/partial",
1128            local_var_configuration.base_path,
1129            id = id
1130        );
1131        let mut local_var_req_builder =
1132            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1133
1134        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1135        local_var_req_builder = local_var_req_builder.json(&cipher_partial_request_model);
1136
1137        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1138    }
1139
1140    async fn put_restore<'a>(
1141        &self,
1142        id: uuid::Uuid,
1143    ) -> Result<models::CipherResponseModel, Error<PutRestoreError>> {
1144        let local_var_configuration = &self.configuration;
1145
1146        let local_var_client = &local_var_configuration.client;
1147
1148        let local_var_uri_str = format!(
1149            "{}/ciphers/{id}/restore",
1150            local_var_configuration.base_path,
1151            id = id
1152        );
1153        let mut local_var_req_builder =
1154            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1155
1156        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1157
1158        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1159    }
1160
1161    async fn put_restore_admin<'a>(
1162        &self,
1163        id: uuid::Uuid,
1164    ) -> Result<models::CipherMiniResponseModel, Error<PutRestoreAdminError>> {
1165        let local_var_configuration = &self.configuration;
1166
1167        let local_var_client = &local_var_configuration.client;
1168
1169        let local_var_uri_str = format!(
1170            "{}/ciphers/{id}/restore-admin",
1171            local_var_configuration.base_path,
1172            id = id
1173        );
1174        let mut local_var_req_builder =
1175            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1176
1177        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1178
1179        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1180    }
1181
1182    async fn put_restore_many<'a>(
1183        &self,
1184        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
1185    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error<PutRestoreManyError>> {
1186        let local_var_configuration = &self.configuration;
1187
1188        let local_var_client = &local_var_configuration.client;
1189
1190        let local_var_uri_str = format!("{}/ciphers/restore", local_var_configuration.base_path);
1191        let mut local_var_req_builder =
1192            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1193
1194        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1195        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_restore_request_model);
1196
1197        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1198    }
1199
1200    async fn put_restore_many_admin<'a>(
1201        &self,
1202        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
1203    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error<PutRestoreManyAdminError>>
1204    {
1205        let local_var_configuration = &self.configuration;
1206
1207        let local_var_client = &local_var_configuration.client;
1208
1209        let local_var_uri_str = format!(
1210            "{}/ciphers/restore-admin",
1211            local_var_configuration.base_path
1212        );
1213        let mut local_var_req_builder =
1214            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1215
1216        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1217        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_restore_request_model);
1218
1219        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1220    }
1221
1222    async fn put_share<'a>(
1223        &self,
1224        id: uuid::Uuid,
1225        cipher_share_request_model: Option<models::CipherShareRequestModel>,
1226    ) -> Result<models::CipherResponseModel, Error<PutShareError>> {
1227        let local_var_configuration = &self.configuration;
1228
1229        let local_var_client = &local_var_configuration.client;
1230
1231        let local_var_uri_str = format!(
1232            "{}/ciphers/{id}/share",
1233            local_var_configuration.base_path,
1234            id = id
1235        );
1236        let mut local_var_req_builder =
1237            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1238
1239        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1240        local_var_req_builder = local_var_req_builder.json(&cipher_share_request_model);
1241
1242        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1243    }
1244
1245    async fn put_share_many<'a>(
1246        &self,
1247        cipher_bulk_share_request_model: Option<models::CipherBulkShareRequestModel>,
1248    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error<PutShareManyError>> {
1249        let local_var_configuration = &self.configuration;
1250
1251        let local_var_client = &local_var_configuration.client;
1252
1253        let local_var_uri_str = format!("{}/ciphers/share", local_var_configuration.base_path);
1254        let mut local_var_req_builder =
1255            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1256
1257        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1258        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_share_request_model);
1259
1260        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1261    }
1262
1263    async fn put_unarchive<'a>(
1264        &self,
1265        id: uuid::Uuid,
1266    ) -> Result<models::CipherResponseModel, Error<PutUnarchiveError>> {
1267        let local_var_configuration = &self.configuration;
1268
1269        let local_var_client = &local_var_configuration.client;
1270
1271        let local_var_uri_str = format!(
1272            "{}/ciphers/{id}/unarchive",
1273            local_var_configuration.base_path,
1274            id = id
1275        );
1276        let mut local_var_req_builder =
1277            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1278
1279        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1280
1281        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1282    }
1283
1284    async fn put_unarchive_many<'a>(
1285        &self,
1286        cipher_bulk_unarchive_request_model: Option<models::CipherBulkUnarchiveRequestModel>,
1287    ) -> Result<models::CipherResponseModelListResponseModel, Error<PutUnarchiveManyError>> {
1288        let local_var_configuration = &self.configuration;
1289
1290        let local_var_client = &local_var_configuration.client;
1291
1292        let local_var_uri_str = format!("{}/ciphers/unarchive", local_var_configuration.base_path);
1293        let mut local_var_req_builder =
1294            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1295
1296        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1297        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_unarchive_request_model);
1298
1299        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1300    }
1301
1302    async fn renew_file_upload_url<'a>(
1303        &self,
1304        id: uuid::Uuid,
1305        attachment_id: &'a str,
1306    ) -> Result<models::AttachmentUploadDataResponseModel, Error<RenewFileUploadUrlError>> {
1307        let local_var_configuration = &self.configuration;
1308
1309        let local_var_client = &local_var_configuration.client;
1310
1311        let local_var_uri_str = format!(
1312            "{}/ciphers/{id}/attachment/{attachmentId}/renew",
1313            local_var_configuration.base_path,
1314            id = id,
1315            attachmentId = crate::apis::urlencode(attachment_id)
1316        );
1317        let mut local_var_req_builder =
1318            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1319
1320        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1321
1322        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1323    }
1324}
1325
1326/// struct for typed errors of method [`CiphersApi::azure_validate_file`]
1327#[derive(Debug, Clone, Serialize, Deserialize)]
1328#[serde(untagged)]
1329pub enum AzureValidateFileError {
1330    UnknownValue(serde_json::Value),
1331}
1332/// struct for typed errors of method [`CiphersApi::delete`]
1333#[derive(Debug, Clone, Serialize, Deserialize)]
1334#[serde(untagged)]
1335pub enum DeleteError {
1336    UnknownValue(serde_json::Value),
1337}
1338/// struct for typed errors of method [`CiphersApi::delete_admin`]
1339#[derive(Debug, Clone, Serialize, Deserialize)]
1340#[serde(untagged)]
1341pub enum DeleteAdminError {
1342    UnknownValue(serde_json::Value),
1343}
1344/// struct for typed errors of method [`CiphersApi::delete_attachment`]
1345#[derive(Debug, Clone, Serialize, Deserialize)]
1346#[serde(untagged)]
1347pub enum DeleteAttachmentError {
1348    UnknownValue(serde_json::Value),
1349}
1350/// struct for typed errors of method [`CiphersApi::delete_attachment_admin`]
1351#[derive(Debug, Clone, Serialize, Deserialize)]
1352#[serde(untagged)]
1353pub enum DeleteAttachmentAdminError {
1354    UnknownValue(serde_json::Value),
1355}
1356/// struct for typed errors of method [`CiphersApi::delete_many`]
1357#[derive(Debug, Clone, Serialize, Deserialize)]
1358#[serde(untagged)]
1359pub enum DeleteManyError {
1360    UnknownValue(serde_json::Value),
1361}
1362/// struct for typed errors of method [`CiphersApi::delete_many_admin`]
1363#[derive(Debug, Clone, Serialize, Deserialize)]
1364#[serde(untagged)]
1365pub enum DeleteManyAdminError {
1366    UnknownValue(serde_json::Value),
1367}
1368/// struct for typed errors of method [`CiphersApi::download_attachment`]
1369#[derive(Debug, Clone, Serialize, Deserialize)]
1370#[serde(untagged)]
1371pub enum DownloadAttachmentError {
1372    UnknownValue(serde_json::Value),
1373}
1374/// struct for typed errors of method [`CiphersApi::get`]
1375#[derive(Debug, Clone, Serialize, Deserialize)]
1376#[serde(untagged)]
1377pub enum GetError {
1378    UnknownValue(serde_json::Value),
1379}
1380/// struct for typed errors of method [`CiphersApi::get_admin`]
1381#[derive(Debug, Clone, Serialize, Deserialize)]
1382#[serde(untagged)]
1383pub enum GetAdminError {
1384    UnknownValue(serde_json::Value),
1385}
1386/// struct for typed errors of method [`CiphersApi::get_all`]
1387#[derive(Debug, Clone, Serialize, Deserialize)]
1388#[serde(untagged)]
1389pub enum GetAllError {
1390    UnknownValue(serde_json::Value),
1391}
1392/// struct for typed errors of method [`CiphersApi::get_assigned_organization_ciphers`]
1393#[derive(Debug, Clone, Serialize, Deserialize)]
1394#[serde(untagged)]
1395pub enum GetAssignedOrganizationCiphersError {
1396    UnknownValue(serde_json::Value),
1397}
1398/// struct for typed errors of method [`CiphersApi::get_attachment_data`]
1399#[derive(Debug, Clone, Serialize, Deserialize)]
1400#[serde(untagged)]
1401pub enum GetAttachmentDataError {
1402    UnknownValue(serde_json::Value),
1403}
1404/// struct for typed errors of method [`CiphersApi::get_attachment_data_admin`]
1405#[derive(Debug, Clone, Serialize, Deserialize)]
1406#[serde(untagged)]
1407pub enum GetAttachmentDataAdminError {
1408    UnknownValue(serde_json::Value),
1409}
1410/// struct for typed errors of method [`CiphersApi::get_details`]
1411#[derive(Debug, Clone, Serialize, Deserialize)]
1412#[serde(untagged)]
1413pub enum GetDetailsError {
1414    UnknownValue(serde_json::Value),
1415}
1416/// struct for typed errors of method [`CiphersApi::get_organization_ciphers`]
1417#[derive(Debug, Clone, Serialize, Deserialize)]
1418#[serde(untagged)]
1419pub enum GetOrganizationCiphersError {
1420    UnknownValue(serde_json::Value),
1421}
1422/// struct for typed errors of method [`CiphersApi::move_many`]
1423#[derive(Debug, Clone, Serialize, Deserialize)]
1424#[serde(untagged)]
1425pub enum MoveManyError {
1426    UnknownValue(serde_json::Value),
1427}
1428/// struct for typed errors of method [`CiphersApi::post`]
1429#[derive(Debug, Clone, Serialize, Deserialize)]
1430#[serde(untagged)]
1431pub enum PostError {
1432    UnknownValue(serde_json::Value),
1433}
1434/// struct for typed errors of method [`CiphersApi::post_admin`]
1435#[derive(Debug, Clone, Serialize, Deserialize)]
1436#[serde(untagged)]
1437pub enum PostAdminError {
1438    UnknownValue(serde_json::Value),
1439}
1440/// struct for typed errors of method [`CiphersApi::post_attachment`]
1441#[derive(Debug, Clone, Serialize, Deserialize)]
1442#[serde(untagged)]
1443pub enum PostAttachmentError {
1444    UnknownValue(serde_json::Value),
1445}
1446/// struct for typed errors of method [`CiphersApi::post_attachment_admin`]
1447#[derive(Debug, Clone, Serialize, Deserialize)]
1448#[serde(untagged)]
1449pub enum PostAttachmentAdminError {
1450    UnknownValue(serde_json::Value),
1451}
1452/// struct for typed errors of method [`CiphersApi::post_attachment_share`]
1453#[derive(Debug, Clone, Serialize, Deserialize)]
1454#[serde(untagged)]
1455pub enum PostAttachmentShareError {
1456    UnknownValue(serde_json::Value),
1457}
1458/// struct for typed errors of method [`CiphersApi::post_bulk_collections`]
1459#[derive(Debug, Clone, Serialize, Deserialize)]
1460#[serde(untagged)]
1461pub enum PostBulkCollectionsError {
1462    UnknownValue(serde_json::Value),
1463}
1464/// struct for typed errors of method [`CiphersApi::post_create`]
1465#[derive(Debug, Clone, Serialize, Deserialize)]
1466#[serde(untagged)]
1467pub enum PostCreateError {
1468    UnknownValue(serde_json::Value),
1469}
1470/// struct for typed errors of method [`CiphersApi::post_file_for_existing_attachment`]
1471#[derive(Debug, Clone, Serialize, Deserialize)]
1472#[serde(untagged)]
1473pub enum PostFileForExistingAttachmentError {
1474    UnknownValue(serde_json::Value),
1475}
1476/// struct for typed errors of method [`CiphersApi::post_purge`]
1477#[derive(Debug, Clone, Serialize, Deserialize)]
1478#[serde(untagged)]
1479pub enum PostPurgeError {
1480    UnknownValue(serde_json::Value),
1481}
1482/// struct for typed errors of method [`CiphersApi::put`]
1483#[derive(Debug, Clone, Serialize, Deserialize)]
1484#[serde(untagged)]
1485pub enum PutError {
1486    UnknownValue(serde_json::Value),
1487}
1488/// struct for typed errors of method [`CiphersApi::put_admin`]
1489#[derive(Debug, Clone, Serialize, Deserialize)]
1490#[serde(untagged)]
1491pub enum PutAdminError {
1492    UnknownValue(serde_json::Value),
1493}
1494/// struct for typed errors of method [`CiphersApi::put_archive`]
1495#[derive(Debug, Clone, Serialize, Deserialize)]
1496#[serde(untagged)]
1497pub enum PutArchiveError {
1498    UnknownValue(serde_json::Value),
1499}
1500/// struct for typed errors of method [`CiphersApi::put_archive_many`]
1501#[derive(Debug, Clone, Serialize, Deserialize)]
1502#[serde(untagged)]
1503pub enum PutArchiveManyError {
1504    UnknownValue(serde_json::Value),
1505}
1506/// struct for typed errors of method [`CiphersApi::put_collections`]
1507#[derive(Debug, Clone, Serialize, Deserialize)]
1508#[serde(untagged)]
1509pub enum PutCollectionsError {
1510    UnknownValue(serde_json::Value),
1511}
1512/// struct for typed errors of method [`CiphersApi::put_collections_admin`]
1513#[derive(Debug, Clone, Serialize, Deserialize)]
1514#[serde(untagged)]
1515pub enum PutCollectionsAdminError {
1516    UnknownValue(serde_json::Value),
1517}
1518/// struct for typed errors of method [`CiphersApi::put_collections_v_next`]
1519#[derive(Debug, Clone, Serialize, Deserialize)]
1520#[serde(untagged)]
1521pub enum PutCollections_vNextError {
1522    UnknownValue(serde_json::Value),
1523}
1524/// struct for typed errors of method [`CiphersApi::put_delete`]
1525#[derive(Debug, Clone, Serialize, Deserialize)]
1526#[serde(untagged)]
1527pub enum PutDeleteError {
1528    UnknownValue(serde_json::Value),
1529}
1530/// struct for typed errors of method [`CiphersApi::put_delete_admin`]
1531#[derive(Debug, Clone, Serialize, Deserialize)]
1532#[serde(untagged)]
1533pub enum PutDeleteAdminError {
1534    UnknownValue(serde_json::Value),
1535}
1536/// struct for typed errors of method [`CiphersApi::put_delete_many`]
1537#[derive(Debug, Clone, Serialize, Deserialize)]
1538#[serde(untagged)]
1539pub enum PutDeleteManyError {
1540    UnknownValue(serde_json::Value),
1541}
1542/// struct for typed errors of method [`CiphersApi::put_delete_many_admin`]
1543#[derive(Debug, Clone, Serialize, Deserialize)]
1544#[serde(untagged)]
1545pub enum PutDeleteManyAdminError {
1546    UnknownValue(serde_json::Value),
1547}
1548/// struct for typed errors of method [`CiphersApi::put_partial`]
1549#[derive(Debug, Clone, Serialize, Deserialize)]
1550#[serde(untagged)]
1551pub enum PutPartialError {
1552    UnknownValue(serde_json::Value),
1553}
1554/// struct for typed errors of method [`CiphersApi::put_restore`]
1555#[derive(Debug, Clone, Serialize, Deserialize)]
1556#[serde(untagged)]
1557pub enum PutRestoreError {
1558    UnknownValue(serde_json::Value),
1559}
1560/// struct for typed errors of method [`CiphersApi::put_restore_admin`]
1561#[derive(Debug, Clone, Serialize, Deserialize)]
1562#[serde(untagged)]
1563pub enum PutRestoreAdminError {
1564    UnknownValue(serde_json::Value),
1565}
1566/// struct for typed errors of method [`CiphersApi::put_restore_many`]
1567#[derive(Debug, Clone, Serialize, Deserialize)]
1568#[serde(untagged)]
1569pub enum PutRestoreManyError {
1570    UnknownValue(serde_json::Value),
1571}
1572/// struct for typed errors of method [`CiphersApi::put_restore_many_admin`]
1573#[derive(Debug, Clone, Serialize, Deserialize)]
1574#[serde(untagged)]
1575pub enum PutRestoreManyAdminError {
1576    UnknownValue(serde_json::Value),
1577}
1578/// struct for typed errors of method [`CiphersApi::put_share`]
1579#[derive(Debug, Clone, Serialize, Deserialize)]
1580#[serde(untagged)]
1581pub enum PutShareError {
1582    UnknownValue(serde_json::Value),
1583}
1584/// struct for typed errors of method [`CiphersApi::put_share_many`]
1585#[derive(Debug, Clone, Serialize, Deserialize)]
1586#[serde(untagged)]
1587pub enum PutShareManyError {
1588    UnknownValue(serde_json::Value),
1589}
1590/// struct for typed errors of method [`CiphersApi::put_unarchive`]
1591#[derive(Debug, Clone, Serialize, Deserialize)]
1592#[serde(untagged)]
1593pub enum PutUnarchiveError {
1594    UnknownValue(serde_json::Value),
1595}
1596/// struct for typed errors of method [`CiphersApi::put_unarchive_many`]
1597#[derive(Debug, Clone, Serialize, Deserialize)]
1598#[serde(untagged)]
1599pub enum PutUnarchiveManyError {
1600    UnknownValue(serde_json::Value),
1601}
1602/// struct for typed errors of method [`CiphersApi::renew_file_upload_url`]
1603#[derive(Debug, Clone, Serialize, Deserialize)]
1604#[serde(untagged)]
1605pub enum RenewFileUploadUrlError {
1606    UnknownValue(serde_json::Value),
1607}