|
1 | | -// Copyright 2025 Google LLC |
| 1 | +// Copyright 2026 Google LLC |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -552,6 +552,65 @@ message FindDirectMessageRequest { |
552 | 552 | string name = 1 [(google.api.field_behavior) = REQUIRED]; |
553 | 553 | } |
554 | 554 |
|
| 555 | +// A request to get group chat spaces based on user resources. |
| 556 | +message FindGroupChatsRequest { |
| 557 | + // Optional. Resource names of all human users in group chat with the calling |
| 558 | + // user. Chat apps can't be included in the request. |
| 559 | + // |
| 560 | + // The maximum number of users that can be specified in a single request is |
| 561 | + // `49`. |
| 562 | + // |
| 563 | + // Format: `users/{user}`, where `{user}` is either the `id` for the |
| 564 | + // [person](https://developers.google.com/people/api/rest/v1/people) from the |
| 565 | + // People API, or the `id` for the |
| 566 | + // [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) |
| 567 | + // in the Directory API. For example, to find all group chats with the calling |
| 568 | + // user and two other users, with People API profile IDs `123456789` and |
| 569 | + // `987654321`, you can use `users/123456789` and `users/987654321`. |
| 570 | + // You can also use the email as an alias for `{user}`. For example, |
| 571 | + // `users/[email protected]` where `[email protected]` is the email of the |
| 572 | + // Google Chat user. |
| 573 | + repeated string users = 5 [(google.api.field_behavior) = OPTIONAL]; |
| 574 | + |
| 575 | + // Optional. The maximum number of spaces to return. The service might return |
| 576 | + // fewer than this value. |
| 577 | + // |
| 578 | + // If unspecified, at most 10 spaces are returned. |
| 579 | + // |
| 580 | + // The maximum value is 30. If you use a value more than 30, it's |
| 581 | + // automatically changed to 30. |
| 582 | + // |
| 583 | + // Negative values return an `INVALID_ARGUMENT` error. |
| 584 | + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 585 | + |
| 586 | + // Optional. A page token, received from a previous call to find group chats. |
| 587 | + // Provide this parameter to retrieve the subsequent page. |
| 588 | + // |
| 589 | + // When paginating, all other parameters provided should match the call that |
| 590 | + // provided the token. Passing different values may lead to unexpected |
| 591 | + // results. |
| 592 | + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 593 | + |
| 594 | + // Requested space view type. If unset, defaults to |
| 595 | + // `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify |
| 596 | + // `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data, |
| 597 | + // for example, |
| 598 | + // https://www.googleapis.com/auth/chat.spaces or |
| 599 | + // https://www.googleapis.com/auth/chat.spaces.readonly. |
| 600 | + SpaceView space_view = 4; |
| 601 | +} |
| 602 | + |
| 603 | +// A response containing group chat spaces with exactly the calling user and the |
| 604 | +// requested users. |
| 605 | +message FindGroupChatsResponse { |
| 606 | + // List of spaces in the requested (or first) page. |
| 607 | + repeated Space spaces = 1; |
| 608 | + |
| 609 | + // A token that you can send as `pageToken` to retrieve the next page of |
| 610 | + // results. If empty, there are no subsequent pages. |
| 611 | + string next_page_token = 2; |
| 612 | +} |
| 613 | + |
555 | 614 | // A request to update a single space. |
556 | 615 | message UpdateSpaceRequest { |
557 | 616 | // Required. Space with fields to be updated. `Space.name` must be |
@@ -822,3 +881,24 @@ message CompleteImportSpaceResponse { |
822 | 881 | // The import mode space. |
823 | 882 | Space space = 1; |
824 | 883 | } |
| 884 | + |
| 885 | +// A view that specifies which fields should be populated on the |
| 886 | +// [`Space`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) |
| 887 | +// resource. |
| 888 | +// To ensure compatibility with future releases, we recommend that your code |
| 889 | +// account for additional values. |
| 890 | +enum SpaceView { |
| 891 | + // The default / unset value. |
| 892 | + SPACE_VIEW_UNSPECIFIED = 0; |
| 893 | + |
| 894 | + // Populates only the Space resource name. |
| 895 | + SPACE_VIEW_RESOURCE_NAME_ONLY = 3; |
| 896 | + |
| 897 | + // Populates Space resource fields. Note: the `permissionSettings` field |
| 898 | + // will not be populated. |
| 899 | + // Requests that specify SPACE_VIEW_EXPANDED must include scopes that allow |
| 900 | + // reading space data, for example, |
| 901 | + // https://www.googleapis.com/auth/chat.spaces or |
| 902 | + // https://www.googleapis.com/auth/chat.spaces.readonly. |
| 903 | + SPACE_VIEW_EXPANDED = 4; |
| 904 | +} |
0 commit comments