zoom_api/
groups.rs

1use crate::Client;
2use crate::ClientResult;
3
4pub struct Groups {
5    pub client: Client,
6}
7
8impl Groups {
9    #[doc(hidden)]
10    pub fn new(client: Client) -> Self {
11        Groups { client }
12    }
13
14    /**
15     * List groups.
16     *
17     * This function performs a `GET` to the `/groups` endpoint.
18     *
19     * List [groups](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under an account.
20     *
21     * **Prerequisite**: Pro or higher account.<br>
22     * **Scopes**: `group:read:admin`<br>
23     *
24     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
25     */
26    pub async fn get(&self) -> ClientResult<crate::Response<crate::types::GroupList>> {
27        let url = self.client.url("/groups", None);
28        self.client
29            .get(
30                &url,
31                crate::Message {
32                    body: None,
33                    content_type: None,
34                },
35            )
36            .await
37    }
38    /**
39     * Create a group.
40     *
41     * This function performs a `POST` to the `/groups` endpoint.
42     *
43     * Create a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under an account.
44     *
45     * You can add a maximum of 100 groups in one account per day. If you go over, you will get an error. You can add a maximum of 5000 groups in one account.
46     *
47     * **Prerequisite**: Pro or higher account.<br>
48     * **Scopes**: `group:write:admin`<br>
49     *  
50     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
51     */
52    pub async fn create(
53        &self,
54        body: &crate::types::GroupCreateRequest,
55    ) -> ClientResult<crate::Response<()>> {
56        let url = self.client.url("/groups", None);
57        self.client
58            .post(
59                &url,
60                crate::Message {
61                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
62                    content_type: Some("application/json".to_string()),
63                },
64            )
65            .await
66    }
67    /**
68     * Get a group.
69     *
70     * This function performs a `GET` to the `/groups/{groupId}` endpoint.
71     *
72     * Get a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under an account.
73     *
74     * **Prerequisite**: Pro, Business, or Education account<br>
75     * **Scopes**: `group:read:admin`<br>
76     *
77     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
78     *
79     * **Parameters:**
80     *
81     * * `group_id: &str` -- The group ID.<br>
82     *   Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups).
83     */
84    pub async fn group(
85        &self,
86        group_id: &str,
87    ) -> ClientResult<crate::Response<crate::types::GroupResponse>> {
88        let url = self.client.url(
89            &format!(
90                "/groups/{}",
91                crate::progenitor_support::encode_path(group_id),
92            ),
93            None,
94        );
95        self.client
96            .get(
97                &url,
98                crate::Message {
99                    body: None,
100                    content_type: None,
101                },
102            )
103            .await
104    }
105    /**
106     * Delete a group.
107     *
108     * This function performs a `DELETE` to the `/groups/{groupId}` endpoint.
109     *
110     * Delete a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-).
111     *
112     * **Prerequisite**: Pro, Business, or Education account<br>
113     * **Scopes**: `group:write:admin`<br>
114     *
115     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
116     *
117     * **Parameters:**
118     *
119     * * `group_id: &str` -- The group ID.<br>
120     *   Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups).
121     */
122    pub async fn delete(&self, group_id: &str) -> ClientResult<crate::Response<()>> {
123        let url = self.client.url(
124            &format!(
125                "/groups/{}",
126                crate::progenitor_support::encode_path(group_id),
127            ),
128            None,
129        );
130        self.client
131            .delete(
132                &url,
133                crate::Message {
134                    body: None,
135                    content_type: None,
136                },
137            )
138            .await
139    }
140    /**
141     * Update a group.
142     *
143     * This function performs a `PATCH` to the `/groups/{groupId}` endpoint.
144     *
145     * Update a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under your account.
146     *
147     * **Prerequisite**: Pro, Business, or Education account<br>
148     * **Scopes**: `group:write:admin`<br>
149     *
150     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
151     *
152     * **Parameters:**
153     *
154     * * `group_id: &str` -- The group ID.<br>
155     *   Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups).
156     */
157    pub async fn update(
158        &self,
159        group_id: &str,
160        body: &crate::types::GroupCreateRequest,
161    ) -> ClientResult<crate::Response<()>> {
162        let url = self.client.url(
163            &format!(
164                "/groups/{}",
165                crate::progenitor_support::encode_path(group_id),
166            ),
167            None,
168        );
169        self.client
170            .patch(
171                &url,
172                crate::Message {
173                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
174                    content_type: Some("application/json".to_string()),
175                },
176            )
177            .await
178    }
179    /**
180     * List group members .
181     *
182     * This function performs a `GET` to the `/groups/{groupId}/members` endpoint.
183     *
184     * List the members of a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under your account.
185     *
186     * **Prerequisite**: Pro, Business, or Education account<br>
187     * **Scopes**: `group:read:admin`<br>
188     *
189     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
190     *
191     * **Parameters:**
192     *
193     * * `group_id: &str` -- The group ID.<br>
194     *   Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups).
195     * * `page_size: i64` -- The number of records returned within a single API call.
196     * * `page_number: i64` --
197     *   **Deprecated** - This field has been deprecated and we will stop supporting it completely in a future release. Please use "next_page_token" for pagination instead of this field.
198     *   
199     *   The page number of the current page in the returned records.
200     * * `next_page_token: &str` -- The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
201     */
202    pub async fn members(
203        &self,
204        group_id: &str,
205        page_size: i64,
206        page_number: i64,
207        next_page_token: &str,
208    ) -> ClientResult<crate::Response<Vec<crate::types::UserCreateResponse>>> {
209        let mut query_args: Vec<(String, String)> = Default::default();
210        if !next_page_token.is_empty() {
211            query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
212        }
213        if page_number > 0 {
214            query_args.push(("page_number".to_string(), page_number.to_string()));
215        }
216        if page_size > 0 {
217            query_args.push(("page_size".to_string(), page_size.to_string()));
218        }
219        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
220        let url = self.client.url(
221            &format!(
222                "/groups/{}/members?{}",
223                crate::progenitor_support::encode_path(group_id),
224                query_
225            ),
226            None,
227        );
228        let resp: crate::Response<crate::types::GroupMembersResponseData> = self
229            .client
230            .get(
231                &url,
232                crate::Message {
233                    body: None,
234                    content_type: None,
235                },
236            )
237            .await?;
238
239        // Return our response data.
240        Ok(crate::Response::new(
241            resp.status,
242            resp.headers,
243            resp.body.members.to_vec(),
244        ))
245    }
246    /**
247     * List group members .
248     *
249     * This function performs a `GET` to the `/groups/{groupId}/members` endpoint.
250     *
251     * As opposed to `members`, this function returns all the pages of the request at once.
252     *
253     * List the members of a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under your account.
254     *
255     * **Prerequisite**: Pro, Business, or Education account<br>
256     * **Scopes**: `group:read:admin`<br>
257     *
258     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
259     */
260    pub async fn get_all_members(
261        &self,
262        group_id: &str,
263    ) -> ClientResult<crate::Response<Vec<crate::types::UserCreateResponse>>> {
264        let url = self.client.url(
265            &format!(
266                "/groups/{}/members",
267                crate::progenitor_support::encode_path(group_id),
268            ),
269            None,
270        );
271        let crate::Response::<crate::types::GroupMembersResponseData> {
272            mut status,
273            mut headers,
274            mut body,
275        } = self
276            .client
277            .get(
278                &url,
279                crate::Message {
280                    body: None,
281                    content_type: None,
282                },
283            )
284            .await?;
285
286        let mut members = body.members;
287        let mut page = body.next_page_token;
288
289        // Paginate if we should.
290        while !page.is_empty() {
291            // Check if we already have URL params and need to concat the token.
292            if !url.contains('?') {
293                crate::Response::<crate::types::GroupMembersResponseData> {
294                    status,
295                    headers,
296                    body,
297                } = self
298                    .client
299                    .get(
300                        &format!("{}?next_page_token={}", url, page),
301                        crate::Message {
302                            body: None,
303                            content_type: None,
304                        },
305                    )
306                    .await?;
307            } else {
308                crate::Response::<crate::types::GroupMembersResponseData> {
309                    status,
310                    headers,
311                    body,
312                } = self
313                    .client
314                    .get(
315                        &format!("{}&next_page_token={}", url, page),
316                        crate::Message {
317                            body: None,
318                            content_type: None,
319                        },
320                    )
321                    .await?;
322            }
323
324            members.append(&mut body.members);
325
326            if !body.next_page_token.is_empty() && body.next_page_token != page {
327                page = body.next_page_token.to_string();
328            } else {
329                page = "".to_string();
330            }
331        }
332
333        // Return our response data.
334        Ok(crate::Response::new(status, headers, members))
335    }
336    /**
337     * Add group members.
338     *
339     * This function performs a `POST` to the `/groups/{groupId}/members` endpoint.
340     *
341     * Add members to a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under your account.
342     *
343     * **Prerequisite**: Pro, Business, or Education account<br>
344     * **Scopes**: `group:write:admin`<br>
345     *
346     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
347     *
348     * **Parameters:**
349     *
350     * * `group_id: &str` -- The group ID.<br>
351     *   Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups).
352     */
353    pub async fn members_create(
354        &self,
355        group_id: &str,
356        body: &crate::types::AddRoleMembersRequest,
357    ) -> ClientResult<crate::Response<()>> {
358        let url = self.client.url(
359            &format!(
360                "/groups/{}/members",
361                crate::progenitor_support::encode_path(group_id),
362            ),
363            None,
364        );
365        self.client
366            .post(
367                &url,
368                crate::Message {
369                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
370                    content_type: Some("application/json".to_string()),
371                },
372            )
373            .await
374    }
375    /**
376     * Delete a group member.
377     *
378     * This function performs a `DELETE` to the `/groups/{groupId}/members/{memberId}` endpoint.
379     *
380     * Delete a member from a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) in a Zoom account.
381     *
382     * **Prerequisite**: Pro, Business, or Education account<br>
383     * **Scopes**: `group:write:admin`<br>
384     *
385     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
386     *
387     * **Parameters:**
388     *
389     * * `group_id: &str` -- The group ID.<br>
390     *   Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups).
391     * * `member_id: &str` -- User's first name.
392     */
393    pub async fn members_delete(
394        &self,
395        group_id: &str,
396        member_id: &str,
397    ) -> ClientResult<crate::Response<()>> {
398        let url = self.client.url(
399            &format!(
400                "/groups/{}/members/{}",
401                crate::progenitor_support::encode_path(group_id),
402                crate::progenitor_support::encode_path(member_id),
403            ),
404            None,
405        );
406        self.client
407            .delete(
408                &url,
409                crate::Message {
410                    body: None,
411                    content_type: None,
412                },
413            )
414            .await
415    }
416    /**
417     * Update a group member.
418     *
419     * This function performs a `PATCH` to the `/groups/{groupId}/members/{memberId}` endpoint.
420     *
421     * Use this API to perform either of the following tasks:
422     * * Remove a group member from one group and move them to a different group.
423     * * Set a user's primary group. By default, the primary group is the first group that user is added to.
424     *
425     * If a user is a member of multiple groups, you can [assign the user a primary group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-#h_d07c7dcd-4fd8-485a-b5fe-a322e8d21c09). The user will use the primary group’s settings by default. However, if the user is a member of a group with locked settings, those group settings will remain locked to the user.
426     *
427     * **Scopes:** `group:write:admin`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
428     *
429     * **Prerequisites:**
430     * * A Pro or higher account
431     *
432     * **Parameters:**
433     *
434     * * `group_id: &str` -- The group's unique ID. To get this value, use the [List Groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups) API.
435     *   * To set a user's primary group, use the `target_group_id` value for this parameter's value.
436     *   * To move a group member from one group to another, use the `groupId` of the designated group.
437     * * `member_id: &str` -- The group member's unique ID. To get this value, use the [List Group Members](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groupmembers) API.
438     */
439    pub async fn update_member(
440        &self,
441        group_id: &str,
442        member_id: &str,
443        body: &crate::types::UpdateGroupMemberRequest,
444    ) -> ClientResult<crate::Response<()>> {
445        let url = self.client.url(
446            &format!(
447                "/groups/{}/members/{}",
448                crate::progenitor_support::encode_path(group_id),
449                crate::progenitor_support::encode_path(member_id),
450            ),
451            None,
452        );
453        self.client
454            .patch(
455                &url,
456                crate::Message {
457                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
458                    content_type: Some("application/json".to_string()),
459                },
460            )
461            .await
462    }
463    /**
464     * Get a group's settings.
465     *
466     * This function performs a `GET` to the `/groups/{groupId}/settings` endpoint.
467     *
468     * Get settings for a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-).
469     * **Prerequisite**: Pro, Business, or Education account<br>
470     * **Scopes**: `group:read:admin`<br>
471     *  
472     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
473     *
474     * **Parameters:**
475     *
476     * * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information:
477     *  \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars).
478     *  \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings).
479     *  \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br>
480     *  \* `meeting_security` — View the account's meeting security settings.
481     */
482    pub async fn get_settings_domains(
483        &self,
484        group_id: &str,
485        custom_query_fields: &str,
486        option: crate::types::OptionData,
487    ) -> ClientResult<crate::Response<crate::types::Domains>> {
488        let mut query_args: Vec<(String, String)> = Default::default();
489        if !custom_query_fields.is_empty() {
490            query_args.push((
491                "custom_query_fields".to_string(),
492                custom_query_fields.to_string(),
493            ));
494        }
495        if !option.to_string().is_empty() {
496            query_args.push(("option".to_string(), option.to_string()));
497        }
498        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
499        let url = self.client.url(
500            &format!(
501                "/groups/{}/settings?{}",
502                crate::progenitor_support::encode_path(group_id),
503                query_
504            ),
505            None,
506        );
507        self.client
508            .get(
509                &url,
510                crate::Message {
511                    body: None,
512                    content_type: None,
513                },
514            )
515            .await
516    }
517    /**
518     * Get a group's settings.
519     *
520     * This function performs a `GET` to the `/groups/{groupId}/settings` endpoint.
521     *
522     * Get settings for a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-).
523     * **Prerequisite**: Pro, Business, or Education account<br>
524     * **Scopes**: `group:read:admin`<br>
525     *  
526     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
527     *
528     * **Parameters:**
529     *
530     * * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information:
531     *  \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars).
532     *  \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings).
533     *  \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br>
534     *  \* `meeting_security` — View the account's meeting security settings.
535     */
536    pub async fn get_settings_meeting_security(
537        &self,
538        group_id: &str,
539        custom_query_fields: &str,
540        option: crate::types::OptionData,
541    ) -> ClientResult<crate::Response<crate::types::MeetingSecuritySettings>> {
542        let mut query_args: Vec<(String, String)> = Default::default();
543        if !custom_query_fields.is_empty() {
544            query_args.push((
545                "custom_query_fields".to_string(),
546                custom_query_fields.to_string(),
547            ));
548        }
549        if !option.to_string().is_empty() {
550            query_args.push(("option".to_string(), option.to_string()));
551        }
552        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
553        let url = self.client.url(
554            &format!(
555                "/groups/{}/settings?{}",
556                crate::progenitor_support::encode_path(group_id),
557                query_
558            ),
559            None,
560        );
561        self.client
562            .get(
563                &url,
564                crate::Message {
565                    body: None,
566                    content_type: None,
567                },
568            )
569            .await
570    }
571    /**
572     * Get a group's settings.
573     *
574     * This function performs a `GET` to the `/groups/{groupId}/settings` endpoint.
575     *
576     * Get settings for a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-).
577     * **Prerequisite**: Pro, Business, or Education account<br>
578     * **Scopes**: `group:read:admin`<br>
579     *  
580     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
581     *
582     * **Parameters:**
583     *
584     * * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information:
585     *  \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars).
586     *  \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings).
587     *  \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br>
588     *  \* `meeting_security` — View the account's meeting security settings.
589     */
590    pub async fn get_settings_group_response(
591        &self,
592        group_id: &str,
593        custom_query_fields: &str,
594        option: crate::types::OptionData,
595    ) -> ClientResult<crate::Response<crate::types::GetGroupSettingsResponse>> {
596        let mut query_args: Vec<(String, String)> = Default::default();
597        if !custom_query_fields.is_empty() {
598            query_args.push((
599                "custom_query_fields".to_string(),
600                custom_query_fields.to_string(),
601            ));
602        }
603        if !option.to_string().is_empty() {
604            query_args.push(("option".to_string(), option.to_string()));
605        }
606        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
607        let url = self.client.url(
608            &format!(
609                "/groups/{}/settings?{}",
610                crate::progenitor_support::encode_path(group_id),
611                query_
612            ),
613            None,
614        );
615        self.client
616            .get(
617                &url,
618                crate::Message {
619                    body: None,
620                    content_type: None,
621                },
622            )
623            .await
624    }
625    /**
626     * Get a group's settings.
627     *
628     * This function performs a `GET` to the `/groups/{groupId}/settings` endpoint.
629     *
630     * Get settings for a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-).
631     * **Prerequisite**: Pro, Business, or Education account<br>
632     * **Scopes**: `group:read:admin`<br>
633     *  
634     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
635     *
636     * **Parameters:**
637     *
638     * * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information:
639     *  \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars).
640     *  \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings).
641     *  \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br>
642     *  \* `meeting_security` — View the account's meeting security settings.
643     */
644    pub async fn get_setting(
645        &self,
646        group_id: &str,
647        custom_query_fields: &str,
648        option: crate::types::OptionData,
649    ) -> ClientResult<crate::Response<crate::types::GetGroupSettingsResponseOneOf>> {
650        let mut query_args: Vec<(String, String)> = Default::default();
651        if !custom_query_fields.is_empty() {
652            query_args.push((
653                "custom_query_fields".to_string(),
654                custom_query_fields.to_string(),
655            ));
656        }
657        if !option.to_string().is_empty() {
658            query_args.push(("option".to_string(), option.to_string()));
659        }
660        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
661        let url = self.client.url(
662            &format!(
663                "/groups/{}/settings?{}",
664                crate::progenitor_support::encode_path(group_id),
665                query_
666            ),
667            None,
668        );
669        self.client
670            .get(
671                &url,
672                crate::Message {
673                    body: None,
674                    content_type: None,
675                },
676            )
677            .await
678    }
679    /**
680     * Update a group's settings.
681     *
682     * This function performs a `PATCH` to the `/groups/{groupId}/settings` endpoint.
683     *
684     * Update settings for a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-).<p style="background-color:#FEEFB3; color:#9F6000"><br>Note:</b> The `force_pmi_jbh_password` field under meeting settings is planned to be deprecated on September 22, 2019. This field will be replaced by another field that will provide the same functionality.</p>
685     * **Prerequisite**: Pro, Business, or Education account<br>
686     * **Scopes**: `group:write:admin`<br>
687     *
688     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
689     *
690     * **Parameters:**
691     *
692     * * `group_id: &str` -- User's first name.
693     * * `option: crate::types::UpdateGroupSettingsOption`
694     */
695    pub async fn update_settings(
696        &self,
697        group_id: &str,
698        custom_query_fields: &str,
699        option: crate::types::UpdateGroupSettingsOption,
700        body: &crate::types::UpdateGroupSettingsRequestOneOf,
701    ) -> ClientResult<crate::Response<()>> {
702        let mut query_args: Vec<(String, String)> = Default::default();
703        if !custom_query_fields.is_empty() {
704            query_args.push((
705                "custom_query_fields".to_string(),
706                custom_query_fields.to_string(),
707            ));
708        }
709        if !option.to_string().is_empty() {
710            query_args.push(("option".to_string(), option.to_string()));
711        }
712        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
713        let url = self.client.url(
714            &format!(
715                "/groups/{}/settings?{}",
716                crate::progenitor_support::encode_path(group_id),
717                query_
718            ),
719            None,
720        );
721        self.client
722            .patch(
723                &url,
724                crate::Message {
725                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
726                    content_type: Some("application/json".to_string()),
727                },
728            )
729            .await
730    }
731    /**
732     * Get locked settings.
733     *
734     * This function performs a `GET` to the `/groups/{groupId}/lock_settings` endpoint.
735     *
736     * Retrieve a [group's](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) locked settings. If you lock a setting, the group members will not be able to modify it individually. <p style="background-color:#FEEFB3; color:#9F6000"><br>Note:</b> The `force_pmi_jbh_password` field under meeting settings is planned to be deprecated on September 22, 2019. This field will be replaced by another field that will provide the same functionality.</p>
737     *
738     * **Prerequisite**: Pro, Business, or Education account<br>
739     * **Scopes**: `group:read:admin`<br>
740     *
741     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
742     *
743     * **Parameters:**
744     *
745     * * `group_id: &str` -- User's first name.
746     * * `option: &str` -- Specify `meeting_security` as the value of this field if you would like to view security settings applied on a meeting hosted by the users in this group.
747     */
748    pub async fn get_lock_settings_meeting_security(
749        &self,
750        group_id: &str,
751        custom_query_fields: &str,
752        option: &str,
753    ) -> ClientResult<crate::Response<crate::types::MeetingSecuritySettings>> {
754        let mut query_args: Vec<(String, String)> = Default::default();
755        if !custom_query_fields.is_empty() {
756            query_args.push((
757                "custom_query_fields".to_string(),
758                custom_query_fields.to_string(),
759            ));
760        }
761        if !option.is_empty() {
762            query_args.push(("option".to_string(), option.to_string()));
763        }
764        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
765        let url = self.client.url(
766            &format!(
767                "/groups/{}/lock_settings?{}",
768                crate::progenitor_support::encode_path(group_id),
769                query_
770            ),
771            None,
772        );
773        self.client
774            .get(
775                &url,
776                crate::Message {
777                    body: None,
778                    content_type: None,
779                },
780            )
781            .await
782    }
783    /**
784     * Get locked settings.
785     *
786     * This function performs a `GET` to the `/groups/{groupId}/lock_settings` endpoint.
787     *
788     * Retrieve a [group's](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) locked settings. If you lock a setting, the group members will not be able to modify it individually. <p style="background-color:#FEEFB3; color:#9F6000"><br>Note:</b> The `force_pmi_jbh_password` field under meeting settings is planned to be deprecated on September 22, 2019. This field will be replaced by another field that will provide the same functionality.</p>
789     *
790     * **Prerequisite**: Pro, Business, or Education account<br>
791     * **Scopes**: `group:read:admin`<br>
792     *
793     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
794     *
795     * **Parameters:**
796     *
797     * * `group_id: &str` -- User's first name.
798     * * `option: &str` -- Specify `meeting_security` as the value of this field if you would like to view security settings applied on a meeting hosted by the users in this group.
799     */
800    pub async fn get_lock_settings_group_response(
801        &self,
802        group_id: &str,
803        custom_query_fields: &str,
804        option: &str,
805    ) -> ClientResult<crate::Response<crate::types::GetGroupLockSettingsResponse>> {
806        let mut query_args: Vec<(String, String)> = Default::default();
807        if !custom_query_fields.is_empty() {
808            query_args.push((
809                "custom_query_fields".to_string(),
810                custom_query_fields.to_string(),
811            ));
812        }
813        if !option.is_empty() {
814            query_args.push(("option".to_string(), option.to_string()));
815        }
816        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
817        let url = self.client.url(
818            &format!(
819                "/groups/{}/lock_settings?{}",
820                crate::progenitor_support::encode_path(group_id),
821                query_
822            ),
823            None,
824        );
825        self.client
826            .get(
827                &url,
828                crate::Message {
829                    body: None,
830                    content_type: None,
831                },
832            )
833            .await
834    }
835    /**
836     * Get locked settings.
837     *
838     * This function performs a `GET` to the `/groups/{groupId}/lock_settings` endpoint.
839     *
840     * Retrieve a [group's](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) locked settings. If you lock a setting, the group members will not be able to modify it individually. <p style="background-color:#FEEFB3; color:#9F6000"><br>Note:</b> The `force_pmi_jbh_password` field under meeting settings is planned to be deprecated on September 22, 2019. This field will be replaced by another field that will provide the same functionality.</p>
841     *
842     * **Prerequisite**: Pro, Business, or Education account<br>
843     * **Scopes**: `group:read:admin`<br>
844     *
845     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
846     *
847     * **Parameters:**
848     *
849     * * `group_id: &str` -- User's first name.
850     * * `option: &str` -- Specify `meeting_security` as the value of this field if you would like to view security settings applied on a meeting hosted by the users in this group.
851     */
852    pub async fn get_lock_setting(
853        &self,
854        group_id: &str,
855        custom_query_fields: &str,
856        option: &str,
857    ) -> ClientResult<crate::Response<crate::types::GetGroupLockSettingsResponseOneOf>> {
858        let mut query_args: Vec<(String, String)> = Default::default();
859        if !custom_query_fields.is_empty() {
860            query_args.push((
861                "custom_query_fields".to_string(),
862                custom_query_fields.to_string(),
863            ));
864        }
865        if !option.is_empty() {
866            query_args.push(("option".to_string(), option.to_string()));
867        }
868        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
869        let url = self.client.url(
870            &format!(
871                "/groups/{}/lock_settings?{}",
872                crate::progenitor_support::encode_path(group_id),
873                query_
874            ),
875            None,
876        );
877        self.client
878            .get(
879                &url,
880                crate::Message {
881                    body: None,
882                    content_type: None,
883                },
884            )
885            .await
886    }
887    /**
888     * Update locked settings.
889     *
890     * This function performs a `PATCH` to the `/groups/{groupId}/lock_settings` endpoint.
891     *
892     * Update a [group's](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) locked settings. If you lock a setting, the group members will not be able to modify it individually. <p style="background-color:#FEEFB3; color:#9F6000"><br>Note:</b> The `force_pmi_jbh_password` field under meeting settings is planned to be deprecated on September 22, 2019. This field will be replaced by another field that will provide the same functionality.</p>
893     *
894     * **Prerequisite**: Pro, Business, or Education account<br>
895     * **Scopes**: `group:write:admin`<br>
896     *
897     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
898     *
899     * **Parameters:**
900     *
901     * * `group_id: &str` -- User's first name.
902     * * `option: &str` -- Specify `meeting_security` as the value of this field if you would like to view security settings applied on a meeting hosted by the users in this group.
903     */
904    pub async fn locked_settings(
905        &self,
906        group_id: &str,
907        custom_query_fields: &str,
908        option: &str,
909        body: &crate::types::GroupLockedSettingsRequestOneOf,
910    ) -> ClientResult<crate::Response<()>> {
911        let mut query_args: Vec<(String, String)> = Default::default();
912        if !custom_query_fields.is_empty() {
913            query_args.push((
914                "custom_query_fields".to_string(),
915                custom_query_fields.to_string(),
916            ));
917        }
918        if !option.is_empty() {
919            query_args.push(("option".to_string(), option.to_string()));
920        }
921        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
922        let url = self.client.url(
923            &format!(
924                "/groups/{}/lock_settings?{}",
925                crate::progenitor_support::encode_path(group_id),
926                query_
927            ),
928            None,
929        );
930        self.client
931            .patch(
932                &url,
933                crate::Message {
934                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
935                    content_type: Some("application/json".to_string()),
936                },
937            )
938            .await
939    }
940    /**
941     * Upload virtual background files.
942     *
943     * This function performs a `POST` to the `/groups/{groupId}/settings/virtual_backgrounds` endpoint.
944     *
945     * Use this API to [upload virtual background files](https://support.zoom.us/hc/en-us/articles/210707503-Virtual-Background#h_01EJF3YFEWGT8YA0ZJ079JEDQE) for all users in a group to use.
946     *
947     *
948     * **Prerequisites:**<br>
949     * * Virtual background feature must be [enabled](https://support.zoom.us/hc/en-us/articles/210707503-Virtual-Background#h_2ef28080-fce9-4ac2-b567-dc958afab1b7) on the account.
950     * <br> **Scope:** `group:write:admin`<br><br>
951     * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
952     *
953     *
954     * `
955     *
956     * **Parameters:**
957     *
958     * * `group_id: &str` -- Unique identifier of the group. Retrieve the value for this field by calling the [List groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups) API.
959     */
960    pub async fn upload_vb(
961        &self,
962        file_ids: &str,
963        group_id: &str,
964        body: &crate::types::UploadVbRequest,
965    ) -> ClientResult<crate::Response<crate::types::Files>> {
966        let mut query_args: Vec<(String, String)> = Default::default();
967        if !file_ids.is_empty() {
968            query_args.push(("file_ids".to_string(), file_ids.to_string()));
969        }
970        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
971        let url = self.client.url(
972            &format!(
973                "/groups/{}/settings/virtual_backgrounds?{}",
974                crate::progenitor_support::encode_path(group_id),
975                query_
976            ),
977            None,
978        );
979        self.client
980            .post(
981                &url,
982                crate::Message {
983                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
984                    content_type: None,
985                },
986            )
987            .await
988    }
989    /**
990     * Delete virtual background files.
991     *
992     * This function performs a `DELETE` to the `/groups/{groupId}/settings/virtual_backgrounds` endpoint.
993     *
994     * Delete existing virtual background file(s) from an account.
995     *
996     * **Prerequisites:**<br>
997     * * Virtual background feature must be [enabled](https://support.zoom.us/hc/en-us/articles/210707503-Virtual-Background#h_2ef28080-fce9-4ac2-b567-dc958afab1b7) on the account.
998     * <br> **Scope:** `group:write:admin`<br><br>
999     * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
1000     *
1001     *
1002     *
1003     * **Parameters:**
1004     *
1005     * * `group_id: &str` -- Unique identifier of the group. Retrieve the value for this field by calling the [List groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups) API.
1006     * * `file_ids: &str` -- Provide the id of the file that is to be deleted. To delete multiple files, provide comma separated values for this field.
1007     */
1008    pub async fn del_vb(
1009        &self,
1010        file_ids: &str,
1011        group_id: &str,
1012    ) -> ClientResult<crate::Response<()>> {
1013        let mut query_args: Vec<(String, String)> = Default::default();
1014        if !file_ids.is_empty() {
1015            query_args.push(("file_ids".to_string(), file_ids.to_string()));
1016        }
1017        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
1018        let url = self.client.url(
1019            &format!(
1020                "/groups/{}/settings/virtual_backgrounds?{}",
1021                crate::progenitor_support::encode_path(group_id),
1022                query_
1023            ),
1024            None,
1025        );
1026        self.client
1027            .delete(
1028                &url,
1029                crate::Message {
1030                    body: None,
1031                    content_type: None,
1032                },
1033            )
1034            .await
1035    }
1036}