diff --git a/packages/google-chat/protos/google/chat/v1/action_status.proto b/packages/google-chat/protos/google/chat/v1/action_status.proto index b59b629948e..192022327c3 100644 --- a/packages/google-chat/protos/google/chat/v1/action_status.proto +++ b/packages/google-chat/protos/google/chat/v1/action_status.proto @@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ActionStatusProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/annotation.proto b/packages/google-chat/protos/google/chat/v1/annotation.proto index 4a7115d6068..cdb24119d22 100644 --- a/packages/google-chat/protos/google/chat/v1/annotation.proto +++ b/packages/google-chat/protos/google/chat/v1/annotation.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.chat.v1; +import "google/api/resource.proto"; import "google/chat/v1/attachment.proto"; import "google/chat/v1/user.proto"; @@ -24,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "AnnotationProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/attachment.proto b/packages/google-chat/protos/google/chat/v1/attachment.proto index eb559336f6d..2831a00a1a2 100644 --- a/packages/google-chat/protos/google/chat/v1/attachment.proto +++ b/packages/google-chat/protos/google/chat/v1/attachment.proto @@ -24,6 +24,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "AttachmentProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/chat_service.proto b/packages/google-chat/protos/google/chat/v1/chat_service.proto index 4f7f51864d7..44aed729f93 100644 --- a/packages/google-chat/protos/google/chat/v1/chat_service.proto +++ b/packages/google-chat/protos/google/chat/v1/chat_service.proto @@ -33,6 +33,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ChatServiceProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -59,7 +60,8 @@ service ChatService { "https://www.googleapis.com/auth/chat.users.readstate," "https://www.googleapis.com/auth/chat.users.readstate.readonly"; - // Creates a message in a Google Chat space. For an example, see [Send a + // Creates a message in a Google Chat space. The maximum message size, + // including text and cards, is 32,000 bytes. For an example, see [Send a // message](https://developers.google.com/workspace/chat/create-messages). // // Calling this method requires @@ -250,6 +252,7 @@ service ChatService { // // Lists spaces visible to the caller or authenticated user. Group chats // and DMs aren't listed until the first message is sent. + // rpc ListSpaces(ListSpacesRequest) returns (ListSpacesResponse) { option (google.api.http) = { get: "/v1/spaces" @@ -300,17 +303,17 @@ service ChatService { // members](https://developers.google.com/workspace/chat/set-up-spaces). // // To specify the human members to add, add memberships with the appropriate - // `member.name` in the `SetUpSpaceRequest`. To add a human user, use - // `users/{user}`, where `{user}` can be the email address for the user. For - // users in the same Workspace organization `{user}` can also be the `id` for - // the person from the People API, or the `id` for the user in the Directory - // API. For example, if the People API Person profile ID for - // `user@example.com` is `123456789`, you can add the user to the space by - // setting the `membership.member.name` to `users/user@example.com` or - // `users/123456789`. - // - // For a space or group chat, if the caller blocks or is blocked by some - // members, then those members aren't added to the created space. + // `membership.member.name`. To add a human user, use `users/{user}`, where + // `{user}` can be the email address for the user. For users in the same + // Workspace organization `{user}` can also be the `id` for the person from + // the People API, or the `id` for the user in the Directory API. For example, + // if the People API Person profile ID for `user@example.com` is `123456789`, + // you can add the user to the space by setting the `membership.member.name` + // to `users/user@example.com` or `users/123456789`. + // + // For a named space or group chat, if the caller blocks, or is blocked + // by some members, or doesn't have permission to add some members, then + // those members aren't added to the created space. // // To create a direct message (DM) between the calling user and another human // user, specify exactly one membership to represent the human user. If @@ -423,8 +426,8 @@ service ChatService { // directly to the specified space. Requires [user // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). // - // To specify the member to add, set the `membership.member.name` in the - // `CreateMembershipRequest`: + // To specify the member to add, set the `membership.member.name` for the + // human or app member. // // - To add the calling app to a space or a direct message between two human // users, use `users/app`. Unable to add other @@ -445,8 +448,11 @@ service ChatService { option (google.api.method_signature) = "parent,membership"; } - // Updates a membership. Requires [user - // authentication](https://developers.google.com/chat/api/guides/auth/users). + // Updates a membership. For an example, see [Update a user's membership in + // a space](https://developers.google.com/workspace/chat/update-members). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). rpc UpdateMembership(UpdateMembershipRequest) returns (Membership) { option (google.api.http) = { patch: "/v1/{membership.name=spaces/*/members/*}" @@ -508,7 +514,9 @@ service ChatService { } // Returns details about a user's read state within a space, used to identify - // read and unread messages. + // read and unread messages. For an example, see [Get details about a user's + // space read + // state](https://developers.google.com/workspace/chat/get-space-read-state). // // Requires [user // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -520,7 +528,8 @@ service ChatService { } // Updates a user's read state within a space, used to identify read and - // unread messages. + // unread messages. For an example, see [Update a user's space read + // state](https://developers.google.com/workspace/chat/update-space-read-state). // // Requires [user // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -534,7 +543,9 @@ service ChatService { } // Returns details about a user's read state within a thread, used to identify - // read and unread messages. + // read and unread messages. For an example, see [Get details about a user's + // thread read + // state](https://developers.google.com/workspace/chat/get-thread-read-state). // // Requires [user // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). diff --git a/packages/google-chat/protos/google/chat/v1/contextual_addon.proto b/packages/google-chat/protos/google/chat/v1/contextual_addon.proto index 9c0266e91e1..9daa7346c38 100644 --- a/packages/google-chat/protos/google/chat/v1/contextual_addon.proto +++ b/packages/google-chat/protos/google/chat/v1/contextual_addon.proto @@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ContextualAddOnProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/deletion_metadata.proto b/packages/google-chat/protos/google/chat/v1/deletion_metadata.proto index d0210b37c71..4b208755efc 100644 --- a/packages/google-chat/protos/google/chat/v1/deletion_metadata.proto +++ b/packages/google-chat/protos/google/chat/v1/deletion_metadata.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "DeletionMetadataProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/group.proto b/packages/google-chat/protos/google/chat/v1/group.proto index 74aa5acae00..068828e3ba3 100644 --- a/packages/google-chat/protos/google/chat/v1/group.proto +++ b/packages/google-chat/protos/google/chat/v1/group.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "GroupProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/history_state.proto b/packages/google-chat/protos/google/chat/v1/history_state.proto index 2f7110c67bd..41828c8a7ec 100644 --- a/packages/google-chat/protos/google/chat/v1/history_state.proto +++ b/packages/google-chat/protos/google/chat/v1/history_state.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "HistoryStateProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/matched_url.proto b/packages/google-chat/protos/google/chat/v1/matched_url.proto index 27a08a5338f..89c95c635cc 100644 --- a/packages/google-chat/protos/google/chat/v1/matched_url.proto +++ b/packages/google-chat/protos/google/chat/v1/matched_url.proto @@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "MatchedUrlProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/membership.proto b/packages/google-chat/protos/google/chat/v1/membership.proto index 698e0faf46e..8751f7d6c92 100644 --- a/packages/google-chat/protos/google/chat/v1/membership.proto +++ b/packages/google-chat/protos/google/chat/v1/membership.proto @@ -28,6 +28,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "MembershipProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -105,8 +106,8 @@ message Membership { User member = 3; // The Google Group the membership corresponds to. - // Only supports read operations. Other operations, like creating or - // updating a membership, aren't currently supported. + // Only supports read operations. Other operations, like + // creating or updating a membership, aren't currently supported. Group group_member = 5; } @@ -275,8 +276,9 @@ message ListMembershipsResponse { message GetMembershipRequest { // Required. Resource name of the membership to retrieve. // - // To get the app's own membership, you can optionally use - // `spaces/{space}/members/app`. + // To get the app's own membership [by using user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + // you can optionally use `spaces/{space}/members/app`. // // Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` // diff --git a/packages/google-chat/protos/google/chat/v1/message.proto b/packages/google-chat/protos/google/chat/v1/message.proto index 77d0b63d47d..ca6a432c83e 100644 --- a/packages/google-chat/protos/google/chat/v1/message.proto +++ b/packages/google-chat/protos/google/chat/v1/message.proto @@ -37,6 +37,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "MessageProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/reaction.proto b/packages/google-chat/protos/google/chat/v1/reaction.proto index c0623301464..9639b1f5b29 100644 --- a/packages/google-chat/protos/google/chat/v1/reaction.proto +++ b/packages/google-chat/protos/google/chat/v1/reaction.proto @@ -25,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ReactionProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -61,8 +62,8 @@ message Emoji { // Represents a custom emoji. message CustomEmoji { - // Unique key for the custom emoji resource. - string uid = 1; + // Output only. Unique key for the custom emoji resource. + string uid = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The number of people who reacted to a message with a specific emoji. diff --git a/packages/google-chat/protos/google/chat/v1/slash_command.proto b/packages/google-chat/protos/google/chat/v1/slash_command.proto index a7ce686ffa7..75f21354955 100644 --- a/packages/google-chat/protos/google/chat/v1/slash_command.proto +++ b/packages/google-chat/protos/google/chat/v1/slash_command.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "SlashCommandProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/space.proto b/packages/google-chat/protos/google/chat/v1/space.proto index 61db5b05ee7..b5fa106f6ed 100644 --- a/packages/google-chat/protos/google/chat/v1/space.proto +++ b/packages/google-chat/protos/google/chat/v1/space.proto @@ -27,6 +27,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "SpaceProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -184,13 +185,12 @@ message Space { (google.api.field_behavior) = OPTIONAL ]; - // Output only. Whether the Chat app was installed by a Google Workspace - // administrator. Administrators can install a Chat app for their domain, - // organizational unit, or a group of users. + // Output only. For direct message (DM) spaces with a Chat app, whether the + // space was created by a Google Workspace administrator. Administrators can + // install and set up a direct message with a Chat app on behalf of users in + // their organization. // - // Administrators can only install Chat apps for direct messaging between - // users and the app. To support admin install, your app must feature direct - // messaging. + // To support admin install, your Chat app must feature direct messaging. bool admin_installed = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-chat/protos/google/chat/v1/space_read_state.proto b/packages/google-chat/protos/google/chat/v1/space_read_state.proto index 014cecacf67..24c4f56b861 100644 --- a/packages/google-chat/protos/google/chat/v1/space_read_state.proto +++ b/packages/google-chat/protos/google/chat/v1/space_read_state.proto @@ -26,6 +26,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "SpaceReadStateProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/space_setup.proto b/packages/google-chat/protos/google/chat/v1/space_setup.proto index eb04a4e1a14..17e42269e12 100644 --- a/packages/google-chat/protos/google/chat/v1/space_setup.proto +++ b/packages/google-chat/protos/google/chat/v1/space_setup.proto @@ -25,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "SpaceSetupProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -68,14 +69,14 @@ message SetUpSpaceRequest { // // The set currently allows up to 20 memberships (in addition to the caller). // - // The `Membership.member` field must contain a `user` with `name` populated - // (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - // add human users when setting up a space (adding Chat apps is only supported - // for direct message setup with the calling app). You can also add members - // using the user's email as an alias for {user}. For example, the `user.name` - // can be `users/example@gmail.com`." To invite Gmail users or users from - // external Google Workspace domains, user's email must be used for - // `{user}`. + // For human membership, the `Membership.member` field must contain a `user` + // with `name` populated (format: `users/{user}`) and `type` set to + // `User.Type.HUMAN`. You can only add human users when setting up a space + // (adding Chat apps is only supported for direct message setup with the + // calling app). You can also add members using the user's email as an alias + // for {user}. For example, the `user.name` can be `users/example@gmail.com`. + // To invite Gmail users or users from external Google Workspace domains, + // user's email must be used for `{user}`. // // Optional when setting `Space.spaceType` to `SPACE`. // diff --git a/packages/google-chat/protos/google/chat/v1/thread_read_state.proto b/packages/google-chat/protos/google/chat/v1/thread_read_state.proto index 65b59becf6f..38c86feb7b3 100644 --- a/packages/google-chat/protos/google/chat/v1/thread_read_state.proto +++ b/packages/google-chat/protos/google/chat/v1/thread_read_state.proto @@ -25,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ThreadReadStateProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/user.proto b/packages/google-chat/protos/google/chat/v1/user.proto index a292853934e..8e02de7608f 100644 --- a/packages/google-chat/protos/google/chat/v1/user.proto +++ b/packages/google-chat/protos/google/chat/v1/user.proto @@ -24,6 +24,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "UserProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/google/chat/v1/widgets.proto b/packages/google-chat/protos/google/chat/v1/widgets.proto index 426a6e7af24..c28c969fec6 100644 --- a/packages/google-chat/protos/google/chat/v1/widgets.proto +++ b/packages/google-chat/protos/google/chat/v1/widgets.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "WidgetsProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/packages/google-chat/protos/protos.d.ts b/packages/google-chat/protos/protos.d.ts index 5dae676f5e7..c0c9cb8776e 100644 --- a/packages/google-chat/protos/protos.d.ts +++ b/packages/google-chat/protos/protos.d.ts @@ -3057,11 +3057,11 @@ export namespace google { /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - /** FieldOptions .google.api.resourceReference */ ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); } /** Represents a FieldOptions. */ @@ -19372,19 +19372,6 @@ export namespace google { /** Namespace api. */ namespace api { - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - /** Properties of a ResourceDescriptor. */ interface IResourceDescriptor { @@ -19637,6 +19624,19 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + /** Properties of a Http. */ interface IHttp { diff --git a/packages/google-chat/protos/protos.js b/packages/google-chat/protos/protos.js index de28a9075fe..24fdc8b5342 100644 --- a/packages/google-chat/protos/protos.js +++ b/packages/google-chat/protos/protos.js @@ -8072,8 +8072,8 @@ * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior */ /** @@ -8200,20 +8200,20 @@ FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** * Creates a new FieldOptions instance using the specified properties. @@ -8373,6 +8373,10 @@ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } case 1052: { if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) message[".google.api.fieldBehavior"] = []; @@ -8384,10 +8388,6 @@ message[".google.api.fieldBehavior"].push(reader.int32()); break; } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -8511,6 +8511,11 @@ return "uninterpretedOption." + error; } } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { if (!Array.isArray(message[".google.api.fieldBehavior"])) return ".google.api.fieldBehavior: array expected"; @@ -8530,11 +8535,6 @@ break; } } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } return null; }; @@ -8700,6 +8700,11 @@ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } if (object[".google.api.fieldBehavior"]) { if (!Array.isArray(object[".google.api.fieldBehavior"])) throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); @@ -8749,11 +8754,6 @@ break; } } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } return message; }; @@ -49529,34 +49529,6 @@ */ var api = {}; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - api.ResourceDescriptor = (function() { /** @@ -50241,6 +50213,34 @@ return ResourceReference; })(); + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + api.Http = (function() { /** diff --git a/packages/google-chat/protos/protos.json b/packages/google-chat/protos/protos.json index be67db48856..a0837f051d2 100644 --- a/packages/google-chat/protos/protos.json +++ b/packages/google-chat/protos/protos.json @@ -2411,6 +2411,7 @@ "java_multiple_files": true, "java_outer_classname": "ThreadReadStateProto", "java_package": "com.google.chat.v1", + "objc_class_prefix": "DYNAPIProto", "php_namespace": "Google\\Apps\\Chat\\V1", "ruby_package": "Google::Apps::Chat::V1" }, @@ -4377,7 +4378,10 @@ "fields": { "uid": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -4887,33 +4891,14 @@ }, "api": { "options": { + "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/api;api", "java_multiple_files": true, "java_outer_classname": "LaunchStageProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -4991,6 +4976,25 @@ } } }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, "http": { "type": "HttpRule", "id": 72295728, diff --git a/packages/google-chat/samples/generated/v1/chat_service.get_membership.js b/packages/google-chat/samples/generated/v1/chat_service.get_membership.js index 6829e114324..4a049ade044 100644 --- a/packages/google-chat/samples/generated/v1/chat_service.get_membership.js +++ b/packages/google-chat/samples/generated/v1/chat_service.get_membership.js @@ -30,8 +30,9 @@ function main(name) { */ /** * Required. Resource name of the membership to retrieve. - * To get the app's own membership, you can optionally use - * `spaces/{space}/members/app`. + * To get the app's own membership by using user + * authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can optionally use `spaces/{space}/members/app`. * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` * When authenticated as a * user (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), diff --git a/packages/google-chat/samples/generated/v1/chat_service.set_up_space.js b/packages/google-chat/samples/generated/v1/chat_service.set_up_space.js index f713d23bdf9..ba3ae09de3f 100644 --- a/packages/google-chat/samples/generated/v1/chat_service.set_up_space.js +++ b/packages/google-chat/samples/generated/v1/chat_service.set_up_space.js @@ -62,14 +62,14 @@ function main(space) { * Optional. The Google Chat users to invite to join the space. Omit the * calling user, as they are added automatically. * The set currently allows up to 20 memberships (in addition to the caller). - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * Optional when setting `Space.spaceType` to `SPACE`. * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at * least two memberships. diff --git a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json index 1e35701bbd7..60d10d7434b 100644 --- a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json +++ b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json @@ -15,7 +15,7 @@ "regionTag": "chat_v1_generated_ChatService_CreateMessage_async", "title": "ChatService createMessage Sample", "origin": "API_DEFINITION", - "description": " Creates a message in a Google Chat space. For an example, see [Send a message](https://developers.google.com/workspace/chat/create-messages). Calling this method requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.)", + "description": " Creates a message in a Google Chat space. The maximum message size, including text and cards, is 32,000 bytes. For an example, see [Send a message](https://developers.google.com/workspace/chat/create-messages). Calling this method requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.)", "canonical": true, "file": "chat_service.create_message.js", "language": "JAVASCRIPT", @@ -202,7 +202,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 62, "type": "FULL" } ], @@ -583,7 +583,7 @@ "regionTag": "chat_v1_generated_ChatService_SetUpSpace_async", "title": "ChatService setUpSpace Sample", "origin": "API_DEFINITION", - "description": " Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space with initial members](https://developers.google.com/workspace/chat/set-up-spaces). To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [Invite or add a user or app to a space](https://developers.google.com/workspace/chat/create-members). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", + "description": " Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space with initial members](https://developers.google.com/workspace/chat/set-up-spaces). To specify the human members to add, add memberships with the appropriate `membership.member.name`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [Invite or add a user or app to a space](https://developers.google.com/workspace/chat/create-members). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "canonical": true, "file": "chat_service.set_up_space.js", "language": "JAVASCRIPT", @@ -795,7 +795,7 @@ "regionTag": "chat_v1_generated_ChatService_CreateMembership_async", "title": "ChatService createMembership Sample", "origin": "API_DEFINITION", - "description": " Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [Invite or add a user or a Google Chat app to a space](https://developers.google.com/workspace/chat/create-members). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`.", + "description": " Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [Invite or add a user or a Google Chat app to a space](https://developers.google.com/workspace/chat/create-members). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To specify the member to add, set the `membership.member.name` for the human or app member. - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`.", "canonical": true, "file": "chat_service.create_membership.js", "language": "JAVASCRIPT", @@ -839,7 +839,7 @@ "regionTag": "chat_v1_generated_ChatService_UpdateMembership_async", "title": "ChatService updateMembership Sample", "origin": "API_DEFINITION", - "description": " Updates a membership. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", + "description": " Updates a membership. For an example, see [Update a user's membership in a space](https://developers.google.com/workspace/chat/update-members). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "canonical": true, "file": "chat_service.update_membership.js", "language": "JAVASCRIPT", @@ -1059,7 +1059,7 @@ "regionTag": "chat_v1_generated_ChatService_GetSpaceReadState_async", "title": "ChatService getSpaceReadState Sample", "origin": "API_DEFINITION", - "description": " Returns details about a user's read state within a space, used to identify read and unread messages. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", + "description": " Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see [Get details about a user's space read state](https://developers.google.com/workspace/chat/get-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "canonical": true, "file": "chat_service.get_space_read_state.js", "language": "JAVASCRIPT", @@ -1099,7 +1099,7 @@ "regionTag": "chat_v1_generated_ChatService_UpdateSpaceReadState_async", "title": "ChatService updateSpaceReadState Sample", "origin": "API_DEFINITION", - "description": " Updates a user's read state within a space, used to identify read and unread messages. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", + "description": " Updates a user's read state within a space, used to identify read and unread messages. For an example, see [Update a user's space read state](https://developers.google.com/workspace/chat/update-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "canonical": true, "file": "chat_service.update_space_read_state.js", "language": "JAVASCRIPT", @@ -1143,7 +1143,7 @@ "regionTag": "chat_v1_generated_ChatService_GetThreadReadState_async", "title": "ChatService getThreadReadState Sample", "origin": "API_DEFINITION", - "description": " Returns details about a user's read state within a thread, used to identify read and unread messages. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", + "description": " Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see [Get details about a user's thread read state](https://developers.google.com/workspace/chat/get-thread-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "canonical": true, "file": "chat_service.get_thread_read_state.js", "language": "JAVASCRIPT", diff --git a/packages/google-chat/src/v1/chat_service_client.ts b/packages/google-chat/src/v1/chat_service_client.ts index a7785ac982e..39177071421 100644 --- a/packages/google-chat/src/v1/chat_service_client.ts +++ b/packages/google-chat/src/v1/chat_service_client.ts @@ -462,7 +462,8 @@ export class ChatServiceClient { // -- Service calls -- // ------------------- /** - * Creates a message in a Google Chat space. For an example, see [Send a + * Creates a message in a Google Chat space. The maximum message size, + * including text and cards, is 32,000 bytes. For an example, see [Send a * message](https://developers.google.com/workspace/chat/create-messages). * * Calling this method requires @@ -606,8 +607,9 @@ export class ChatServiceClient { * @param {string} request.name * Required. Resource name of the membership to retrieve. * - * To get the app's own membership, you can optionally use - * `spaces/{space}/members/app`. + * To get the app's own membership [by using user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can optionally use `spaces/{space}/members/app`. * * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` * @@ -1408,17 +1410,17 @@ export class ChatServiceClient { * members](https://developers.google.com/workspace/chat/set-up-spaces). * * To specify the human members to add, add memberships with the appropriate - * `member.name` in the `SetUpSpaceRequest`. To add a human user, use - * `users/{user}`, where `{user}` can be the email address for the user. For - * users in the same Workspace organization `{user}` can also be the `id` for - * the person from the People API, or the `id` for the user in the Directory - * API. For example, if the People API Person profile ID for - * `user@example.com` is `123456789`, you can add the user to the space by - * setting the `membership.member.name` to `users/user@example.com` or - * `users/123456789`. - * - * For a space or group chat, if the caller blocks or is blocked by some - * members, then those members aren't added to the created space. + * `membership.member.name`. To add a human user, use `users/{user}`, where + * `{user}` can be the email address for the user. For users in the same + * Workspace organization `{user}` can also be the `id` for the person from + * the People API, or the `id` for the user in the Directory API. For example, + * if the People API Person profile ID for `user@example.com` is `123456789`, + * you can add the user to the space by setting the `membership.member.name` + * to `users/user@example.com` or `users/123456789`. + * + * For a named space or group chat, if the caller blocks, or is blocked + * by some members, or doesn't have permission to add some members, then + * those members aren't added to the created space. * * To create a direct message (DM) between the calling user and another human * user, specify exactly one membership to represent the human user. If @@ -1482,14 +1484,14 @@ export class ChatServiceClient { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -2001,8 +2003,8 @@ export class ChatServiceClient { * directly to the specified space. Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * - * To specify the member to add, set the `membership.member.name` in the - * `CreateMembershipRequest`: + * To specify the member to add, set the `membership.member.name` for the + * human or app member. * * - To add the calling app to a space or a direct message between two human * users, use `users/app`. Unable to add other @@ -2116,8 +2118,11 @@ export class ChatServiceClient { return this.innerApiCalls.createMembership(request, options, callback); } /** - * Updates a membership. Requires [user - * authentication](https://developers.google.com/chat/api/guides/auth/users). + * Updates a membership. For an example, see [Update a user's membership in + * a space](https://developers.google.com/workspace/chat/update-members). + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * * @param {Object} request * The request object that will be sent. @@ -2488,7 +2493,9 @@ export class ChatServiceClient { } /** * Returns details about a user's read state within a space, used to identify - * read and unread messages. + * read and unread messages. For an example, see [Get details about a user's + * space read + * state](https://developers.google.com/workspace/chat/get-space-read-state). * * Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -2588,7 +2595,8 @@ export class ChatServiceClient { } /** * Updates a user's read state within a space, used to identify read and - * unread messages. + * unread messages. For an example, see [Update a user's space read + * state](https://developers.google.com/workspace/chat/update-space-read-state). * * Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -2702,7 +2710,9 @@ export class ChatServiceClient { } /** * Returns details about a user's read state within a thread, used to identify - * read and unread messages. + * read and unread messages. For an example, see [Get details about a user's + * thread read + * state](https://developers.google.com/workspace/chat/get-thread-read-state). * * Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -3599,6 +3609,7 @@ export class ChatServiceClient { * Lists spaces visible to the caller or authenticated user. Group chats * and DMs aren't listed until the first message is sent. * + * * @param {Object} request * The request object that will be sent. * @param {number} [request.pageSize]