Skip to content

Commit f66440d

Browse files
docs: [google-apps-chat] update Chat API comments (#12694)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 633320855 Source-Link: googleapis/googleapis@6cac6e4 Source-Link: googleapis/googleapis-gen@d5f80f5 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwcHMtY2hhdC8uT3dsQm90LnlhbWwiLCJoIjoiZDVmODBmNTA2ZGQzYjcyOTdjNWY5MmJjMmRjNzkyYTExYjdmYjM4NyJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 60d6bd9 commit f66440d

8 files changed

Lines changed: 145 additions & 98 deletions

File tree

packages/google-apps-chat/google/apps/chat_v1/services/chat_service/async_client.py

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,9 @@ async def create_message(
313313
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
314314
metadata: Sequence[Tuple[str, str]] = (),
315315
) -> gc_message.Message:
316-
r"""Creates a message in a Google Chat space. For an example, see
317-
`Send a
316+
r"""Creates a message in a Google Chat space. The maximum message
317+
size, including text and cards, is 32,000 bytes. For an example,
318+
see `Send a
318319
message <https://developers.google.com/workspace/chat/create-messages>`__.
319320
320321
Calling this method requires
@@ -769,8 +770,9 @@ async def sample_get_membership():
769770
name (:class:`str`):
770771
Required. Resource name of the membership to retrieve.
771772
772-
To get the app's own membership, you can optionally use
773-
``spaces/{space}/members/app``.
773+
To get the app's own membership `by using user
774+
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__,
775+
you can optionally use ``spaces/{space}/members/app``.
774776
775777
Format: ``spaces/{space}/members/{member}`` or
776778
``spaces/{space}/members/app``
@@ -1572,7 +1574,7 @@ async def sample_get_space():
15721574
The request object. A request to return a single space.
15731575
name (:class:`str`):
15741576
Required. Resource name of the space, in the form
1575-
"spaces/*".
1577+
`spaces/*`.
15761578
15771579
Format: ``spaces/{space}``
15781580
@@ -1773,19 +1775,19 @@ async def set_up_space(
17731775
members <https://developers.google.com/workspace/chat/set-up-spaces>`__.
17741776
17751777
To specify the human members to add, add memberships with the
1776-
appropriate ``member.name`` in the ``SetUpSpaceRequest``. To add
1777-
a human user, use ``users/{user}``, where ``{user}`` can be the
1778-
email address for the user. For users in the same Workspace
1779-
organization ``{user}`` can also be the ``id`` for the person
1780-
from the People API, or the ``id`` for the user in the Directory
1781-
API. For example, if the People API Person profile ID for
1778+
appropriate ``membership.member.name``. To add a human user, use
1779+
``users/{user}``, where ``{user}`` can be the email address for
1780+
the user. For users in the same Workspace organization
1781+
``{user}`` can also be the ``id`` for the person from the People
1782+
API, or the ``id`` for the user in the Directory API. For
1783+
example, if the People API Person profile ID for
17821784
``user@example.com`` is ``123456789``, you can add the user to
17831785
the space by setting the ``membership.member.name`` to
17841786
``users/user@example.com`` or ``users/123456789``.
17851787
1786-
For a space or group chat, if the caller blocks or is blocked by
1787-
some members, then those members aren't added to the created
1788-
space.
1788+
For a named space or group chat, if the caller blocks, or is
1789+
blocked by some members, or doesn't have permission to add some
1790+
members, then those members aren't added to the created space.
17891791
17901792
To create a direct message (DM) between the calling user and
17911793
another human user, specify exactly one membership to represent
@@ -2365,7 +2367,7 @@ async def create_membership(
23652367
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
23662368
23672369
To specify the member to add, set the ``membership.member.name``
2368-
in the ``CreateMembershipRequest``:
2370+
for the human or app member.
23692371
23702372
- To add the calling app to a space or a direct message between
23712373
two human users, use ``users/app``. Unable to add other apps
@@ -2519,8 +2521,12 @@ async def update_membership(
25192521
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
25202522
metadata: Sequence[Tuple[str, str]] = (),
25212523
) -> gc_membership.Membership:
2522-
r"""Updates a membership. Requires `user
2523-
authentication <https://developers.google.com/chat/api/guides/auth/users>`__.
2524+
r"""Updates a membership. For an example, see `Update a user's
2525+
membership in a
2526+
space <https://developers.google.com/workspace/chat/update-members>`__.
2527+
2528+
Requires `user
2529+
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
25242530
25252531
.. code-block:: python
25262532
@@ -3114,7 +3120,9 @@ async def get_space_read_state(
31143120
metadata: Sequence[Tuple[str, str]] = (),
31153121
) -> space_read_state.SpaceReadState:
31163122
r"""Returns details about a user's read state within a space, used
3117-
to identify read and unread messages.
3123+
to identify read and unread messages. For an example, see `Get
3124+
details about a user's space read
3125+
state <https://developers.google.com/workspace/chat/get-space-read-state>`__.
31183126
31193127
Requires `user
31203128
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
@@ -3243,7 +3251,9 @@ async def update_space_read_state(
32433251
metadata: Sequence[Tuple[str, str]] = (),
32443252
) -> gc_space_read_state.SpaceReadState:
32453253
r"""Updates a user's read state within a space, used to identify
3246-
read and unread messages.
3254+
read and unread messages. For an example, see `Update a user's
3255+
space read
3256+
state <https://developers.google.com/workspace/chat/update-space-read-state>`__.
32473257
32483258
Requires `user
32493259
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
@@ -3394,7 +3404,9 @@ async def get_thread_read_state(
33943404
metadata: Sequence[Tuple[str, str]] = (),
33953405
) -> thread_read_state.ThreadReadState:
33963406
r"""Returns details about a user's read state within a thread, used
3397-
to identify read and unread messages.
3407+
to identify read and unread messages. For an example, see `Get
3408+
details about a user's thread read
3409+
state <https://developers.google.com/workspace/chat/get-thread-read-state>`__.
33983410
33993411
Requires `user
34003412
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.

packages/google-apps-chat/google/apps/chat_v1/services/chat_service/client.py

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,9 @@ def create_message(
859859
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
860860
metadata: Sequence[Tuple[str, str]] = (),
861861
) -> gc_message.Message:
862-
r"""Creates a message in a Google Chat space. For an example, see
863-
`Send a
862+
r"""Creates a message in a Google Chat space. The maximum message
863+
size, including text and cards, is 32,000 bytes. For an example,
864+
see `Send a
864865
message <https://developers.google.com/workspace/chat/create-messages>`__.
865866
866867
Calling this method requires
@@ -1306,8 +1307,9 @@ def sample_get_membership():
13061307
name (str):
13071308
Required. Resource name of the membership to retrieve.
13081309
1309-
To get the app's own membership, you can optionally use
1310-
``spaces/{space}/members/app``.
1310+
To get the app's own membership `by using user
1311+
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__,
1312+
you can optionally use ``spaces/{space}/members/app``.
13111313
13121314
Format: ``spaces/{space}/members/{member}`` or
13131315
``spaces/{space}/members/app``
@@ -2090,7 +2092,7 @@ def sample_get_space():
20902092
The request object. A request to return a single space.
20912093
name (str):
20922094
Required. Resource name of the space, in the form
2093-
"spaces/*".
2095+
`spaces/*`.
20942096
20952097
Format: ``spaces/{space}``
20962098
@@ -2285,19 +2287,19 @@ def set_up_space(
22852287
members <https://developers.google.com/workspace/chat/set-up-spaces>`__.
22862288
22872289
To specify the human members to add, add memberships with the
2288-
appropriate ``member.name`` in the ``SetUpSpaceRequest``. To add
2289-
a human user, use ``users/{user}``, where ``{user}`` can be the
2290-
email address for the user. For users in the same Workspace
2291-
organization ``{user}`` can also be the ``id`` for the person
2292-
from the People API, or the ``id`` for the user in the Directory
2293-
API. For example, if the People API Person profile ID for
2290+
appropriate ``membership.member.name``. To add a human user, use
2291+
``users/{user}``, where ``{user}`` can be the email address for
2292+
the user. For users in the same Workspace organization
2293+
``{user}`` can also be the ``id`` for the person from the People
2294+
API, or the ``id`` for the user in the Directory API. For
2295+
example, if the People API Person profile ID for
22942296
``user@example.com`` is ``123456789``, you can add the user to
22952297
the space by setting the ``membership.member.name`` to
22962298
``users/user@example.com`` or ``users/123456789``.
22972299
2298-
For a space or group chat, if the caller blocks or is blocked by
2299-
some members, then those members aren't added to the created
2300-
space.
2300+
For a named space or group chat, if the caller blocks, or is
2301+
blocked by some members, or doesn't have permission to add some
2302+
members, then those members aren't added to the created space.
23012303
23022304
To create a direct message (DM) between the calling user and
23032305
another human user, specify exactly one membership to represent
@@ -2865,7 +2867,7 @@ def create_membership(
28652867
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
28662868
28672869
To specify the member to add, set the ``membership.member.name``
2868-
in the ``CreateMembershipRequest``:
2870+
for the human or app member.
28692871
28702872
- To add the calling app to a space or a direct message between
28712873
two human users, use ``users/app``. Unable to add other apps
@@ -3016,8 +3018,12 @@ def update_membership(
30163018
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
30173019
metadata: Sequence[Tuple[str, str]] = (),
30183020
) -> gc_membership.Membership:
3019-
r"""Updates a membership. Requires `user
3020-
authentication <https://developers.google.com/chat/api/guides/auth/users>`__.
3021+
r"""Updates a membership. For an example, see `Update a user's
3022+
membership in a
3023+
space <https://developers.google.com/workspace/chat/update-members>`__.
3024+
3025+
Requires `user
3026+
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
30213027
30223028
.. code-block:: python
30233029
@@ -3596,7 +3602,9 @@ def get_space_read_state(
35963602
metadata: Sequence[Tuple[str, str]] = (),
35973603
) -> space_read_state.SpaceReadState:
35983604
r"""Returns details about a user's read state within a space, used
3599-
to identify read and unread messages.
3605+
to identify read and unread messages. For an example, see `Get
3606+
details about a user's space read
3607+
state <https://developers.google.com/workspace/chat/get-space-read-state>`__.
36003608
36013609
Requires `user
36023610
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
@@ -3722,7 +3730,9 @@ def update_space_read_state(
37223730
metadata: Sequence[Tuple[str, str]] = (),
37233731
) -> gc_space_read_state.SpaceReadState:
37243732
r"""Updates a user's read state within a space, used to identify
3725-
read and unread messages.
3733+
read and unread messages. For an example, see `Update a user's
3734+
space read
3735+
state <https://developers.google.com/workspace/chat/update-space-read-state>`__.
37263736
37273737
Requires `user
37283738
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
@@ -3870,7 +3880,9 @@ def get_thread_read_state(
38703880
metadata: Sequence[Tuple[str, str]] = (),
38713881
) -> thread_read_state.ThreadReadState:
38723882
r"""Returns details about a user's read state within a thread, used
3873-
to identify read and unread messages.
3883+
to identify read and unread messages. For an example, see `Get
3884+
details about a user's thread read
3885+
state <https://developers.google.com/workspace/chat/get-thread-read-state>`__.
38743886
38753887
Requires `user
38763888
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.

packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/grpc.py

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,9 @@ def create_message(
252252
) -> Callable[[gc_message.CreateMessageRequest], gc_message.Message]:
253253
r"""Return a callable for the create message method over gRPC.
254254
255-
Creates a message in a Google Chat space. For an example, see
256-
`Send a
255+
Creates a message in a Google Chat space. The maximum message
256+
size, including text and cards, is 32,000 bytes. For an example,
257+
see `Send a
257258
message <https://developers.google.com/workspace/chat/create-messages>`__.
258259
259260
Calling this method requires
@@ -689,19 +690,19 @@ def set_up_space(self) -> Callable[[space_setup.SetUpSpaceRequest], space.Space]
689690
members <https://developers.google.com/workspace/chat/set-up-spaces>`__.
690691
691692
To specify the human members to add, add memberships with the
692-
appropriate ``member.name`` in the ``SetUpSpaceRequest``. To add
693-
a human user, use ``users/{user}``, where ``{user}`` can be the
694-
email address for the user. For users in the same Workspace
695-
organization ``{user}`` can also be the ``id`` for the person
696-
from the People API, or the ``id`` for the user in the Directory
697-
API. For example, if the People API Person profile ID for
693+
appropriate ``membership.member.name``. To add a human user, use
694+
``users/{user}``, where ``{user}`` can be the email address for
695+
the user. For users in the same Workspace organization
696+
``{user}`` can also be the ``id`` for the person from the People
697+
API, or the ``id`` for the user in the Directory API. For
698+
example, if the People API Person profile ID for
698699
``user@example.com`` is ``123456789``, you can add the user to
699700
the space by setting the ``membership.member.name`` to
700701
``users/user@example.com`` or ``users/123456789``.
701702
702-
For a space or group chat, if the caller blocks or is blocked by
703-
some members, then those members aren't added to the created
704-
space.
703+
For a named space or group chat, if the caller blocks, or is
704+
blocked by some members, or doesn't have permission to add some
705+
members, then those members aren't added to the created space.
705706
706707
To create a direct message (DM) between the calling user and
707708
another human user, specify exactly one membership to represent
@@ -906,7 +907,7 @@ def create_membership(
906907
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
907908
908909
To specify the member to add, set the ``membership.member.name``
909-
in the ``CreateMembershipRequest``:
910+
for the human or app member.
910911
911912
- To add the calling app to a space or a direct message between
912913
two human users, use ``users/app``. Unable to add other apps
@@ -946,8 +947,12 @@ def update_membership(
946947
) -> Callable[[gc_membership.UpdateMembershipRequest], gc_membership.Membership]:
947948
r"""Return a callable for the update membership method over gRPC.
948949
949-
Updates a membership. Requires `user
950-
authentication <https://developers.google.com/chat/api/guides/auth/users>`__.
950+
Updates a membership. For an example, see `Update a user's
951+
membership in a
952+
space <https://developers.google.com/workspace/chat/update-members>`__.
953+
954+
Requires `user
955+
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
951956
952957
Returns:
953958
Callable[[~.UpdateMembershipRequest],
@@ -1097,7 +1102,9 @@ def get_space_read_state(
10971102
r"""Return a callable for the get space read state method over gRPC.
10981103
10991104
Returns details about a user's read state within a space, used
1100-
to identify read and unread messages.
1105+
to identify read and unread messages. For an example, see `Get
1106+
details about a user's space read
1107+
state <https://developers.google.com/workspace/chat/get-space-read-state>`__.
11011108
11021109
Requires `user
11031110
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
@@ -1130,7 +1137,9 @@ def update_space_read_state(
11301137
r"""Return a callable for the update space read state method over gRPC.
11311138
11321139
Updates a user's read state within a space, used to identify
1133-
read and unread messages.
1140+
read and unread messages. For an example, see `Update a user's
1141+
space read
1142+
state <https://developers.google.com/workspace/chat/update-space-read-state>`__.
11341143
11351144
Requires `user
11361145
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
@@ -1162,7 +1171,9 @@ def get_thread_read_state(
11621171
r"""Return a callable for the get thread read state method over gRPC.
11631172
11641173
Returns details about a user's read state within a thread, used
1165-
to identify read and unread messages.
1174+
to identify read and unread messages. For an example, see `Get
1175+
details about a user's thread read
1176+
state <https://developers.google.com/workspace/chat/get-thread-read-state>`__.
11661177
11671178
Requires `user
11681179
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.

0 commit comments

Comments
 (0)