1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894
use anyhow::Result; use crate::Client; pub struct Groups { client: Client, } impl Groups { #[doc(hidden)] pub fn new(client: Client) -> Self { Groups { client } } /** * List groups. * * This function performs a `GET` to the `/groups` endpoint. * * List [groups](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under an account. * * **Prerequisite**: Pro or higher account.<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` */ pub async fn get(&self) -> Result<crate::types::GroupList> { let url = "/groups".to_string(); self.client.get(&url, None).await } /** * Create a group. * * This function performs a `POST` to the `/groups` endpoint. * * Create a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under an account. * * 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. * * **Prerequisite**: Pro or higher account.<br> * **Scopes**: `group:write:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` */ pub async fn group_create(&self, body: &crate::types::GroupCreateRequest) -> Result<()> { let url = "/groups".to_string(); self.client .post( &url, Some(reqwest::Body::from(serde_json::to_vec(body).unwrap())), ) .await } /** * Get a group. * * This function performs a `GET` to the `/groups/{groupId}` endpoint. * * Get a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under an account. * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` * * **Parameters:** * * * `group_id: &str` -- The group ID.<br> * Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups). */ pub async fn group(&self, group_id: &str) -> Result<crate::types::GroupResponse> { let url = format!( "/groups/{}", crate::progenitor_support::encode_path(&group_id.to_string()), ); self.client.get(&url, None).await } /** * Delete a group. * * This function performs a `DELETE` to the `/groups/{groupId}` endpoint. * * Delete a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-). * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:write:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` * * **Parameters:** * * * `group_id: &str` -- The group ID.<br> * Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups). */ pub async fn group_delete(&self, group_id: &str) -> Result<()> { let url = format!( "/groups/{}", crate::progenitor_support::encode_path(&group_id.to_string()), ); self.client.delete(&url, None).await } /** * Update a group. * * This function performs a `PATCH` to the `/groups/{groupId}` endpoint. * * Update a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under your account. * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:write:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` * * **Parameters:** * * * `group_id: &str` -- The group ID.<br> * Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups). */ pub async fn group_update( &self, group_id: &str, body: &crate::types::GroupCreateRequest, ) -> Result<()> { let url = format!( "/groups/{}", crate::progenitor_support::encode_path(&group_id.to_string()), ); self.client .patch( &url, Some(reqwest::Body::from(serde_json::to_vec(body).unwrap())), ) .await } /** * List group members . * * This function performs a `GET` to the `/groups/{groupId}/members` endpoint. * * List the members of a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under your account. * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `group_id: &str` -- The group ID.<br> * Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups). * * `page_size: i64` -- The number of records returned within a single API call. * * `page_number: i64` -- * **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. * * The page number of the current page in the returned records. * * `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. */ pub async fn group_members( &self, group_id: &str, page_size: i64, page_number: i64, next_page_token: &str, ) -> Result<Vec<crate::types::UserCreateResponse>> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !next_page_token.is_empty() { query_args.push(format!("next_page_token={}", next_page_token)); } if page_number > 0 { query_args.push(format!("page_number={}", page_number)); } if page_size > 0 { query_args.push(format!("page_size={}", page_size)); } for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/members?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); let resp: crate::types::GroupMembersResponseData = self.client.get(&url, None).await.unwrap(); // Return our response data. Ok(resp.members) } /** * List group members . * * This function performs a `GET` to the `/groups/{groupId}/members` endpoint. * * As opposed to `group_members`, this function returns all the pages of the request at once. * * List the members of a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under your account. * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` */ pub async fn get_all_group_members( &self, group_id: &str, page_number: i64, ) -> Result<Vec<crate::types::UserCreateResponse>> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if page_number > 0 { query_args.push(format!("page_number={}", page_number)); } for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/members?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); let mut resp: crate::types::GroupMembersResponseData = self.client.get(&url, None).await.unwrap(); let mut members = resp.members; let mut page = resp.next_page_token; // Paginate if we should. while !page.is_empty() { // Check if we already have URL params and need to concat the token. if !url.contains('?') { resp = self .client .get(&format!("{}?next_page_token={}", url, page), None) .await .unwrap(); } else { resp = self .client .get(&format!("{}&next_page_token={}", url, page), None) .await .unwrap(); } members.append(&mut resp.members); if !resp.next_page_token.is_empty() && resp.next_page_token != page { page = resp.next_page_token.to_string(); } else { page = "".to_string(); } } // Return our response data. Ok(members) } /** * Add group members. * * This function performs a `POST` to the `/groups/{groupId}/members` endpoint. * * Add members to a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) under your account. * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:write:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `group_id: &str` -- The group ID.<br> * Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups). */ pub async fn group_members_create( &self, group_id: &str, body: &crate::types::AddRoleMembersRequest, ) -> Result<()> { let url = format!( "/groups/{}/members", crate::progenitor_support::encode_path(&group_id.to_string()), ); self.client .post( &url, Some(reqwest::Body::from(serde_json::to_vec(body).unwrap())), ) .await } /** * Delete a group member. * * This function performs a `DELETE` to the `/groups/{groupId}/members/{memberId}` endpoint. * * Delete a member from a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-) in a Zoom account. * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:write:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` * * **Parameters:** * * * `group_id: &str` -- The group ID.<br> * Can be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups). * * `member_id: &str` -- User's first name. */ pub async fn group_members_delete(&self, group_id: &str, member_id: &str) -> Result<()> { let url = format!( "/groups/{}/members/{}", crate::progenitor_support::encode_path(&group_id.to_string()), crate::progenitor_support::encode_path(&member_id.to_string()), ); self.client.delete(&url, None).await } /** * Update a group member. * * This function performs a `PATCH` to the `/groups/{groupId}/members/{memberId}` endpoint. * * Use this API to perform either of the following tasks: * * Remove a group member from one group and move them to a different group. * * Set a user's primary group. By default, the primary group is the first group that user is added to. * * 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. * * **Scopes:** `group:write:admin`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Prerequisites:** * * A Pro or higher account * * **Parameters:** * * * `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. * * To set a user's primary group, use the `target_group_id` value for this parameter's value. * * To move a group member from one group to another, use the `groupId` of the designated group. * * `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. */ pub async fn update_a_group_member( &self, group_id: &str, member_id: &str, body: &crate::types::UpdateGroupMemberRequest, ) -> Result<()> { let url = format!( "/groups/{}/members/{}", crate::progenitor_support::encode_path(&group_id.to_string()), crate::progenitor_support::encode_path(&member_id.to_string()), ); self.client .patch( &url, Some(reqwest::Body::from(serde_json::to_vec(body).unwrap())), ) .await } /** * Get a group's settings. * * This function performs a `GET` to the `/groups/{groupId}/settings` endpoint. * * Get settings for a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-). * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information: * \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars). * \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings). * \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br> * \* `meeting_security` — View the account's meeting security settings. */ pub async fn get_group_settings_crate_types_domains( &self, group_id: &str, custom_query_fields: &str, option: crate::types::OptionData, ) -> Result<crate::types::Domains> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !custom_query_fields.is_empty() { query_args.push(format!("custom_query_fields={}", custom_query_fields)); } query_args.push(format!("option={}", option)); for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/settings?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client.get(&url, None).await } /** * Get a group's settings. * * This function performs a `GET` to the `/groups/{groupId}/settings` endpoint. * * Get settings for a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-). * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information: * \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars). * \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings). * \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br> * \* `meeting_security` — View the account's meeting security settings. */ pub async fn get_group_settings_crate_types_meeting_security( &self, group_id: &str, custom_query_fields: &str, option: crate::types::OptionData, ) -> Result<crate::types::MeetingSecuritySettings> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !custom_query_fields.is_empty() { query_args.push(format!("custom_query_fields={}", custom_query_fields)); } query_args.push(format!("option={}", option)); for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/settings?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client.get(&url, None).await } /** * Get a group's settings. * * This function performs a `GET` to the `/groups/{groupId}/settings` endpoint. * * Get settings for a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-). * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information: * \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars). * \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings). * \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br> * \* `meeting_security` — View the account's meeting security settings. */ pub async fn get_group_settings_crate_types_response( &self, group_id: &str, custom_query_fields: &str, option: crate::types::OptionData, ) -> Result<crate::types::GetGroupSettingsResponse> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !custom_query_fields.is_empty() { query_args.push(format!("custom_query_fields={}", custom_query_fields)); } query_args.push(format!("option={}", option)); for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/settings?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client.get(&url, None).await } /** * Get a group's settings. * * This function performs a `GET` to the `/groups/{groupId}/settings` endpoint. * * Get settings for a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-). * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `option: crate::types::OptionData` -- Use the following options to filter the results of the account's information: * \* `meeting_authentication` — View the account's [meeting authentication settings](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars). * \* `recording_authentication` — View the account's [recording authentication settings](https://support.zoom.us/hc/en-us/articles/360037756671-Authentication-Profiles-for-Cloud-Recordings). * \* `security` — View the account's security settings. For example, password requirements for user login or two-factor authentication.<br> * \* `meeting_security` — View the account's meeting security settings. */ pub async fn get_group_setting( &self, group_id: &str, custom_query_fields: &str, option: crate::types::OptionData, ) -> Result<crate::types::GetGroupSettingsResponseOneOf> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !custom_query_fields.is_empty() { query_args.push(format!("custom_query_fields={}", custom_query_fields)); } query_args.push(format!("option={}", option)); for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/settings?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client.get(&url, None).await } /** * Update a group's settings. * * This function performs a `PATCH` to the `/groups/{groupId}/settings` endpoint. * * 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> * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:write:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `group_id: &str` -- User's first name. * * `option: crate::types::UpdateGroupSettingsOption` */ pub async fn update_group_settings( &self, group_id: &str, custom_query_fields: &str, option: crate::types::UpdateGroupSettingsOption, body: &crate::types::UpdateGroupSettingsRequestOneOf, ) -> Result<()> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !custom_query_fields.is_empty() { query_args.push(format!("custom_query_fields={}", custom_query_fields)); } query_args.push(format!("option={}", option)); for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/settings?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client .patch( &url, Some(reqwest::Body::from(serde_json::to_vec(body).unwrap())), ) .await } /** * Get locked settings. * * This function performs a `GET` to the `/groups/{groupId}/lock_settings` endpoint. * * 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> * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `group_id: &str` -- User's first name. * * `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. */ pub async fn get_group_lock_settings_crate_types_meeting_security( &self, group_id: &str, custom_query_fields: &str, option: &str, ) -> Result<crate::types::MeetingSecuritySettings> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !custom_query_fields.is_empty() { query_args.push(format!("custom_query_fields={}", custom_query_fields)); } if !option.is_empty() { query_args.push(format!("option={}", option)); } for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/lock_settings?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client.get(&url, None).await } /** * Get locked settings. * * This function performs a `GET` to the `/groups/{groupId}/lock_settings` endpoint. * * 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> * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `group_id: &str` -- User's first name. * * `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. */ pub async fn get_group_lock_settings_crate_types_response( &self, group_id: &str, custom_query_fields: &str, option: &str, ) -> Result<crate::types::GetGroupLockSettingsResponse> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !custom_query_fields.is_empty() { query_args.push(format!("custom_query_fields={}", custom_query_fields)); } if !option.is_empty() { query_args.push(format!("option={}", option)); } for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/lock_settings?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client.get(&url, None).await } /** * Get locked settings. * * This function performs a `GET` to the `/groups/{groupId}/lock_settings` endpoint. * * 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> * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:read:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `group_id: &str` -- User's first name. * * `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. */ pub async fn get_group_lock_setting( &self, group_id: &str, custom_query_fields: &str, option: &str, ) -> Result<crate::types::GetGroupLockSettingsResponseOneOf> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !custom_query_fields.is_empty() { query_args.push(format!("custom_query_fields={}", custom_query_fields)); } if !option.is_empty() { query_args.push(format!("option={}", option)); } for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/lock_settings?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client.get(&url, None).await } /** * Update locked settings. * * This function performs a `PATCH` to the `/groups/{groupId}/lock_settings` endpoint. * * 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> * * **Prerequisite**: Pro, Business, or Education account<br> * **Scopes**: `group:write:admin`<br> * * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` * * **Parameters:** * * * `group_id: &str` -- User's first name. * * `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. */ pub async fn group_locked_settings( &self, group_id: &str, custom_query_fields: &str, option: &str, body: &crate::types::GroupLockedSettingsRequestOneOf, ) -> Result<()> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !custom_query_fields.is_empty() { query_args.push(format!("custom_query_fields={}", custom_query_fields)); } if !option.is_empty() { query_args.push(format!("option={}", option)); } for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/lock_settings?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client .patch( &url, Some(reqwest::Body::from(serde_json::to_vec(body).unwrap())), ) .await } /** * Upload virtual background files. * * This function performs a `POST` to the `/groups/{groupId}/settings/virtual_backgrounds` endpoint. * * 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. * * * **Prerequisites:**<br> * * 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. * <br> **Scope:** `group:write:admin`<br><br> * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br> * * * ` * * **Parameters:** * * * `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. */ pub async fn upload_group_vb( &self, file_ids: &str, group_id: &str, body: &crate::types::UploadVbRequest, ) -> Result<crate::types::Files> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !file_ids.is_empty() { query_args.push(format!("file_ids={}", file_ids)); } for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/settings/virtual_backgrounds?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client .post( &url, Some(reqwest::Body::from(serde_json::to_vec(body).unwrap())), ) .await } /** * Delete virtual background files. * * This function performs a `DELETE` to the `/groups/{groupId}/settings/virtual_backgrounds` endpoint. * * Delete existing virtual background file(s) from an account. * * **Prerequisites:**<br> * * 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. * <br> **Scope:** `group:write:admin`<br><br> * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br> * * * * **Parameters:** * * * `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. * * `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. */ pub async fn del_group_vb(&self, file_ids: &str, group_id: &str) -> Result<()> { let mut query = String::new(); let mut query_args: Vec<String> = Default::default(); if !file_ids.is_empty() { query_args.push(format!("file_ids={}", file_ids)); } for (i, n) in query_args.iter().enumerate() { if i > 0 { query.push('&'); } query.push_str(n); } let url = format!( "/groups/{}/settings/virtual_backgrounds?{}", crate::progenitor_support::encode_path(&group_id.to_string()), query ); self.client.delete(&url, None).await } }