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-shared-folders
155    async fn post_bulk_shared_folders<'a>(
156        &self,
157        cipher_bulk_update_shared_folders_request_model: Option<
158            models::CipherBulkUpdateSharedFoldersRequestModel,
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}/delete
206    async fn put_delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error>;
207
208    /// PUT /ciphers/{id}/delete-admin
209    async fn put_delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error>;
210
211    /// PUT /ciphers/delete
212    async fn put_delete_many<'a>(
213        &self,
214        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
215    ) -> Result<(), Error>;
216
217    /// PUT /ciphers/delete-admin
218    async fn put_delete_many_admin<'a>(
219        &self,
220        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
221    ) -> Result<(), Error>;
222
223    /// PUT /ciphers/{id}/partial
224    async fn put_partial<'a>(
225        &self,
226        id: uuid::Uuid,
227        cipher_partial_request_model: Option<models::CipherPartialRequestModel>,
228    ) -> Result<models::CipherResponseModel, Error>;
229
230    /// PUT /ciphers/{id}/restore
231    async fn put_restore<'a>(&self, id: uuid::Uuid) -> Result<models::CipherResponseModel, Error>;
232
233    /// PUT /ciphers/{id}/restore-admin
234    async fn put_restore_admin<'a>(
235        &self,
236        id: uuid::Uuid,
237    ) -> Result<models::CipherMiniResponseModel, Error>;
238
239    /// PUT /ciphers/restore
240    async fn put_restore_many<'a>(
241        &self,
242        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
243    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error>;
244
245    /// PUT /ciphers/restore-admin
246    async fn put_restore_many_admin<'a>(
247        &self,
248        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
249    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error>;
250
251    /// PUT /ciphers/{id}/share
252    async fn put_share<'a>(
253        &self,
254        id: uuid::Uuid,
255        cipher_share_request_model: Option<models::CipherShareRequestModel>,
256    ) -> Result<models::CipherResponseModel, Error>;
257
258    /// PUT /ciphers/share
259    async fn put_share_many<'a>(
260        &self,
261        cipher_bulk_share_request_model: Option<models::CipherBulkShareRequestModel>,
262    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error>;
263
264    /// PUT /ciphers/{id}/shared-folders
265    async fn put_shared_folders<'a>(
266        &self,
267        id: uuid::Uuid,
268        cipher_shared_folders_request_model: Option<models::CipherSharedFoldersRequestModel>,
269    ) -> Result<models::CipherDetailsResponseModel, Error>;
270
271    /// PUT /ciphers/{id}/shared-folders-admin
272    async fn put_shared_folders_admin<'a>(
273        &self,
274        id: &'a str,
275        cipher_shared_folders_request_model: Option<models::CipherSharedFoldersRequestModel>,
276    ) -> Result<models::CipherMiniDetailsResponseModel, Error>;
277
278    /// PUT /ciphers/{id}/shared-folders_v2
279    async fn put_shared_folders_v_next<'a>(
280        &self,
281        id: uuid::Uuid,
282        cipher_shared_folders_request_model: Option<models::CipherSharedFoldersRequestModel>,
283    ) -> Result<models::OptionalCipherDetailsResponseModel, 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_shared_folders<'a>(
793        &self,
794        cipher_bulk_update_shared_folders_request_model: Option<
795            models::CipherBulkUpdateSharedFoldersRequestModel,
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-shared-folders",
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_shared_folders_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_delete<'a>(&self, id: uuid::Uuid) -> Result<(), Error> {
963        let local_var_configuration = &self.configuration;
964
965        let local_var_client = &local_var_configuration.client;
966
967        let local_var_uri_str = format!(
968            "{}/ciphers/{id}/delete",
969            local_var_configuration.base_path,
970            id = id
971        );
972        let mut local_var_req_builder =
973            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
974
975        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
976
977        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
978    }
979
980    async fn put_delete_admin<'a>(&self, id: uuid::Uuid) -> Result<(), Error> {
981        let local_var_configuration = &self.configuration;
982
983        let local_var_client = &local_var_configuration.client;
984
985        let local_var_uri_str = format!(
986            "{}/ciphers/{id}/delete-admin",
987            local_var_configuration.base_path,
988            id = id
989        );
990        let mut local_var_req_builder =
991            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
992
993        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
994
995        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
996    }
997
998    async fn put_delete_many<'a>(
999        &self,
1000        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
1001    ) -> Result<(), Error> {
1002        let local_var_configuration = &self.configuration;
1003
1004        let local_var_client = &local_var_configuration.client;
1005
1006        let local_var_uri_str = format!("{}/ciphers/delete", local_var_configuration.base_path);
1007        let mut local_var_req_builder =
1008            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1009
1010        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1011        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
1012
1013        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1014    }
1015
1016    async fn put_delete_many_admin<'a>(
1017        &self,
1018        cipher_bulk_delete_request_model: Option<models::CipherBulkDeleteRequestModel>,
1019    ) -> Result<(), Error> {
1020        let local_var_configuration = &self.configuration;
1021
1022        let local_var_client = &local_var_configuration.client;
1023
1024        let local_var_uri_str =
1025            format!("{}/ciphers/delete-admin", local_var_configuration.base_path);
1026        let mut local_var_req_builder =
1027            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1028
1029        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1030        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_delete_request_model);
1031
1032        bitwarden_api_base::process_with_empty_response(local_var_req_builder).await
1033    }
1034
1035    async fn put_partial<'a>(
1036        &self,
1037        id: uuid::Uuid,
1038        cipher_partial_request_model: Option<models::CipherPartialRequestModel>,
1039    ) -> Result<models::CipherResponseModel, Error> {
1040        let local_var_configuration = &self.configuration;
1041
1042        let local_var_client = &local_var_configuration.client;
1043
1044        let local_var_uri_str = format!(
1045            "{}/ciphers/{id}/partial",
1046            local_var_configuration.base_path,
1047            id = id
1048        );
1049        let mut local_var_req_builder =
1050            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1051
1052        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1053        local_var_req_builder = local_var_req_builder.json(&cipher_partial_request_model);
1054
1055        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1056    }
1057
1058    async fn put_restore<'a>(&self, id: uuid::Uuid) -> Result<models::CipherResponseModel, Error> {
1059        let local_var_configuration = &self.configuration;
1060
1061        let local_var_client = &local_var_configuration.client;
1062
1063        let local_var_uri_str = format!(
1064            "{}/ciphers/{id}/restore",
1065            local_var_configuration.base_path,
1066            id = id
1067        );
1068        let mut local_var_req_builder =
1069            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1070
1071        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1072
1073        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1074    }
1075
1076    async fn put_restore_admin<'a>(
1077        &self,
1078        id: uuid::Uuid,
1079    ) -> Result<models::CipherMiniResponseModel, Error> {
1080        let local_var_configuration = &self.configuration;
1081
1082        let local_var_client = &local_var_configuration.client;
1083
1084        let local_var_uri_str = format!(
1085            "{}/ciphers/{id}/restore-admin",
1086            local_var_configuration.base_path,
1087            id = id
1088        );
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
1094        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1095    }
1096
1097    async fn put_restore_many<'a>(
1098        &self,
1099        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
1100    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error> {
1101        let local_var_configuration = &self.configuration;
1102
1103        let local_var_client = &local_var_configuration.client;
1104
1105        let local_var_uri_str = format!("{}/ciphers/restore", local_var_configuration.base_path);
1106        let mut local_var_req_builder =
1107            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1108
1109        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1110        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_restore_request_model);
1111
1112        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1113    }
1114
1115    async fn put_restore_many_admin<'a>(
1116        &self,
1117        cipher_bulk_restore_request_model: Option<models::CipherBulkRestoreRequestModel>,
1118    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error> {
1119        let local_var_configuration = &self.configuration;
1120
1121        let local_var_client = &local_var_configuration.client;
1122
1123        let local_var_uri_str = format!(
1124            "{}/ciphers/restore-admin",
1125            local_var_configuration.base_path
1126        );
1127        let mut local_var_req_builder =
1128            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1129
1130        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1131        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_restore_request_model);
1132
1133        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1134    }
1135
1136    async fn put_share<'a>(
1137        &self,
1138        id: uuid::Uuid,
1139        cipher_share_request_model: Option<models::CipherShareRequestModel>,
1140    ) -> Result<models::CipherResponseModel, Error> {
1141        let local_var_configuration = &self.configuration;
1142
1143        let local_var_client = &local_var_configuration.client;
1144
1145        let local_var_uri_str = format!(
1146            "{}/ciphers/{id}/share",
1147            local_var_configuration.base_path,
1148            id = id
1149        );
1150        let mut local_var_req_builder =
1151            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1152
1153        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1154        local_var_req_builder = local_var_req_builder.json(&cipher_share_request_model);
1155
1156        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1157    }
1158
1159    async fn put_share_many<'a>(
1160        &self,
1161        cipher_bulk_share_request_model: Option<models::CipherBulkShareRequestModel>,
1162    ) -> Result<models::CipherMiniResponseModelListResponseModel, Error> {
1163        let local_var_configuration = &self.configuration;
1164
1165        let local_var_client = &local_var_configuration.client;
1166
1167        let local_var_uri_str = format!("{}/ciphers/share", local_var_configuration.base_path);
1168        let mut local_var_req_builder =
1169            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1170
1171        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1172        local_var_req_builder = local_var_req_builder.json(&cipher_bulk_share_request_model);
1173
1174        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1175    }
1176
1177    async fn put_shared_folders<'a>(
1178        &self,
1179        id: uuid::Uuid,
1180        cipher_shared_folders_request_model: Option<models::CipherSharedFoldersRequestModel>,
1181    ) -> Result<models::CipherDetailsResponseModel, Error> {
1182        let local_var_configuration = &self.configuration;
1183
1184        let local_var_client = &local_var_configuration.client;
1185
1186        let local_var_uri_str = format!(
1187            "{}/ciphers/{id}/shared-folders",
1188            local_var_configuration.base_path,
1189            id = id
1190        );
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_shared_folders_request_model);
1196
1197        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1198    }
1199
1200    async fn put_shared_folders_admin<'a>(
1201        &self,
1202        id: &'a str,
1203        cipher_shared_folders_request_model: Option<models::CipherSharedFoldersRequestModel>,
1204    ) -> Result<models::CipherMiniDetailsResponseModel, Error> {
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/{id}/shared-folders-admin",
1211            local_var_configuration.base_path,
1212            id = crate::apis::urlencode(id)
1213        );
1214        let mut local_var_req_builder =
1215            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1216
1217        local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
1218        local_var_req_builder = local_var_req_builder.json(&cipher_shared_folders_request_model);
1219
1220        bitwarden_api_base::process_with_json_response(local_var_req_builder).await
1221    }
1222
1223    async fn put_shared_folders_v_next<'a>(
1224        &self,
1225        id: uuid::Uuid,
1226        cipher_shared_folders_request_model: Option<models::CipherSharedFoldersRequestModel>,
1227    ) -> Result<models::OptionalCipherDetailsResponseModel, Error> {
1228        let local_var_configuration = &self.configuration;
1229
1230        let local_var_client = &local_var_configuration.client;
1231
1232        let local_var_uri_str = format!(
1233            "{}/ciphers/{id}/shared-folders_v2",
1234            local_var_configuration.base_path,
1235            id = id
1236        );
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_shared_folders_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}