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>;
31
32    /// DELETE /ciphers/{id}
33    async fn delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error>;
34
35    /// DELETE /ciphers/{id}/admin
36    async fn delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error>;
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>;
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>;
51
52    /// DELETE /ciphers
53    async fn delete_many<'a>(
54        &self,
55        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
56    ) -> Result<(), Error>;
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>;
63
64    /// GET /ciphers/attachment/download
65    async fn download_attachment<'a>(&self, token: Option<&'a str>) -> Result<(), Error>;
66
67    /// GET /ciphers/{id}
68    async fn get<'a>(&self, id: uuid::Uuid) -> Result<models::CipherResponseModel, Error>;
69
70    /// GET /ciphers/{id}/admin
71    async fn get_admin<'a>(&self, id: &'a str) -> Result<models::CipherMiniResponseModel, Error>;
72
73    /// GET /ciphers
74    async fn get_all(&self) -> Result<models::CipherDetailsResponseModelListResponseModel, Error>;
75
76    /// GET /ciphers/organization-details/assigned
77    async fn get_assigned_organization_ciphers<'a>(
78        &self,
79        organization_id: Option<uuid::Uuid>,
80    ) -> Result<models::CipherDetailsResponseModelListResponseModel, Error>;
81
82    /// GET /ciphers/{id}/attachment/{attachmentId}
83    async fn get_attachment_data<'a>(
84        &self,
85        id: uuid::Uuid,
86        attachment_id: &'a str,
87    ) -> Result<models::AttachmentResponseModel, Error>;
88
89    /// GET /ciphers/{id}/attachment/{attachmentId}/admin
90    async fn get_attachment_data_admin<'a>(
91        &self,
92        id: uuid::Uuid,
93        attachment_id: &'a str,
94    ) -> Result<models::AttachmentResponseModel, Error>;
95
96    /// GET /ciphers/{id}/details
97    async fn get_details<'a>(
98        &self,
99        id: uuid::Uuid,
100    ) -> Result<models::CipherDetailsResponseModel, Error>;
101
102    /// GET /ciphers/organization-details
103    async fn get_organization_ciphers<'a>(
104        &self,
105        organization_id: Option<uuid::Uuid>,
106        include_member_items: Option<bool>,
107    ) -> Result<models::CipherMiniDetailsResponseModelListResponseModel, Error>;
108
109    /// GET /ciphers/organization-details/logins
110    async fn get_organization_login_ciphers<'a>(
111        &self,
112        organization_id: Option<uuid::Uuid>,
113    ) -> Result<models::CipherMiniDetailsResponseModelListResponseModel, Error>;
114
115    /// PUT /ciphers/move
116    async fn move_many<'a>(
117        &self,
118        cipher_bulk_move_request_model: Option<models::CipherBulkMoveRequestModel>,
119    ) -> Result<(), Error>;
120
121    /// POST /ciphers
122    async fn post<'a>(
123        &self,
124        cipher_request_model: Option<models::CipherRequestModel>,
125    ) -> Result<models::CipherResponseModel, Error>;
126
127    /// POST /ciphers/admin
128    async fn post_admin<'a>(
129        &self,
130        cipher_create_request_model: Option<models::CipherCreateRequestModel>,
131    ) -> Result<models::CipherMiniResponseModel, Error>;
132
133    /// POST /ciphers/{id}/attachment/v2
134    async fn post_attachment<'a>(
135        &self,
136        id: uuid::Uuid,
137        attachment_request_model: Option<models::AttachmentRequestModel>,
138    ) -> Result<models::AttachmentUploadDataResponseModel, Error>;
139
140    /// POST /ciphers/{id}/attachment-admin
141    async fn post_attachment_admin<'a>(
142        &self,
143        id: &'a str,
144    ) -> Result<models::CipherMiniResponseModel, Error>;
145
146    /// POST /ciphers/{id}/attachment/{attachmentId}/share
147    async fn post_attachment_share<'a>(
148        &self,
149        id: &'a str,
150        attachment_id: &'a str,
151        organization_id: Option<uuid::Uuid>,
152    ) -> Result<(), Error>;
153
154    /// POST /ciphers/bulk-collections
155    async fn post_bulk_collections<'a>(
156        &self,
157        cipher_bulk_update_collections_request_model: Option<
158            models::CipherBulkUpdateCollectionsRequestModel,
159        >,
160    ) -> Result<(), Error>;
161
162    /// POST /ciphers/create
163    async fn post_create<'a>(
164        &self,
165        cipher_create_request_model: Option<models::CipherCreateRequestModel>,
166    ) -> Result<models::CipherResponseModel, Error>;
167
168    /// POST /ciphers/{id}/attachment/{attachmentId}
169    async fn post_file_for_existing_attachment<'a>(
170        &self,
171        id: uuid::Uuid,
172        attachment_id: &'a str,
173    ) -> Result<(), Error>;
174
175    /// POST /ciphers/purge
176    async fn post_purge<'a>(
177        &self,
178        organization_id: Option<uuid::Uuid>,
179        secret_verification_request_model: Option<models::SecretVerificationRequestModel>,
180    ) -> Result<(), Error>;
181
182    /// PUT /ciphers/{id}
183    async fn put<'a>(
184        &self,
185        id: uuid::Uuid,
186        cipher_request_model: Option<models::CipherRequestModel>,
187    ) -> Result<models::CipherResponseModel, Error>;
188
189    /// PUT /ciphers/{id}/admin
190    async fn put_admin<'a>(
191        &self,
192        id: uuid::Uuid,
193        cipher_request_model: Option<models::CipherRequestModel>,
194    ) -> Result<models::CipherMiniResponseModel, Error>;
195
196    /// PUT /ciphers/{id}/archive
197    async fn put_archive<'a>(&self, id: uuid::Uuid) -> Result<models::CipherResponseModel, Error>;
198
199    /// PUT /ciphers/archive
200    async fn put_archive_many<'a>(
201        &self,
202        cipher_bulk_archive_request_model: Option<models::CipherBulkArchiveRequestModel>,
203    ) -> Result<models::CipherResponseModelListResponseModel, Error>;
204
205    /// PUT /ciphers/{id}/collections
206    async fn put_collections<'a>(
207        &self,
208        id: uuid::Uuid,
209        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
210    ) -> Result<models::CipherDetailsResponseModel, Error>;
211
212    /// PUT /ciphers/{id}/collections-admin
213    async fn put_collections_admin<'a>(
214        &self,
215        id: &'a str,
216        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
217    ) -> Result<models::CipherMiniDetailsResponseModel, Error>;
218
219    /// PUT /ciphers/{id}/collections_v2
220    async fn put_collections_v_next<'a>(
221        &self,
222        id: uuid::Uuid,
223        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
224    ) -> Result<models::OptionalCipherDetailsResponseModel, Error>;
225
226    /// PUT /ciphers/{id}/delete
227    async fn put_delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error>;
228
229    /// PUT /ciphers/{id}/delete-admin
230    async fn put_delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error>;
231
232    /// PUT /ciphers/delete
233    async fn put_delete_many<'a>(
234        &self,
235        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
236    ) -> Result<(), Error>;
237
238    /// PUT /ciphers/delete-admin
239    async fn put_delete_many_admin<'a>(
240        &self,
241        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
242    ) -> Result<(), Error>;
243
244    /// PUT /ciphers/{id}/partial
245    async fn put_partial<'a>(
246        &self,
247        id: uuid::Uuid,
248        cipher_partial_request_model: Option<models::CipherPartialRequestModel>,
249    ) -> Result<models::CipherResponseModel, Error>;
250
251    /// PUT /ciphers/{id}/restore
252    async fn put_restore<'a>(&self, id: uuid::Uuid) -> Result<models::CipherResponseModel, Error>;
253
254    /// PUT /ciphers/{id}/restore-admin
255    async fn put_restore_admin<'a>(
256        &self,
257        id: uuid::Uuid,
258    ) -> Result<models::CipherMiniResponseModel, Error>;
259
260    /// PUT /ciphers/restore
261    async fn put_restore_many<'a>(
262        &self,
263        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
264    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error>;
265
266    /// PUT /ciphers/restore-admin
267    async fn put_restore_many_admin<'a>(
268        &self,
269        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
270    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error>;
271
272    /// PUT /ciphers/{id}/share
273    async fn put_share<'a>(
274        &self,
275        id: uuid::Uuid,
276        cipher_share_request_model: Option<models::CipherShareRequestModel>,
277    ) -> Result<models::CipherResponseModel, Error>;
278
279    /// PUT /ciphers/share
280    async fn put_share_many<'a>(
281        &self,
282        cipher_bulk_share_request_model: Option<models::CipherBulkShareRequestModel>,
283    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error>;
284
285    /// PUT /ciphers/{id}/unarchive
286    async fn put_unarchive<'a>(&self, id: uuid::Uuid)
287    -> Result<models::CipherResponseModel, Error>;
288
289    /// PUT /ciphers/unarchive
290    async fn put_unarchive_many<'a>(
291        &self,
292        cipher_bulk_unarchive_request_model: Option<models::CipherBulkUnarchiveRequestModel>,
293    ) -> Result<models::CipherResponseModelListResponseModel, Error>;
294
295    /// GET /ciphers/{id}/attachment/{attachmentId}/renew
296    async fn renew_file_upload_url<'a>(
297        &self,
298        id: uuid::Uuid,
299        attachment_id: &'a str,
300    ) -> Result<models::AttachmentUploadDataResponseModel, Error>;
301}
302
303pub struct CiphersApiClient {
304    configuration: Arc<configuration::Configuration>,
305}
306
307impl CiphersApiClient {
308    pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
309        Self { configuration }
310    }
311}
312
313#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
314#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
315impl CiphersApi for CiphersApiClient {
316    async fn azure_validate_file(&self) -> Result<(), Error> {
317        let local_var_configuration = &self.configuration;
318
319        let local_var_client = &local_var_configuration.client;
320
321        let local_var_uri_str = format!(
322            "{}/ciphers/attachment/validate/azure",
323            local_var_configuration.base_path
324        );
325        let mut local_var_req_builder =
326            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
327
328        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
329
330        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
331    }
332
333    async fn delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error> {
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/{id}",
340            local_var_configuration.base_path,
341            id = id
342        );
343        let mut local_var_req_builder =
344            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
345
346        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
347
348        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
349    }
350
351    async fn delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error> {
352        let local_var_configuration = &self.configuration;
353
354        let local_var_client = &local_var_configuration.client;
355
356        let local_var_uri_str = format!(
357            "{}/ciphers/{id}/admin",
358            local_var_configuration.base_path,
359            id = id
360        );
361        let mut local_var_req_builder =
362            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
363
364        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
365
366        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
367    }
368
369    async fn delete_attachment<'a>(
370        &self,
371        id: uuid::Uuid,
372        attachment_id: &'a str,
373    ) -> Result<models::DeleteAttachmentResponseModel, Error> {
374        let local_var_configuration = &self.configuration;
375
376        let local_var_client = &local_var_configuration.client;
377
378        let local_var_uri_str = format!(
379            "{}/ciphers/{id}/attachment/{attachmentId}",
380            local_var_configuration.base_path,
381            id = id,
382            attachmentId = crate::apis::urlencode(attachment_id)
383        );
384        let mut local_var_req_builder =
385            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
386
387        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
388
389        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
390    }
391
392    async fn delete_attachment_admin<'a>(
393        &self,
394        id: uuid::Uuid,
395        attachment_id: &'a str,
396    ) -> Result<models::DeleteAttachmentResponseModel, Error> {
397        let local_var_configuration = &self.configuration;
398
399        let local_var_client = &local_var_configuration.client;
400
401        let local_var_uri_str = format!(
402            "{}/ciphers/{id}/attachment/{attachmentId}/admin",
403            local_var_configuration.base_path,
404            id = id,
405            attachmentId = crate::apis::urlencode(attachment_id)
406        );
407        let mut local_var_req_builder =
408            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
409
410        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
411
412        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
413    }
414
415    async fn delete_many<'a>(
416        &self,
417        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
418    ) -> Result<(), Error> {
419        let local_var_configuration = &self.configuration;
420
421        let local_var_client = &local_var_configuration.client;
422
423        let local_var_uri_str = format!("{}/ciphers", local_var_configuration.base_path);
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        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
429
430        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
431    }
432
433    async fn delete_many_admin<'a>(
434        &self,
435        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
436    ) -> Result<(), Error> {
437        let local_var_configuration = &self.configuration;
438
439        let local_var_client = &local_var_configuration.client;
440
441        let local_var_uri_str = format!("{}/ciphers/admin", local_var_configuration.base_path);
442        let mut local_var_req_builder =
443            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
444
445        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
446        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
447
448        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
449    }
450
451    async fn download_attachment<'a>(&self, token: Option<&'a str>) -> Result<(), Error> {
452        let local_var_configuration = &self.configuration;
453
454        let local_var_client = &local_var_configuration.client;
455
456        let local_var_uri_str = format!(
457            "{}/ciphers/attachment/download",
458            local_var_configuration.base_path
459        );
460        let mut local_var_req_builder =
461            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
462
463        if let Some(ref param_value) = token {
464            local_var_req_builder =
465                local_var_req_builder.query(&[("token", &param_value.to_string())]);
466        }
467        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
468
469        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
470    }
471
472    async fn get<'a>(&self, id: uuid::Uuid) -> Result<models::CipherResponseModel, Error> {
473        let local_var_configuration = &self.configuration;
474
475        let local_var_client = &local_var_configuration.client;
476
477        let local_var_uri_str = format!(
478            "{}/ciphers/{id}",
479            local_var_configuration.base_path,
480            id = id
481        );
482        let mut local_var_req_builder =
483            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
484
485        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
486
487        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
488    }
489
490    async fn get_admin<'a>(&self, id: &'a str) -> Result<models::CipherMiniResponseModel, Error> {
491        let local_var_configuration = &self.configuration;
492
493        let local_var_client = &local_var_configuration.client;
494
495        let local_var_uri_str = format!(
496            "{}/ciphers/{id}/admin",
497            local_var_configuration.base_path,
498            id = crate::apis::urlencode(id)
499        );
500        let mut local_var_req_builder =
501            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
502
503        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
504
505        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
506    }
507
508    async fn get_all(&self) -> Result<models::CipherDetailsResponseModelListResponseModel, Error> {
509        let local_var_configuration = &self.configuration;
510
511        let local_var_client = &local_var_configuration.client;
512
513        let local_var_uri_str = format!("{}/ciphers", local_var_configuration.base_path);
514        let mut local_var_req_builder =
515            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
516
517        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
518
519        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
520    }
521
522    async fn get_assigned_organization_ciphers<'a>(
523        &self,
524        organization_id: Option<uuid::Uuid>,
525    ) -> Result<models::CipherDetailsResponseModelListResponseModel, Error> {
526        let local_var_configuration = &self.configuration;
527
528        let local_var_client = &local_var_configuration.client;
529
530        let local_var_uri_str = format!(
531            "{}/ciphers/organization-details/assigned",
532            local_var_configuration.base_path
533        );
534        let mut local_var_req_builder =
535            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
536
537        if let Some(ref param_value) = organization_id {
538            local_var_req_builder =
539                local_var_req_builder.query(&[("organizationId", &param_value.to_string())]);
540        }
541        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
542
543        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
544    }
545
546    async fn get_attachment_data<'a>(
547        &self,
548        id: uuid::Uuid,
549        attachment_id: &'a str,
550    ) -> Result<models::AttachmentResponseModel, Error> {
551        let local_var_configuration = &self.configuration;
552
553        let local_var_client = &local_var_configuration.client;
554
555        let local_var_uri_str = format!(
556            "{}/ciphers/{id}/attachment/{attachmentId}",
557            local_var_configuration.base_path,
558            id = id,
559            attachmentId = crate::apis::urlencode(attachment_id)
560        );
561        let mut local_var_req_builder =
562            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
563
564        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
565
566        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
567    }
568
569    async fn get_attachment_data_admin<'a>(
570        &self,
571        id: uuid::Uuid,
572        attachment_id: &'a str,
573    ) -> Result<models::AttachmentResponseModel, Error> {
574        let local_var_configuration = &self.configuration;
575
576        let local_var_client = &local_var_configuration.client;
577
578        let local_var_uri_str = format!(
579            "{}/ciphers/{id}/attachment/{attachmentId}/admin",
580            local_var_configuration.base_path,
581            id = id,
582            attachmentId = crate::apis::urlencode(attachment_id)
583        );
584        let mut local_var_req_builder =
585            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
586
587        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
588
589        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
590    }
591
592    async fn get_details<'a>(
593        &self,
594        id: uuid::Uuid,
595    ) -> Result<models::CipherDetailsResponseModel, Error> {
596        let local_var_configuration = &self.configuration;
597
598        let local_var_client = &local_var_configuration.client;
599
600        let local_var_uri_str = format!(
601            "{}/ciphers/{id}/details",
602            local_var_configuration.base_path,
603            id = id
604        );
605        let mut local_var_req_builder =
606            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
607
608        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
609
610        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
611    }
612
613    async fn get_organization_ciphers<'a>(
614        &self,
615        organization_id: Option<uuid::Uuid>,
616        include_member_items: Option<bool>,
617    ) -> Result<models::CipherMiniDetailsResponseModelListResponseModel, Error> {
618        let local_var_configuration = &self.configuration;
619
620        let local_var_client = &local_var_configuration.client;
621
622        let local_var_uri_str = format!(
623            "{}/ciphers/organization-details",
624            local_var_configuration.base_path
625        );
626        let mut local_var_req_builder =
627            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
628
629        if let Some(ref param_value) = organization_id {
630            local_var_req_builder =
631                local_var_req_builder.query(&[("organizationId", &param_value.to_string())]);
632        }
633        if let Some(ref param_value) = include_member_items {
634            local_var_req_builder =
635                local_var_req_builder.query(&[("includeMemberItems", &param_value.to_string())]);
636        }
637        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
638
639        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
640    }
641
642    async fn get_organization_login_ciphers<'a>(
643        &self,
644        organization_id: Option<uuid::Uuid>,
645    ) -> Result<models::CipherMiniDetailsResponseModelListResponseModel, Error> {
646        let local_var_configuration = &self.configuration;
647
648        let local_var_client = &local_var_configuration.client;
649
650        let local_var_uri_str = format!(
651            "{}/ciphers/organization-details/logins",
652            local_var_configuration.base_path
653        );
654        let mut local_var_req_builder =
655            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
656
657        if let Some(ref param_value) = organization_id {
658            local_var_req_builder =
659                local_var_req_builder.query(&[("organizationId", &param_value.to_string())]);
660        }
661        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
662
663        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
664    }
665
666    async fn move_many<'a>(
667        &self,
668        cipher_bulk_move_request_model: Option<models::CipherBulkMoveRequestModel>,
669    ) -> Result<(), Error> {
670        let local_var_configuration = &self.configuration;
671
672        let local_var_client = &local_var_configuration.client;
673
674        let local_var_uri_str = format!("{}/ciphers/move", local_var_configuration.base_path);
675        let mut local_var_req_builder =
676            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
677
678        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
679        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_move_request_model);
680
681        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
682    }
683
684    async fn post<'a>(
685        &self,
686        cipher_request_model: Option<models::CipherRequestModel>,
687    ) -> Result<models::CipherResponseModel, Error> {
688        let local_var_configuration = &self.configuration;
689
690        let local_var_client = &local_var_configuration.client;
691
692        let local_var_uri_str = format!("{}/ciphers", local_var_configuration.base_path);
693        let mut local_var_req_builder =
694            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
695
696        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
697        local_var_req_builder = local_var_req_builder.json(&cipher_request_model);
698
699        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
700    }
701
702    async fn post_admin<'a>(
703        &self,
704        cipher_create_request_model: Option<models::CipherCreateRequestModel>,
705    ) -> Result<models::CipherMiniResponseModel, Error> {
706        let local_var_configuration = &self.configuration;
707
708        let local_var_client = &local_var_configuration.client;
709
710        let local_var_uri_str = format!("{}/ciphers/admin", local_var_configuration.base_path);
711        let mut local_var_req_builder =
712            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
713
714        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
715        local_var_req_builder = local_var_req_builder.json(&cipher_create_request_model);
716
717        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
718    }
719
720    async fn post_attachment<'a>(
721        &self,
722        id: uuid::Uuid,
723        attachment_request_model: Option<models::AttachmentRequestModel>,
724    ) -> Result<models::AttachmentUploadDataResponseModel, Error> {
725        let local_var_configuration = &self.configuration;
726
727        let local_var_client = &local_var_configuration.client;
728
729        let local_var_uri_str = format!(
730            "{}/ciphers/{id}/attachment/v2",
731            local_var_configuration.base_path,
732            id = id
733        );
734        let mut local_var_req_builder =
735            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
736
737        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
738        local_var_req_builder = local_var_req_builder.json(&attachment_request_model);
739
740        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
741    }
742
743    async fn post_attachment_admin<'a>(
744        &self,
745        id: &'a str,
746    ) -> Result<models::CipherMiniResponseModel, Error> {
747        let local_var_configuration = &self.configuration;
748
749        let local_var_client = &local_var_configuration.client;
750
751        let local_var_uri_str = format!(
752            "{}/ciphers/{id}/attachment-admin",
753            local_var_configuration.base_path,
754            id = crate::apis::urlencode(id)
755        );
756        let mut local_var_req_builder =
757            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
758
759        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
760
761        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
762    }
763
764    async fn post_attachment_share<'a>(
765        &self,
766        id: &'a str,
767        attachment_id: &'a str,
768        organization_id: Option<uuid::Uuid>,
769    ) -> Result<(), Error> {
770        let local_var_configuration = &self.configuration;
771
772        let local_var_client = &local_var_configuration.client;
773
774        let local_var_uri_str = format!(
775            "{}/ciphers/{id}/attachment/{attachmentId}/share",
776            local_var_configuration.base_path,
777            id = crate::apis::urlencode(id),
778            attachmentId = crate::apis::urlencode(attachment_id)
779        );
780        let mut local_var_req_builder =
781            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
782
783        if let Some(ref param_value) = organization_id {
784            local_var_req_builder =
785                local_var_req_builder.query(&[("organizationId", &param_value.to_string())]);
786        }
787        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
788
789        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
790    }
791
792    async fn post_bulk_collections<'a>(
793        &self,
794        cipher_bulk_update_collections_request_model: Option<
795            models::CipherBulkUpdateCollectionsRequestModel,
796        >,
797    ) -> Result<(), Error> {
798        let local_var_configuration = &self.configuration;
799
800        let local_var_client = &local_var_configuration.client;
801
802        let local_var_uri_str = format!(
803            "{}/ciphers/bulk-collections",
804            local_var_configuration.base_path
805        );
806        let mut local_var_req_builder =
807            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
808
809        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
810        local_var_req_builder =
811            local_var_req_builder.json(&cipher_bulk_update_collections_request_model);
812
813        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
814    }
815
816    async fn post_create<'a>(
817        &self,
818        cipher_create_request_model: Option<models::CipherCreateRequestModel>,
819    ) -> Result<models::CipherResponseModel, Error> {
820        let local_var_configuration = &self.configuration;
821
822        let local_var_client = &local_var_configuration.client;
823
824        let local_var_uri_str = format!("{}/ciphers/create", local_var_configuration.base_path);
825        let mut local_var_req_builder =
826            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
827
828        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
829        local_var_req_builder = local_var_req_builder.json(&cipher_create_request_model);
830
831        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
832    }
833
834    async fn post_file_for_existing_attachment<'a>(
835        &self,
836        id: uuid::Uuid,
837        attachment_id: &'a str,
838    ) -> Result<(), Error> {
839        let local_var_configuration = &self.configuration;
840
841        let local_var_client = &local_var_configuration.client;
842
843        let local_var_uri_str = format!(
844            "{}/ciphers/{id}/attachment/{attachmentId}",
845            local_var_configuration.base_path,
846            id = id,
847            attachmentId = crate::apis::urlencode(attachment_id)
848        );
849        let mut local_var_req_builder =
850            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
851
852        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
853
854        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
855    }
856
857    async fn post_purge<'a>(
858        &self,
859        organization_id: Option<uuid::Uuid>,
860        secret_verification_request_model: Option<models::SecretVerificationRequestModel>,
861    ) -> Result<(), Error> {
862        let local_var_configuration = &self.configuration;
863
864        let local_var_client = &local_var_configuration.client;
865
866        let local_var_uri_str = format!("{}/ciphers/purge", local_var_configuration.base_path);
867        let mut local_var_req_builder =
868            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
869
870        if let Some(ref param_value) = organization_id {
871            local_var_req_builder =
872                local_var_req_builder.query(&[("organizationId", &param_value.to_string())]);
873        }
874        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
875        local_var_req_builder = local_var_req_builder.json(&secret_verification_request_model);
876
877        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
878    }
879
880    async fn put<'a>(
881        &self,
882        id: uuid::Uuid,
883        cipher_request_model: Option<models::CipherRequestModel>,
884    ) -> Result<models::CipherResponseModel, Error> {
885        let local_var_configuration = &self.configuration;
886
887        let local_var_client = &local_var_configuration.client;
888
889        let local_var_uri_str = format!(
890            "{}/ciphers/{id}",
891            local_var_configuration.base_path,
892            id = id
893        );
894        let mut local_var_req_builder =
895            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
896
897        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
898        local_var_req_builder = local_var_req_builder.json(&cipher_request_model);
899
900        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
901    }
902
903    async fn put_admin<'a>(
904        &self,
905        id: uuid::Uuid,
906        cipher_request_model: Option<models::CipherRequestModel>,
907    ) -> Result<models::CipherMiniResponseModel, Error> {
908        let local_var_configuration = &self.configuration;
909
910        let local_var_client = &local_var_configuration.client;
911
912        let local_var_uri_str = format!(
913            "{}/ciphers/{id}/admin",
914            local_var_configuration.base_path,
915            id = id
916        );
917        let mut local_var_req_builder =
918            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
919
920        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
921        local_var_req_builder = local_var_req_builder.json(&cipher_request_model);
922
923        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
924    }
925
926    async fn put_archive<'a>(&self, id: uuid::Uuid) -> Result<models::CipherResponseModel, Error> {
927        let local_var_configuration = &self.configuration;
928
929        let local_var_client = &local_var_configuration.client;
930
931        let local_var_uri_str = format!(
932            "{}/ciphers/{id}/archive",
933            local_var_configuration.base_path,
934            id = id
935        );
936        let mut local_var_req_builder =
937            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
938
939        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
940
941        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
942    }
943
944    async fn put_archive_many<'a>(
945        &self,
946        cipher_bulk_archive_request_model: Option<models::CipherBulkArchiveRequestModel>,
947    ) -> Result<models::CipherResponseModelListResponseModel, Error> {
948        let local_var_configuration = &self.configuration;
949
950        let local_var_client = &local_var_configuration.client;
951
952        let local_var_uri_str = format!("{}/ciphers/archive", local_var_configuration.base_path);
953        let mut local_var_req_builder =
954            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
955
956        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
957        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_archive_request_model);
958
959        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
960    }
961
962    async fn put_collections<'a>(
963        &self,
964        id: uuid::Uuid,
965        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
966    ) -> Result<models::CipherDetailsResponseModel, Error> {
967        let local_var_configuration = &self.configuration;
968
969        let local_var_client = &local_var_configuration.client;
970
971        let local_var_uri_str = format!(
972            "{}/ciphers/{id}/collections",
973            local_var_configuration.base_path,
974            id = id
975        );
976        let mut local_var_req_builder =
977            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
978
979        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
980        local_var_req_builder = local_var_req_builder.json(&cipher_collections_request_model);
981
982        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
983    }
984
985    async fn put_collections_admin<'a>(
986        &self,
987        id: &'a str,
988        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
989    ) -> Result<models::CipherMiniDetailsResponseModel, Error> {
990        let local_var_configuration = &self.configuration;
991
992        let local_var_client = &local_var_configuration.client;
993
994        let local_var_uri_str = format!(
995            "{}/ciphers/{id}/collections-admin",
996            local_var_configuration.base_path,
997            id = crate::apis::urlencode(id)
998        );
999        let mut local_var_req_builder =
1000            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1001
1002        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1003        local_var_req_builder = local_var_req_builder.json(&cipher_collections_request_model);
1004
1005        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1006    }
1007
1008    async fn put_collections_v_next<'a>(
1009        &self,
1010        id: uuid::Uuid,
1011        cipher_collections_request_model: Option<models::CipherCollectionsRequestModel>,
1012    ) -> Result<models::OptionalCipherDetailsResponseModel, Error> {
1013        let local_var_configuration = &self.configuration;
1014
1015        let local_var_client = &local_var_configuration.client;
1016
1017        let local_var_uri_str = format!(
1018            "{}/ciphers/{id}/collections_v2",
1019            local_var_configuration.base_path,
1020            id = id
1021        );
1022        let mut local_var_req_builder =
1023            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1024
1025        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1026        local_var_req_builder = local_var_req_builder.json(&cipher_collections_request_model);
1027
1028        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1029    }
1030
1031    async fn put_delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error> {
1032        let local_var_configuration = &self.configuration;
1033
1034        let local_var_client = &local_var_configuration.client;
1035
1036        let local_var_uri_str = format!(
1037            "{}/ciphers/{id}/delete",
1038            local_var_configuration.base_path,
1039            id = id
1040        );
1041        let mut local_var_req_builder =
1042            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1043
1044        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1045
1046        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1047    }
1048
1049    async fn put_delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error> {
1050        let local_var_configuration = &self.configuration;
1051
1052        let local_var_client = &local_var_configuration.client;
1053
1054        let local_var_uri_str = format!(
1055            "{}/ciphers/{id}/delete-admin",
1056            local_var_configuration.base_path,
1057            id = id
1058        );
1059        let mut local_var_req_builder =
1060            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1061
1062        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1063
1064        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1065    }
1066
1067    async fn put_delete_many<'a>(
1068        &self,
1069        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
1070    ) -> Result<(), Error> {
1071        let local_var_configuration = &self.configuration;
1072
1073        let local_var_client = &local_var_configuration.client;
1074
1075        let local_var_uri_str = format!("{}/ciphers/delete", local_var_configuration.base_path);
1076        let mut local_var_req_builder =
1077            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1078
1079        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1080        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
1081
1082        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1083    }
1084
1085    async fn put_delete_many_admin<'a>(
1086        &self,
1087        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
1088    ) -> Result<(), Error> {
1089        let local_var_configuration = &self.configuration;
1090
1091        let local_var_client = &local_var_configuration.client;
1092
1093        let local_var_uri_str =
1094            format!("{}/ciphers/delete-admin", local_var_configuration.base_path);
1095        let mut local_var_req_builder =
1096            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1097
1098        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1099        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
1100
1101        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1102    }
1103
1104    async fn put_partial<'a>(
1105        &self,
1106        id: uuid::Uuid,
1107        cipher_partial_request_model: Option<models::CipherPartialRequestModel>,
1108    ) -> Result<models::CipherResponseModel, Error> {
1109        let local_var_configuration = &self.configuration;
1110
1111        let local_var_client = &local_var_configuration.client;
1112
1113        let local_var_uri_str = format!(
1114            "{}/ciphers/{id}/partial",
1115            local_var_configuration.base_path,
1116            id = id
1117        );
1118        let mut local_var_req_builder =
1119            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1120
1121        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1122        local_var_req_builder = local_var_req_builder.json(&cipher_partial_request_model);
1123
1124        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1125    }
1126
1127    async fn put_restore<'a>(&self, id: uuid::Uuid) -> Result<models::CipherResponseModel, Error> {
1128        let local_var_configuration = &self.configuration;
1129
1130        let local_var_client = &local_var_configuration.client;
1131
1132        let local_var_uri_str = format!(
1133            "{}/ciphers/{id}/restore",
1134            local_var_configuration.base_path,
1135            id = id
1136        );
1137        let mut local_var_req_builder =
1138            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1139
1140        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1141
1142        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1143    }
1144
1145    async fn put_restore_admin<'a>(
1146        &self,
1147        id: uuid::Uuid,
1148    ) -> Result<models::CipherMiniResponseModel, Error> {
1149        let local_var_configuration = &self.configuration;
1150
1151        let local_var_client = &local_var_configuration.client;
1152
1153        let local_var_uri_str = format!(
1154            "{}/ciphers/{id}/restore-admin",
1155            local_var_configuration.base_path,
1156            id = id
1157        );
1158        let mut local_var_req_builder =
1159            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1160
1161        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1162
1163        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1164    }
1165
1166    async fn put_restore_many<'a>(
1167        &self,
1168        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
1169    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error> {
1170        let local_var_configuration = &self.configuration;
1171
1172        let local_var_client = &local_var_configuration.client;
1173
1174        let local_var_uri_str = format!("{}/ciphers/restore", local_var_configuration.base_path);
1175        let mut local_var_req_builder =
1176            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1177
1178        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1179        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_restore_request_model);
1180
1181        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1182    }
1183
1184    async fn put_restore_many_admin<'a>(
1185        &self,
1186        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
1187    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error> {
1188        let local_var_configuration = &self.configuration;
1189
1190        let local_var_client = &local_var_configuration.client;
1191
1192        let local_var_uri_str = format!(
1193            "{}/ciphers/restore-admin",
1194            local_var_configuration.base_path
1195        );
1196        let mut local_var_req_builder =
1197            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1198
1199        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1200        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_restore_request_model);
1201
1202        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1203    }
1204
1205    async fn put_share<'a>(
1206        &self,
1207        id: uuid::Uuid,
1208        cipher_share_request_model: Option<models::CipherShareRequestModel>,
1209    ) -> Result<models::CipherResponseModel, Error> {
1210        let local_var_configuration = &self.configuration;
1211
1212        let local_var_client = &local_var_configuration.client;
1213
1214        let local_var_uri_str = format!(
1215            "{}/ciphers/{id}/share",
1216            local_var_configuration.base_path,
1217            id = id
1218        );
1219        let mut local_var_req_builder =
1220            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1221
1222        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1223        local_var_req_builder = local_var_req_builder.json(&cipher_share_request_model);
1224
1225        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1226    }
1227
1228    async fn put_share_many<'a>(
1229        &self,
1230        cipher_bulk_share_request_model: Option<models::CipherBulkShareRequestModel>,
1231    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error> {
1232        let local_var_configuration = &self.configuration;
1233
1234        let local_var_client = &local_var_configuration.client;
1235
1236        let local_var_uri_str = format!("{}/ciphers/share", local_var_configuration.base_path);
1237        let mut local_var_req_builder =
1238            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1239
1240        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1241        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_share_request_model);
1242
1243        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1244    }
1245
1246    async fn put_unarchive<'a>(
1247        &self,
1248        id: uuid::Uuid,
1249    ) -> Result<models::CipherResponseModel, Error> {
1250        let local_var_configuration = &self.configuration;
1251
1252        let local_var_client = &local_var_configuration.client;
1253
1254        let local_var_uri_str = format!(
1255            "{}/ciphers/{id}/unarchive",
1256            local_var_configuration.base_path,
1257            id = id
1258        );
1259        let mut local_var_req_builder =
1260            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1261
1262        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1263
1264        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1265    }
1266
1267    async fn put_unarchive_many<'a>(
1268        &self,
1269        cipher_bulk_unarchive_request_model: Option<models::CipherBulkUnarchiveRequestModel>,
1270    ) -> Result<models::CipherResponseModelListResponseModel, Error> {
1271        let local_var_configuration = &self.configuration;
1272
1273        let local_var_client = &local_var_configuration.client;
1274
1275        let local_var_uri_str = format!("{}/ciphers/unarchive", local_var_configuration.base_path);
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        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_unarchive_request_model);
1281
1282        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1283    }
1284
1285    async fn renew_file_upload_url<'a>(
1286        &self,
1287        id: uuid::Uuid,
1288        attachment_id: &'a str,
1289    ) -> Result<models::AttachmentUploadDataResponseModel, Error> {
1290        let local_var_configuration = &self.configuration;
1291
1292        let local_var_client = &local_var_configuration.client;
1293
1294        let local_var_uri_str = format!(
1295            "{}/ciphers/{id}/attachment/{attachmentId}/renew",
1296            local_var_configuration.base_path,
1297            id = id,
1298            attachmentId = crate::apis::urlencode(attachment_id)
1299        );
1300        let mut local_var_req_builder =
1301            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1302
1303        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1304
1305        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1306    }
1307}