Skip to content

Commit e99879b

Browse files
feat: [chat] update Nodejs generator to send API versions in headers for GAPICs (#5345)
* docs: update Chat API comments PiperOrigin-RevId: 633320855 Source-Link: googleapis/googleapis@6cac6e4 Source-Link: googleapis/googleapis-gen@d5f80f5 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNoYXQvLk93bEJvdC55YW1sIiwiaCI6ImQ1ZjgwZjUwNmRkM2I3Mjk3YzVmOTJiYzJkYzc5MmExMWI3ZmIzODcifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: update Nodejs generator to send API versions in headers for GAPICs PiperOrigin-RevId: 634109303 Source-Link: googleapis/googleapis@998ade8 Source-Link: googleapis/googleapis-gen@000ca6f Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNoYXQvLk93bEJvdC55YW1sIiwiaCI6IjAwMGNhNmYwMDgwMWY2NWI4NDdlNjAyOWNiMDUxMTE0MDRkZjIxZWMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 0f99f52 commit e99879b

26 files changed

Lines changed: 219 additions & 173 deletions

packages/google-chat/protos/google/chat/v1/action_status.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
2323
option java_multiple_files = true;
2424
option java_outer_classname = "ActionStatusProto";
2525
option java_package = "com.google.chat.v1";
26+
option objc_class_prefix = "DYNAPIProto";
2627
option php_namespace = "Google\\Apps\\Chat\\V1";
2728
option ruby_package = "Google::Apps::Chat::V1";
2829

packages/google-chat/protos/google/chat/v1/annotation.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ syntax = "proto3";
1616

1717
package google.chat.v1;
1818

19+
import "google/api/resource.proto";
1920
import "google/chat/v1/attachment.proto";
2021
import "google/chat/v1/user.proto";
2122

@@ -24,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
2425
option java_multiple_files = true;
2526
option java_outer_classname = "AnnotationProto";
2627
option java_package = "com.google.chat.v1";
28+
option objc_class_prefix = "DYNAPIProto";
2729
option php_namespace = "Google\\Apps\\Chat\\V1";
2830
option ruby_package = "Google::Apps::Chat::V1";
2931

packages/google-chat/protos/google/chat/v1/attachment.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
2424
option java_multiple_files = true;
2525
option java_outer_classname = "AttachmentProto";
2626
option java_package = "com.google.chat.v1";
27+
option objc_class_prefix = "DYNAPIProto";
2728
option php_namespace = "Google\\Apps\\Chat\\V1";
2829
option ruby_package = "Google::Apps::Chat::V1";
2930

packages/google-chat/protos/google/chat/v1/chat_service.proto

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
3333
option java_multiple_files = true;
3434
option java_outer_classname = "ChatServiceProto";
3535
option java_package = "com.google.chat.v1";
36+
option objc_class_prefix = "DYNAPIProto";
3637
option php_namespace = "Google\\Apps\\Chat\\V1";
3738
option ruby_package = "Google::Apps::Chat::V1";
3839

@@ -59,7 +60,8 @@ service ChatService {
5960
"https://www.googleapis.com/auth/chat.users.readstate,"
6061
"https://www.googleapis.com/auth/chat.users.readstate.readonly";
6162

62-
// Creates a message in a Google Chat space. For an example, see [Send a
63+
// Creates a message in a Google Chat space. The maximum message size,
64+
// including text and cards, is 32,000 bytes. For an example, see [Send a
6365
// message](https://developers.google.com/workspace/chat/create-messages).
6466
//
6567
// Calling this method requires
@@ -250,6 +252,7 @@ service ChatService {
250252
//
251253
// Lists spaces visible to the caller or authenticated user. Group chats
252254
// and DMs aren't listed until the first message is sent.
255+
//
253256
rpc ListSpaces(ListSpacesRequest) returns (ListSpacesResponse) {
254257
option (google.api.http) = {
255258
get: "/v1/spaces"
@@ -300,17 +303,17 @@ service ChatService {
300303
// members](https://developers.google.com/workspace/chat/set-up-spaces).
301304
//
302305
// To specify the human members to add, add memberships with the appropriate
303-
// `member.name` in the `SetUpSpaceRequest`. To add a human user, use
304-
// `users/{user}`, where `{user}` can be the email address for the user. For
305-
// users in the same Workspace organization `{user}` can also be the `id` for
306-
// the person from the People API, or the `id` for the user in the Directory
307-
// API. For example, if the People API Person profile ID for
308-
// `user@example.com` is `123456789`, you can add the user to the space by
309-
// setting the `membership.member.name` to `users/user@example.com` or
310-
// `users/123456789`.
311-
//
312-
// For a space or group chat, if the caller blocks or is blocked by some
313-
// members, then those members aren't added to the created space.
306+
// `membership.member.name`. To add a human user, use `users/{user}`, where
307+
// `{user}` can be the email address for the user. For users in the same
308+
// Workspace organization `{user}` can also be the `id` for the person from
309+
// the People API, or the `id` for the user in the Directory API. For example,
310+
// if the People API Person profile ID for `user@example.com` is `123456789`,
311+
// you can add the user to the space by setting the `membership.member.name`
312+
// to `users/user@example.com` or `users/123456789`.
313+
//
314+
// For a named space or group chat, if the caller blocks, or is blocked
315+
// by some members, or doesn't have permission to add some members, then
316+
// those members aren't added to the created space.
314317
//
315318
// To create a direct message (DM) between the calling user and another human
316319
// user, specify exactly one membership to represent the human user. If
@@ -423,8 +426,8 @@ service ChatService {
423426
// directly to the specified space. Requires [user
424427
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
425428
//
426-
// To specify the member to add, set the `membership.member.name` in the
427-
// `CreateMembershipRequest`:
429+
// To specify the member to add, set the `membership.member.name` for the
430+
// human or app member.
428431
//
429432
// - To add the calling app to a space or a direct message between two human
430433
// users, use `users/app`. Unable to add other
@@ -445,8 +448,11 @@ service ChatService {
445448
option (google.api.method_signature) = "parent,membership";
446449
}
447450

448-
// Updates a membership. Requires [user
449-
// authentication](https://developers.google.com/chat/api/guides/auth/users).
451+
// Updates a membership. For an example, see [Update a user's membership in
452+
// a space](https://developers.google.com/workspace/chat/update-members).
453+
//
454+
// Requires [user
455+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
450456
rpc UpdateMembership(UpdateMembershipRequest) returns (Membership) {
451457
option (google.api.http) = {
452458
patch: "/v1/{membership.name=spaces/*/members/*}"
@@ -508,7 +514,9 @@ service ChatService {
508514
}
509515

510516
// Returns details about a user's read state within a space, used to identify
511-
// read and unread messages.
517+
// read and unread messages. For an example, see [Get details about a user's
518+
// space read
519+
// state](https://developers.google.com/workspace/chat/get-space-read-state).
512520
//
513521
// Requires [user
514522
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
@@ -520,7 +528,8 @@ service ChatService {
520528
}
521529

522530
// Updates a user's read state within a space, used to identify read and
523-
// unread messages.
531+
// unread messages. For an example, see [Update a user's space read
532+
// state](https://developers.google.com/workspace/chat/update-space-read-state).
524533
//
525534
// Requires [user
526535
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
@@ -534,7 +543,9 @@ service ChatService {
534543
}
535544

536545
// Returns details about a user's read state within a thread, used to identify
537-
// read and unread messages.
546+
// read and unread messages. For an example, see [Get details about a user's
547+
// thread read
548+
// state](https://developers.google.com/workspace/chat/get-thread-read-state).
538549
//
539550
// Requires [user
540551
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

packages/google-chat/protos/google/chat/v1/contextual_addon.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
2323
option java_multiple_files = true;
2424
option java_outer_classname = "ContextualAddOnProto";
2525
option java_package = "com.google.chat.v1";
26+
option objc_class_prefix = "DYNAPIProto";
2627
option php_namespace = "Google\\Apps\\Chat\\V1";
2728
option ruby_package = "Google::Apps::Chat::V1";
2829

packages/google-chat/protos/google/chat/v1/deletion_metadata.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
2121
option java_multiple_files = true;
2222
option java_outer_classname = "DeletionMetadataProto";
2323
option java_package = "com.google.chat.v1";
24+
option objc_class_prefix = "DYNAPIProto";
2425
option php_namespace = "Google\\Apps\\Chat\\V1";
2526
option ruby_package = "Google::Apps::Chat::V1";
2627

packages/google-chat/protos/google/chat/v1/group.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
2121
option java_multiple_files = true;
2222
option java_outer_classname = "GroupProto";
2323
option java_package = "com.google.chat.v1";
24+
option objc_class_prefix = "DYNAPIProto";
2425
option php_namespace = "Google\\Apps\\Chat\\V1";
2526
option ruby_package = "Google::Apps::Chat::V1";
2627

packages/google-chat/protos/google/chat/v1/history_state.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
2121
option java_multiple_files = true;
2222
option java_outer_classname = "HistoryStateProto";
2323
option java_package = "com.google.chat.v1";
24+
option objc_class_prefix = "DYNAPIProto";
2425
option php_namespace = "Google\\Apps\\Chat\\V1";
2526
option ruby_package = "Google::Apps::Chat::V1";
2627

packages/google-chat/protos/google/chat/v1/matched_url.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
2323
option java_multiple_files = true;
2424
option java_outer_classname = "MatchedUrlProto";
2525
option java_package = "com.google.chat.v1";
26+
option objc_class_prefix = "DYNAPIProto";
2627
option php_namespace = "Google\\Apps\\Chat\\V1";
2728
option ruby_package = "Google::Apps::Chat::V1";
2829

packages/google-chat/protos/google/chat/v1/membership.proto

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
2828
option java_multiple_files = true;
2929
option java_outer_classname = "MembershipProto";
3030
option java_package = "com.google.chat.v1";
31+
option objc_class_prefix = "DYNAPIProto";
3132
option php_namespace = "Google\\Apps\\Chat\\V1";
3233
option ruby_package = "Google::Apps::Chat::V1";
3334

@@ -105,8 +106,8 @@ message Membership {
105106
User member = 3;
106107

107108
// The Google Group the membership corresponds to.
108-
// Only supports read operations. Other operations, like creating or
109-
// updating a membership, aren't currently supported.
109+
// Only supports read operations. Other operations, like
110+
// creating or updating a membership, aren't currently supported.
110111
Group group_member = 5;
111112
}
112113

@@ -275,8 +276,9 @@ message ListMembershipsResponse {
275276
message GetMembershipRequest {
276277
// Required. Resource name of the membership to retrieve.
277278
//
278-
// To get the app's own membership, you can optionally use
279-
// `spaces/{space}/members/app`.
279+
// To get the app's own membership [by using user
280+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
281+
// you can optionally use `spaces/{space}/members/app`.
280282
//
281283
// Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
282284
//

0 commit comments

Comments
 (0)