diff --git a/packages/google-apps-chat/google/apps/chat/gapic_version.py b/packages/google-apps-chat/google/apps/chat/gapic_version.py index 3b0a9d9a8d43..558c8aab67c5 100644 --- a/packages/google-apps-chat/google/apps/chat/gapic_version.py +++ b/packages/google-apps-chat/google/apps/chat/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-chat/google/apps/chat_v1/gapic_version.py b/packages/google-apps-chat/google/apps/chat_v1/gapic_version.py index 3b0a9d9a8d43..558c8aab67c5 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/gapic_version.py +++ b/packages/google-apps-chat/google/apps/chat_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/async_client.py b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/async_client.py index 145b32830455..d53f6e29063f 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/async_client.py +++ b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/async_client.py @@ -299,11 +299,11 @@ async def create_message( metadata: Sequence[Tuple[str, str]] = (), ) -> gc_message.Message: r"""Creates a message in a Google Chat space. For an example, see - `Create a - message `__. + `Send a + message `__. Calling this method requires - `authentication `__ + `authentication `__ and supports the following authentication types: - For text messages, user authentication or app authentication @@ -372,7 +372,7 @@ async def sample_create_message(): same custom ID for different messages. For details, see `Name a - message `__. + message `__. This corresponds to the ``message_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -458,7 +458,7 @@ async def list_messages( including messages from blocked members and spaces. For an example, see `List messages `__. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -508,6 +508,8 @@ async def sample_list_messages(): Returns: google.apps.chat_v1.services.chat_service.pagers.ListMessagesAsyncPager: + Response message for listing + messages. Iterating over this object will yield results and resolve additional pages automatically. @@ -585,23 +587,24 @@ async def list_memberships( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMembershipsAsyncPager: - r"""Lists memberships in a space. For an example, see `List - memberships `__. + r"""Lists memberships in a space. For an example, see `List users + and Google Chat apps in a + space `__. Listing memberships with `app - authentication `__ + authentication `__ lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with `User - authentication `__ + authentication `__ lists memberships in spaces that the authenticated user has access to. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. .. code-block:: python @@ -632,7 +635,8 @@ async def sample_list_memberships(): Args: request (Optional[Union[google.apps.chat_v1.types.ListMembershipsRequest, dict]]): - The request object. + The request object. Request message for listing + memberships. parent (:class:`str`): Required. The resource name of the space for which to fetch a membership @@ -651,6 +655,8 @@ async def sample_list_memberships(): Returns: google.apps.chat_v1.services.chat_service.pagers.ListMembershipsAsyncPager: + Response to list memberships of the + space. Iterating over this object will yield results and resolve additional pages automatically. @@ -728,15 +734,16 @@ async def get_membership( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.Membership: - r"""Returns details about a membership. For an example, see `Get a - membership `__. + r"""Returns details about a membership. For an example, see `Get + details about a user's or Google Chat app's + membership `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. .. code-block:: python @@ -766,7 +773,8 @@ async def sample_get_membership(): Args: request (Optional[Union[google.apps.chat_v1.types.GetMembershipRequest, dict]]): - The request object. + The request object. Request to get a membership of a + space. name (:class:`str`): Required. Resource name of the membership to retrieve. @@ -777,7 +785,7 @@ async def sample_get_membership(): ``spaces/{space}/members/app`` When `authenticated as a - user `__, + user `__, you can use the user's email as an alias for ``{member}``. For example, ``spaces/{space}/members/example@gmail.com`` where @@ -864,15 +872,16 @@ async def get_message( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> message.Message: - r"""Returns details about a message. For an example, see `Read a - message `__. + r"""Returns details about a message. For an example, see `Get + details about a + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Note: Might return a message from a blocked member or space. @@ -904,7 +913,7 @@ async def sample_get_message(): Args: request (Optional[Union[google.apps.chat_v1.types.GetMessageRequest, dict]]): - The request object. + The request object. Request to get a message. name (:class:`str`): Required. Resource name of the message. @@ -913,7 +922,7 @@ async def sample_get_message(): If you've set a custom ID for your message, you can use the value from the ``clientAssignedMessageId`` field for ``{message}``. For details, see [Name a message] - (https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message). + (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -997,14 +1006,14 @@ async def update_message( request while the ``update`` method uses a ``put`` request. We recommend using the ``patch`` method. For an example, see `Update a - message `__. + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. When using app authentication, requests can only update messages created by the calling Chat app. @@ -1035,7 +1044,7 @@ async def sample_update_message(): Args: request (Optional[Union[google.apps.chat_v1.types.UpdateMessageRequest, dict]]): - The request object. + The request object. Request to update a message. message (:class:`google.apps.chat_v1.types.Message`): Required. Message with fields updated. @@ -1144,14 +1153,14 @@ async def delete_message( metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a message. For an example, see `Delete a - message `__. + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. When using app authentication, requests can only delete messages created by the calling Chat app. @@ -1180,7 +1189,7 @@ async def sample_delete_message(): Args: request (Optional[Union[google.apps.chat_v1.types.DeleteMessageRequest, dict]]): - The request object. + The request object. Request to delete a message. name (:class:`str`): Required. Resource name of the message. @@ -1189,7 +1198,7 @@ async def sample_delete_message(): If you've set a custom ID for your message, you can use the value from the ``clientAssignedMessageId`` field for ``{message}``. For details, see [Name a message] - (https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message). + (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1262,11 +1271,11 @@ async def get_attachment( ) -> attachment.Attachment: r"""Gets the metadata of a message attachment. The attachment data is fetched using the `media - API `__. - For an example, see `Get a message - attachment `__. + API `__. + For an example, see `Get metadata about a message + attachment `__. Requires `app - authentication `__. + authentication `__. .. code-block:: python @@ -1296,7 +1305,7 @@ async def sample_get_attachment(): Args: request (Optional[Union[google.apps.chat_v1.types.GetAttachmentRequest, dict]]): - The request object. + The request object. Request to get an attachment. name (:class:`str`): Required. Resource name of the attachment, in the form ``spaces/*/messages/*/attachments/*``. @@ -1378,9 +1387,9 @@ async def upload_attachment( ) -> attachment.UploadAttachmentResponse: r"""Uploads an attachment. For an example, see `Upload media as a file - attachment `__. + attachment `__. Requires user - `authentication `__. + `authentication `__. You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see `File types blocked by Google @@ -1415,7 +1424,7 @@ async def sample_upload_attachment(): Args: request (Optional[Union[google.apps.chat_v1.types.UploadAttachmentRequest, dict]]): - The request object. + The request object. Request to upload an attachment. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1424,7 +1433,7 @@ async def sample_upload_attachment(): Returns: google.apps.chat_v1.types.UploadAttachmentResponse: - + Response of uploading an attachment. """ # Create or coerce a protobuf request object. request = attachment.UploadAttachmentRequest(request) @@ -1477,14 +1486,14 @@ async def list_spaces( r"""Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see `List - spaces `__. + spaces `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. @@ -1527,6 +1536,8 @@ async def sample_list_spaces(): Returns: google.apps.chat_v1.services.chat_service.pagers.ListSpacesAsyncPager: + The response for a list spaces + request. Iterating over this object will yield results and resolve additional pages automatically. @@ -1584,15 +1595,16 @@ async def get_space( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> space.Space: - r"""Returns details about a space. For an example, see `Get a - space `__. + r"""Returns details about a space. For an example, see `Get details + about a + space `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. .. code-block:: python @@ -1711,7 +1723,7 @@ async def create_space( ) -> gc_space.Space: r"""Creates a named space. Spaces grouped by topics aren't supported. For an example, see `Create a - space `__. + space `__. If you receive the error message ``ALREADY_EXISTS`` when creating a space, try a different ``displayName``. An existing @@ -1719,7 +1731,7 @@ async def create_space( this display name. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -1748,7 +1760,7 @@ async def sample_create_space(): Args: request (Optional[Union[google.apps.chat_v1.types.CreateSpaceRequest, dict]]): - The request object. + The request object. A request to create a named space. space (:class:`google.apps.chat_v1.types.Space`): Required. The ``displayName`` and ``spaceType`` fields must be populated. Only ``SpaceType.SPACE`` is @@ -1838,7 +1850,8 @@ async def set_up_space( r"""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 `__. + space with initial + members `__. To specify the human members to add, add memberships with the appropriate ``member.name`` in the ``SetUpSpaceRequest``. To add @@ -1864,8 +1877,9 @@ async def set_up_space( ``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 `create a - membership `__. + or an existing DM between two human users, see `Invite or add a + user or app to a + space `__. If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the @@ -1878,7 +1892,7 @@ async def set_up_space( name. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -1907,7 +1921,8 @@ async def sample_set_up_space(): Args: request (Optional[Union[google.apps.chat_v1.types.SetUpSpaceRequest, dict]]): - The request object. + The request object. Request to create a space and add + specified users to it. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1967,7 +1982,7 @@ async def update_space( metadata: Sequence[Tuple[str, str]] = (), ) -> gc_space.Space: r"""Updates a space. For an example, see `Update a - space `__. + space `__. If you're updating the ``displayName`` field and receive the error message ``ALREADY_EXISTS``, try a different display name.. @@ -1975,7 +1990,7 @@ async def update_space( already use this display name. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -2150,9 +2165,9 @@ async def delete_space( means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see `Delete a - space `__. + space `__. Requires `user - authentication `__ + authentication `__ from a user who has permission to delete the space. .. code-block:: python @@ -2255,11 +2270,11 @@ async def complete_import_space( metadata: Sequence[Tuple[str, str]] = (), ) -> space.CompleteImportSpaceResponse: r"""Completes the `import - process `__ + process `__ for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see `Authorize Google Chat apps to import - data `__. + data `__. .. code-block:: python @@ -2299,6 +2314,8 @@ async def sample_complete_import_space(): Returns: google.apps.chat_v1.types.CompleteImportSpaceResponse: + Response message for completing the + import process for a space. """ # Create or coerce a protobuf request object. @@ -2355,19 +2372,19 @@ async def find_direct_message( message `__. With `user - authentication `__, + authentication `__, returns the direct message space between the specified user and the authenticated user. With `app - authentication `__, + authentication `__, returns the direct message space between the specified user and the calling Chat app. Requires `user - authentication `__ + authentication `__ or `app - authentication `__. + authentication `__. .. code-block:: python @@ -2459,14 +2476,14 @@ async def create_membership( ) -> gc_membership.Membership: r"""Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an - example, see `Create a - membership `__. + example, see `Invite or add a user or a Google Chat app to a + space `__. 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 `__. + authentication `__. To specify the member to add, set the ``membership.member.name`` in the ``CreateMembershipRequest``: @@ -2513,7 +2530,8 @@ async def sample_create_membership(): Args: request (Optional[Union[google.apps.chat_v1.types.CreateMembershipRequest, dict]]): - The request object. + The request object. Request message for creating a + membership. parent (:class:`str`): Required. The resource name of the space for which to create the @@ -2629,11 +2647,12 @@ async def delete_membership( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.Membership: - r"""Deletes a membership. For an example, see `Delete a - membership `__. + r"""Deletes a membership. For an example, see `Remove a user or a + Google Chat app from a + space `__. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -2663,7 +2682,8 @@ async def sample_delete_membership(): Args: request (Optional[Union[google.apps.chat_v1.types.DeleteMembershipRequest, dict]]): - The request object. + The request object. Request to delete a membership in a + space. name (:class:`str`): Required. Resource name of the membership to delete. Chat apps can delete human users' or their own @@ -2766,12 +2786,11 @@ async def create_reaction( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gc_reaction.Reaction: - r"""Creates a reaction and adds it to a message. For an example, see - `Create a - reaction `__. + r"""Creates a reaction and adds it to a message. Only unicode emojis + are supported. For an example, see `Add a reaction to a + message `__. Requires `user - authentication `__. - Only unicode emoji are supported. + authentication `__. .. code-block:: python @@ -2891,9 +2910,10 @@ async def list_reactions( metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListReactionsAsyncPager: r"""Lists reactions to a message. For an example, see `List - reactions `__. + reactions for a + message `__. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -2941,6 +2961,8 @@ async def sample_list_reactions(): Returns: google.apps.chat_v1.services.chat_service.pagers.ListReactionsAsyncPager: + Response to a list reactions request. + Iterating over this object will yield results and resolve additional pages automatically. @@ -3018,10 +3040,11 @@ async def delete_reaction( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: - r"""Deletes a reaction to a message. For an example, see `Delete a - reaction `__. + r"""Deletes a reaction to a message. Only unicode emojis are + supported. For an example, see `Delete a + reaction `__. Requires `user - authentication `__. + authentication `__. .. code-block:: python diff --git a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/client.py b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/client.py index dddc34ecd64e..dca2e903f993 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/client.py +++ b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/client.py @@ -805,11 +805,11 @@ def create_message( metadata: Sequence[Tuple[str, str]] = (), ) -> gc_message.Message: r"""Creates a message in a Google Chat space. For an example, see - `Create a - message `__. + `Send a + message `__. Calling this method requires - `authentication `__ + `authentication `__ and supports the following authentication types: - For text messages, user authentication or app authentication @@ -878,7 +878,7 @@ def sample_create_message(): same custom ID for different messages. For details, see `Name a - message `__. + message `__. This corresponds to the ``message_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -955,7 +955,7 @@ def list_messages( including messages from blocked members and spaces. For an example, see `List messages `__. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -1005,6 +1005,8 @@ def sample_list_messages(): Returns: google.apps.chat_v1.services.chat_service.pagers.ListMessagesPager: + Response message for listing + messages. Iterating over this object will yield results and resolve additional pages automatically. @@ -1073,23 +1075,24 @@ def list_memberships( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMembershipsPager: - r"""Lists memberships in a space. For an example, see `List - memberships `__. + r"""Lists memberships in a space. For an example, see `List users + and Google Chat apps in a + space `__. Listing memberships with `app - authentication `__ + authentication `__ lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with `User - authentication `__ + authentication `__ lists memberships in spaces that the authenticated user has access to. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. .. code-block:: python @@ -1120,7 +1123,8 @@ def sample_list_memberships(): Args: request (Union[google.apps.chat_v1.types.ListMembershipsRequest, dict]): - The request object. + The request object. Request message for listing + memberships. parent (str): Required. The resource name of the space for which to fetch a membership @@ -1139,6 +1143,8 @@ def sample_list_memberships(): Returns: google.apps.chat_v1.services.chat_service.pagers.ListMembershipsPager: + Response to list memberships of the + space. Iterating over this object will yield results and resolve additional pages automatically. @@ -1207,15 +1213,16 @@ def get_membership( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.Membership: - r"""Returns details about a membership. For an example, see `Get a - membership `__. + r"""Returns details about a membership. For an example, see `Get + details about a user's or Google Chat app's + membership `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. .. code-block:: python @@ -1245,7 +1252,8 @@ def sample_get_membership(): Args: request (Union[google.apps.chat_v1.types.GetMembershipRequest, dict]): - The request object. + The request object. Request to get a membership of a + space. name (str): Required. Resource name of the membership to retrieve. @@ -1256,7 +1264,7 @@ def sample_get_membership(): ``spaces/{space}/members/app`` When `authenticated as a - user `__, + user `__, you can use the user's email as an alias for ``{member}``. For example, ``spaces/{space}/members/example@gmail.com`` where @@ -1334,15 +1342,16 @@ def get_message( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> message.Message: - r"""Returns details about a message. For an example, see `Read a - message `__. + r"""Returns details about a message. For an example, see `Get + details about a + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Note: Might return a message from a blocked member or space. @@ -1374,7 +1383,7 @@ def sample_get_message(): Args: request (Union[google.apps.chat_v1.types.GetMessageRequest, dict]): - The request object. + The request object. Request to get a message. name (str): Required. Resource name of the message. @@ -1383,7 +1392,7 @@ def sample_get_message(): If you've set a custom ID for your message, you can use the value from the ``clientAssignedMessageId`` field for ``{message}``. For details, see [Name a message] - (https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message). + (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1458,14 +1467,14 @@ def update_message( request while the ``update`` method uses a ``put`` request. We recommend using the ``patch`` method. For an example, see `Update a - message `__. + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. When using app authentication, requests can only update messages created by the calling Chat app. @@ -1496,7 +1505,7 @@ def sample_update_message(): Args: request (Union[google.apps.chat_v1.types.UpdateMessageRequest, dict]): - The request object. + The request object. Request to update a message. message (google.apps.chat_v1.types.Message): Required. Message with fields updated. @@ -1596,14 +1605,14 @@ def delete_message( metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a message. For an example, see `Delete a - message `__. + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. When using app authentication, requests can only delete messages created by the calling Chat app. @@ -1632,7 +1641,7 @@ def sample_delete_message(): Args: request (Union[google.apps.chat_v1.types.DeleteMessageRequest, dict]): - The request object. + The request object. Request to delete a message. name (str): Required. Resource name of the message. @@ -1641,7 +1650,7 @@ def sample_delete_message(): If you've set a custom ID for your message, you can use the value from the ``clientAssignedMessageId`` field for ``{message}``. For details, see [Name a message] - (https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message). + (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1705,11 +1714,11 @@ def get_attachment( ) -> attachment.Attachment: r"""Gets the metadata of a message attachment. The attachment data is fetched using the `media - API `__. - For an example, see `Get a message - attachment `__. + API `__. + For an example, see `Get metadata about a message + attachment `__. Requires `app - authentication `__. + authentication `__. .. code-block:: python @@ -1739,7 +1748,7 @@ def sample_get_attachment(): Args: request (Union[google.apps.chat_v1.types.GetAttachmentRequest, dict]): - The request object. + The request object. Request to get an attachment. name (str): Required. Resource name of the attachment, in the form ``spaces/*/messages/*/attachments/*``. @@ -1812,9 +1821,9 @@ def upload_attachment( ) -> attachment.UploadAttachmentResponse: r"""Uploads an attachment. For an example, see `Upload media as a file - attachment `__. + attachment `__. Requires user - `authentication `__. + `authentication `__. You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see `File types blocked by Google @@ -1849,7 +1858,7 @@ def sample_upload_attachment(): Args: request (Union[google.apps.chat_v1.types.UploadAttachmentRequest, dict]): - The request object. + The request object. Request to upload an attachment. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1858,7 +1867,7 @@ def sample_upload_attachment(): Returns: google.apps.chat_v1.types.UploadAttachmentResponse: - + Response of uploading an attachment. """ # Create or coerce a protobuf request object. # Minor optimization to avoid making a copy if the user passes @@ -1903,14 +1912,14 @@ def list_spaces( r"""Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see `List - spaces `__. + spaces `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. @@ -1953,6 +1962,8 @@ def sample_list_spaces(): Returns: google.apps.chat_v1.services.chat_service.pagers.ListSpacesPager: + The response for a list spaces + request. Iterating over this object will yield results and resolve additional pages automatically. @@ -2002,15 +2013,16 @@ def get_space( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> space.Space: - r"""Returns details about a space. For an example, see `Get a - space `__. + r"""Returns details about a space. For an example, see `Get details + about a + space `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. .. code-block:: python @@ -2120,7 +2132,7 @@ def create_space( ) -> gc_space.Space: r"""Creates a named space. Spaces grouped by topics aren't supported. For an example, see `Create a - space `__. + space `__. If you receive the error message ``ALREADY_EXISTS`` when creating a space, try a different ``displayName``. An existing @@ -2128,7 +2140,7 @@ def create_space( this display name. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -2157,7 +2169,7 @@ def sample_create_space(): Args: request (Union[google.apps.chat_v1.types.CreateSpaceRequest, dict]): - The request object. + The request object. A request to create a named space. space (google.apps.chat_v1.types.Space): Required. The ``displayName`` and ``spaceType`` fields must be populated. Only ``SpaceType.SPACE`` is @@ -2238,7 +2250,8 @@ def set_up_space( r"""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 `__. + space with initial + members `__. To specify the human members to add, add memberships with the appropriate ``member.name`` in the ``SetUpSpaceRequest``. To add @@ -2264,8 +2277,9 @@ def set_up_space( ``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 `create a - membership `__. + or an existing DM between two human users, see `Invite or add a + user or app to a + space `__. If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the @@ -2278,7 +2292,7 @@ def set_up_space( name. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -2307,7 +2321,8 @@ def sample_set_up_space(): Args: request (Union[google.apps.chat_v1.types.SetUpSpaceRequest, dict]): - The request object. + The request object. Request to create a space and add + specified users to it. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2359,7 +2374,7 @@ def update_space( metadata: Sequence[Tuple[str, str]] = (), ) -> gc_space.Space: r"""Updates a space. For an example, see `Update a - space `__. + space `__. If you're updating the ``displayName`` field and receive the error message ``ALREADY_EXISTS``, try a different display name.. @@ -2367,7 +2382,7 @@ def update_space( already use this display name. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -2533,9 +2548,9 @@ def delete_space( means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see `Delete a - space `__. + space `__. Requires `user - authentication `__ + authentication `__ from a user who has permission to delete the space. .. code-block:: python @@ -2629,11 +2644,11 @@ def complete_import_space( metadata: Sequence[Tuple[str, str]] = (), ) -> space.CompleteImportSpaceResponse: r"""Completes the `import - process `__ + process `__ for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see `Authorize Google Chat apps to import - data `__. + data `__. .. code-block:: python @@ -2673,6 +2688,8 @@ def sample_complete_import_space(): Returns: google.apps.chat_v1.types.CompleteImportSpaceResponse: + Response message for completing the + import process for a space. """ # Create or coerce a protobuf request object. @@ -2721,19 +2738,19 @@ def find_direct_message( message `__. With `user - authentication `__, + authentication `__, returns the direct message space between the specified user and the authenticated user. With `app - authentication `__, + authentication `__, returns the direct message space between the specified user and the calling Chat app. Requires `user - authentication `__ + authentication `__ or `app - authentication `__. + authentication `__. .. code-block:: python @@ -2817,14 +2834,14 @@ def create_membership( ) -> gc_membership.Membership: r"""Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an - example, see `Create a - membership `__. + example, see `Invite or add a user or a Google Chat app to a + space `__. 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 `__. + authentication `__. To specify the member to add, set the ``membership.member.name`` in the ``CreateMembershipRequest``: @@ -2871,7 +2888,8 @@ def sample_create_membership(): Args: request (Union[google.apps.chat_v1.types.CreateMembershipRequest, dict]): - The request object. + The request object. Request message for creating a + membership. parent (str): Required. The resource name of the space for which to create the @@ -2978,11 +2996,12 @@ def delete_membership( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.Membership: - r"""Deletes a membership. For an example, see `Delete a - membership `__. + r"""Deletes a membership. For an example, see `Remove a user or a + Google Chat app from a + space `__. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -3012,7 +3031,8 @@ def sample_delete_membership(): Args: request (Union[google.apps.chat_v1.types.DeleteMembershipRequest, dict]): - The request object. + The request object. Request to delete a membership in a + space. name (str): Required. Resource name of the membership to delete. Chat apps can delete human users' or their own @@ -3106,12 +3126,11 @@ def create_reaction( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gc_reaction.Reaction: - r"""Creates a reaction and adds it to a message. For an example, see - `Create a - reaction `__. + r"""Creates a reaction and adds it to a message. Only unicode emojis + are supported. For an example, see `Add a reaction to a + message `__. Requires `user - authentication `__. - Only unicode emoji are supported. + authentication `__. .. code-block:: python @@ -3222,9 +3241,10 @@ def list_reactions( metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListReactionsPager: r"""Lists reactions to a message. For an example, see `List - reactions `__. + reactions for a + message `__. Requires `user - authentication `__. + authentication `__. .. code-block:: python @@ -3272,6 +3292,8 @@ def sample_list_reactions(): Returns: google.apps.chat_v1.services.chat_service.pagers.ListReactionsPager: + Response to a list reactions request. + Iterating over this object will yield results and resolve additional pages automatically. @@ -3340,10 +3362,11 @@ def delete_reaction( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: - r"""Deletes a reaction to a message. For an example, see `Delete a - reaction `__. + r"""Deletes a reaction to a message. Only unicode emojis are + supported. For an example, see `Delete a + reaction `__. Requires `user - authentication `__. + authentication `__. .. code-block:: python diff --git a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/grpc.py b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/grpc.py index e9f0c33e91bd..46b78f97581e 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/grpc.py +++ b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/grpc.py @@ -246,11 +246,11 @@ def create_message( r"""Return a callable for the create message method over gRPC. Creates a message in a Google Chat space. For an example, see - `Create a - message `__. + `Send a + message `__. Calling this method requires - `authentication `__ + `authentication `__ and supports the following authentication types: - For text messages, user authentication or app authentication @@ -286,7 +286,7 @@ def list_messages( including messages from blocked members and spaces. For an example, see `List messages `__. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.ListMessagesRequest], @@ -314,23 +314,24 @@ def list_memberships( ]: r"""Return a callable for the list memberships method over gRPC. - Lists memberships in a space. For an example, see `List - memberships `__. + Lists memberships in a space. For an example, see `List users + and Google Chat apps in a + space `__. Listing memberships with `app - authentication `__ + authentication `__ lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with `User - authentication `__ + authentication `__ lists memberships in spaces that the authenticated user has access to. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Returns: Callable[[~.ListMembershipsRequest], @@ -356,15 +357,16 @@ def get_membership( ) -> Callable[[membership.GetMembershipRequest], membership.Membership]: r"""Return a callable for the get membership method over gRPC. - Returns details about a membership. For an example, see `Get a - membership `__. + Returns details about a membership. For an example, see `Get + details about a user's or Google Chat app's + membership `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Returns: Callable[[~.GetMembershipRequest], @@ -388,15 +390,16 @@ def get_membership( def get_message(self) -> Callable[[message.GetMessageRequest], message.Message]: r"""Return a callable for the get message method over gRPC. - Returns details about a message. For an example, see `Read a - message `__. + Returns details about a message. For an example, see `Get + details about a + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Note: Might return a message from a blocked member or space. @@ -429,14 +432,14 @@ def update_message( request while the ``update`` method uses a ``put`` request. We recommend using the ``patch`` method. For an example, see `Update a - message `__. + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. When using app authentication, requests can only update messages created by the calling Chat app. @@ -465,14 +468,14 @@ def delete_message( r"""Return a callable for the delete message method over gRPC. Deletes a message. For an example, see `Delete a - message `__. + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. When using app authentication, requests can only delete messages created by the calling Chat app. @@ -502,11 +505,11 @@ def get_attachment( Gets the metadata of a message attachment. The attachment data is fetched using the `media - API `__. - For an example, see `Get a message - attachment `__. + API `__. + For an example, see `Get metadata about a message + attachment `__. Requires `app - authentication `__. + authentication `__. Returns: Callable[[~.GetAttachmentRequest], @@ -536,9 +539,9 @@ def upload_attachment( Uploads an attachment. For an example, see `Upload media as a file - attachment `__. + attachment `__. Requires user - `authentication `__. + `authentication `__. You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see `File types blocked by Google @@ -571,14 +574,14 @@ def list_spaces( Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see `List - spaces `__. + spaces `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. @@ -605,15 +608,16 @@ def list_spaces( def get_space(self) -> Callable[[space.GetSpaceRequest], space.Space]: r"""Return a callable for the get space method over gRPC. - Returns details about a space. For an example, see `Get a - space `__. + Returns details about a space. For an example, see `Get details + about a + space `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Returns: Callable[[~.GetSpaceRequest], @@ -639,7 +643,7 @@ def create_space(self) -> Callable[[gc_space.CreateSpaceRequest], gc_space.Space Creates a named space. Spaces grouped by topics aren't supported. For an example, see `Create a - space `__. + space `__. If you receive the error message ``ALREADY_EXISTS`` when creating a space, try a different ``displayName``. An existing @@ -647,7 +651,7 @@ def create_space(self) -> Callable[[gc_space.CreateSpaceRequest], gc_space.Space this display name. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.CreateSpaceRequest], @@ -674,7 +678,8 @@ def set_up_space(self) -> Callable[[space_setup.SetUpSpaceRequest], space.Space] 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 `__. + space with initial + members `__. To specify the human members to add, add memberships with the appropriate ``member.name`` in the ``SetUpSpaceRequest``. To add @@ -700,8 +705,9 @@ def set_up_space(self) -> Callable[[space_setup.SetUpSpaceRequest], space.Space] ``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 `create a - membership `__. + or an existing DM between two human users, see `Invite or add a + user or app to a + space `__. If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the @@ -714,7 +720,7 @@ def set_up_space(self) -> Callable[[space_setup.SetUpSpaceRequest], space.Space] name. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.SetUpSpaceRequest], @@ -739,7 +745,7 @@ def update_space(self) -> Callable[[gc_space.UpdateSpaceRequest], gc_space.Space r"""Return a callable for the update space method over gRPC. Updates a space. For an example, see `Update a - space `__. + space `__. If you're updating the ``displayName`` field and receive the error message ``ALREADY_EXISTS``, try a different display name.. @@ -747,7 +753,7 @@ def update_space(self) -> Callable[[gc_space.UpdateSpaceRequest], gc_space.Space already use this display name. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.UpdateSpaceRequest], @@ -775,9 +781,9 @@ def delete_space(self) -> Callable[[space.DeleteSpaceRequest], empty_pb2.Empty]: means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see `Delete a - space `__. + space `__. Requires `user - authentication `__ + authentication `__ from a user who has permission to delete the space. Returns: @@ -807,11 +813,11 @@ def complete_import_space( r"""Return a callable for the complete import space method over gRPC. Completes the `import - process `__ + process `__ for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see `Authorize Google Chat apps to import - data `__. + data `__. Returns: Callable[[~.CompleteImportSpaceRequest], @@ -843,19 +849,19 @@ def find_direct_message( message `__. With `user - authentication `__, + authentication `__, returns the direct message space between the specified user and the authenticated user. With `app - authentication `__, + authentication `__, returns the direct message space between the specified user and the calling Chat app. Requires `user - authentication `__ + authentication `__ or `app - authentication `__. + authentication `__. Returns: Callable[[~.FindDirectMessageRequest], @@ -883,14 +889,14 @@ def create_membership( Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an - example, see `Create a - membership `__. + example, see `Invite or add a user or a Google Chat app to a + space `__. 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 `__. + authentication `__. To specify the member to add, set the ``membership.member.name`` in the ``CreateMembershipRequest``: @@ -933,11 +939,12 @@ def delete_membership( ) -> Callable[[membership.DeleteMembershipRequest], membership.Membership]: r"""Return a callable for the delete membership method over gRPC. - Deletes a membership. For an example, see `Delete a - membership `__. + Deletes a membership. For an example, see `Remove a user or a + Google Chat app from a + space `__. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.DeleteMembershipRequest], @@ -963,12 +970,11 @@ def create_reaction( ) -> Callable[[gc_reaction.CreateReactionRequest], gc_reaction.Reaction]: r"""Return a callable for the create reaction method over gRPC. - Creates a reaction and adds it to a message. For an example, see - `Create a - reaction `__. + Creates a reaction and adds it to a message. Only unicode emojis + are supported. For an example, see `Add a reaction to a + message `__. Requires `user - authentication `__. - Only unicode emoji are supported. + authentication `__. Returns: Callable[[~.CreateReactionRequest], @@ -995,9 +1001,10 @@ def list_reactions( r"""Return a callable for the list reactions method over gRPC. Lists reactions to a message. For an example, see `List - reactions `__. + reactions for a + message `__. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.ListReactionsRequest], @@ -1023,10 +1030,11 @@ def delete_reaction( ) -> Callable[[reaction.DeleteReactionRequest], empty_pb2.Empty]: r"""Return a callable for the delete reaction method over gRPC. - Deletes a reaction to a message. For an example, see `Delete a - reaction `__. + Deletes a reaction to a message. Only unicode emojis are + supported. For an example, see `Delete a + reaction `__. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.DeleteReactionRequest], diff --git a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/grpc_asyncio.py b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/grpc_asyncio.py index 96081ff6c84c..d6e52e95539f 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/grpc_asyncio.py +++ b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/grpc_asyncio.py @@ -249,11 +249,11 @@ def create_message( r"""Return a callable for the create message method over gRPC. Creates a message in a Google Chat space. For an example, see - `Create a - message `__. + `Send a + message `__. Calling this method requires - `authentication `__ + `authentication `__ and supports the following authentication types: - For text messages, user authentication or app authentication @@ -291,7 +291,7 @@ def list_messages( including messages from blocked members and spaces. For an example, see `List messages `__. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.ListMessagesRequest], @@ -320,23 +320,24 @@ def list_memberships( ]: r"""Return a callable for the list memberships method over gRPC. - Lists memberships in a space. For an example, see `List - memberships `__. + Lists memberships in a space. For an example, see `List users + and Google Chat apps in a + space `__. Listing memberships with `app - authentication `__ + authentication `__ lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with `User - authentication `__ + authentication `__ lists memberships in spaces that the authenticated user has access to. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Returns: Callable[[~.ListMembershipsRequest], @@ -362,15 +363,16 @@ def get_membership( ) -> Callable[[membership.GetMembershipRequest], Awaitable[membership.Membership]]: r"""Return a callable for the get membership method over gRPC. - Returns details about a membership. For an example, see `Get a - membership `__. + Returns details about a membership. For an example, see `Get + details about a user's or Google Chat app's + membership `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Returns: Callable[[~.GetMembershipRequest], @@ -396,15 +398,16 @@ def get_message( ) -> Callable[[message.GetMessageRequest], Awaitable[message.Message]]: r"""Return a callable for the get message method over gRPC. - Returns details about a message. For an example, see `Read a - message `__. + Returns details about a message. For an example, see `Get + details about a + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Note: Might return a message from a blocked member or space. @@ -437,14 +440,14 @@ def update_message( request while the ``update`` method uses a ``put`` request. We recommend using the ``patch`` method. For an example, see `Update a - message `__. + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. When using app authentication, requests can only update messages created by the calling Chat app. @@ -473,14 +476,14 @@ def delete_message( r"""Return a callable for the delete message method over gRPC. Deletes a message. For an example, see `Delete a - message `__. + message `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. When using app authentication, requests can only delete messages created by the calling Chat app. @@ -510,11 +513,11 @@ def get_attachment( Gets the metadata of a message attachment. The attachment data is fetched using the `media - API `__. - For an example, see `Get a message - attachment `__. + API `__. + For an example, see `Get metadata about a message + attachment `__. Requires `app - authentication `__. + authentication `__. Returns: Callable[[~.GetAttachmentRequest], @@ -545,9 +548,9 @@ def upload_attachment( Uploads an attachment. For an example, see `Upload media as a file - attachment `__. + attachment `__. Requires user - `authentication `__. + `authentication `__. You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see `File types blocked by Google @@ -580,14 +583,14 @@ def list_spaces( Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see `List - spaces `__. + spaces `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. @@ -614,15 +617,16 @@ def list_spaces( def get_space(self) -> Callable[[space.GetSpaceRequest], Awaitable[space.Space]]: r"""Return a callable for the get space method over gRPC. - Returns details about a space. For an example, see `Get a - space `__. + Returns details about a space. For an example, see `Get details + about a + space `__. Requires - `authentication `__. + `authentication `__. Supports `app - authentication `__ + authentication `__ and `user - authentication `__. + authentication `__. Returns: Callable[[~.GetSpaceRequest], @@ -650,7 +654,7 @@ def create_space( Creates a named space. Spaces grouped by topics aren't supported. For an example, see `Create a - space `__. + space `__. If you receive the error message ``ALREADY_EXISTS`` when creating a space, try a different ``displayName``. An existing @@ -658,7 +662,7 @@ def create_space( this display name. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.CreateSpaceRequest], @@ -687,7 +691,8 @@ def set_up_space( 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 `__. + space with initial + members `__. To specify the human members to add, add memberships with the appropriate ``member.name`` in the ``SetUpSpaceRequest``. To add @@ -713,8 +718,9 @@ def set_up_space( ``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 `create a - membership `__. + or an existing DM between two human users, see `Invite or add a + user or app to a + space `__. If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the @@ -727,7 +733,7 @@ def set_up_space( name. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.SetUpSpaceRequest], @@ -754,7 +760,7 @@ def update_space( r"""Return a callable for the update space method over gRPC. Updates a space. For an example, see `Update a - space `__. + space `__. If you're updating the ``displayName`` field and receive the error message ``ALREADY_EXISTS``, try a different display name.. @@ -762,7 +768,7 @@ def update_space( already use this display name. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.UpdateSpaceRequest], @@ -792,9 +798,9 @@ def delete_space( means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see `Delete a - space `__. + space `__. Requires `user - authentication `__ + authentication `__ from a user who has permission to delete the space. Returns: @@ -824,11 +830,11 @@ def complete_import_space( r"""Return a callable for the complete import space method over gRPC. Completes the `import - process `__ + process `__ for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see `Authorize Google Chat apps to import - data `__. + data `__. Returns: Callable[[~.CompleteImportSpaceRequest], @@ -860,19 +866,19 @@ def find_direct_message( message `__. With `user - authentication `__, + authentication `__, returns the direct message space between the specified user and the authenticated user. With `app - authentication `__, + authentication `__, returns the direct message space between the specified user and the calling Chat app. Requires `user - authentication `__ + authentication `__ or `app - authentication `__. + authentication `__. Returns: Callable[[~.FindDirectMessageRequest], @@ -902,14 +908,14 @@ def create_membership( Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an - example, see `Create a - membership `__. + example, see `Invite or add a user or a Google Chat app to a + space `__. 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 `__. + authentication `__. To specify the member to add, set the ``membership.member.name`` in the ``CreateMembershipRequest``: @@ -954,11 +960,12 @@ def delete_membership( ]: r"""Return a callable for the delete membership method over gRPC. - Deletes a membership. For an example, see `Delete a - membership `__. + Deletes a membership. For an example, see `Remove a user or a + Google Chat app from a + space `__. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.DeleteMembershipRequest], @@ -984,12 +991,11 @@ def create_reaction( ) -> Callable[[gc_reaction.CreateReactionRequest], Awaitable[gc_reaction.Reaction]]: r"""Return a callable for the create reaction method over gRPC. - Creates a reaction and adds it to a message. For an example, see - `Create a - reaction `__. + Creates a reaction and adds it to a message. Only unicode emojis + are supported. For an example, see `Add a reaction to a + message `__. Requires `user - authentication `__. - Only unicode emoji are supported. + authentication `__. Returns: Callable[[~.CreateReactionRequest], @@ -1018,9 +1024,10 @@ def list_reactions( r"""Return a callable for the list reactions method over gRPC. Lists reactions to a message. For an example, see `List - reactions `__. + reactions for a + message `__. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.ListReactionsRequest], @@ -1046,10 +1053,11 @@ def delete_reaction( ) -> Callable[[reaction.DeleteReactionRequest], Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete reaction method over gRPC. - Deletes a reaction to a message. For an example, see `Delete a - reaction `__. + Deletes a reaction to a message. Only unicode emojis are + supported. For an example, see `Delete a + reaction `__. Requires `user - authentication `__. + authentication `__. Returns: Callable[[~.DeleteReactionRequest], diff --git a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/rest.py b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/rest.py index 947c2eb0cda9..8ae042967e1d 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/rest.py +++ b/packages/google-apps-chat/google/apps/chat_v1/services/chat_service/transports/rest.py @@ -819,6 +819,8 @@ def __call__( Returns: ~.space.CompleteImportSpaceResponse: + Response message for completing the + import process for a space. """ @@ -904,7 +906,8 @@ def __call__( Args: request (~.gc_membership.CreateMembershipRequest): - The request object. + The request object. Request message for creating a + membership. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1186,7 +1189,7 @@ def __call__( Args: request (~.gc_space.CreateSpaceRequest): - The request object. + The request object. A request to create a named space. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1282,7 +1285,8 @@ def __call__( Args: request (~.membership.DeleteMembershipRequest): - The request object. + The request object. Request to delete a membership in a + space. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1373,7 +1377,7 @@ def __call__( Args: request (~.message.DeleteMessageRequest): - The request object. + The request object. Request to delete a message. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1686,7 +1690,7 @@ def __call__( Args: request (~.attachment.GetAttachmentRequest): - The request object. + The request object. Request to get an attachment. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1771,7 +1775,8 @@ def __call__( Args: request (~.membership.GetMembershipRequest): - The request object. + The request object. Request to get a membership of a + space. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1860,7 +1865,7 @@ def __call__( Args: request (~.message.GetMessageRequest): - The request object. + The request object. Request to get a message. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2034,7 +2039,8 @@ def __call__( Args: request (~.membership.ListMembershipsRequest): - The request object. + The request object. Request message for listing + memberships. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2043,6 +2049,8 @@ def __call__( Returns: ~.membership.ListMembershipsResponse: + Response to list memberships of the + space. """ @@ -2131,6 +2139,8 @@ def __call__( Returns: ~.message.ListMessagesResponse: + Response message for listing + messages. """ @@ -2216,7 +2226,7 @@ def __call__( Returns: ~.reaction.ListReactionsResponse: - + Response to a list reactions request. """ http_options: List[Dict[str, str]] = [ @@ -2292,6 +2302,8 @@ def __call__( Returns: ~.space.ListSpacesResponse: + The response for a list spaces + request. """ @@ -2367,7 +2379,8 @@ def __call__( Args: request (~.space_setup.SetUpSpaceRequest): - The request object. + The request object. Request to create a space and add + specified users to it. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2463,7 +2476,7 @@ def __call__( Args: request (~.gc_message.UpdateMessageRequest): - The request object. + The request object. Request to update a message. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2656,7 +2669,7 @@ def __call__( Args: request (~.attachment.UploadAttachmentRequest): - The request object. + The request object. Request to upload an attachment. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2665,7 +2678,7 @@ def __call__( Returns: ~.attachment.UploadAttachmentResponse: - + Response of uploading an attachment. """ http_options: List[Dict[str, str]] = [ diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/action_status.py b/packages/google-apps-chat/google/apps/chat_v1/types/action_status.py index 8becc384d6fc..e12408863d94 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/action_status.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/action_status.py @@ -30,7 +30,7 @@ class ActionStatus(proto.Message): r"""Represents the status for a request to either invoke or submit a - `dialog `__. + `dialog `__. Attributes: status_code (google.rpc.code_pb2.Code): diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/annotation.py b/packages/google-apps-chat/google/apps/chat_v1/types/annotation.py index 4650b9a4f9d5..fa2e62f43671 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/annotation.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/annotation.py @@ -57,7 +57,7 @@ class AnnotationType(proto.Enum): class Annotation(proto.Message): r"""Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see `Format text - messages `__. + messages `__. Example plain-text message body: @@ -295,7 +295,7 @@ class DriveLinkData(proto.Message): Attributes: drive_data_ref (google.apps.chat_v1.types.DriveDataRef): A - `DriveDataRef `__ + `DriveDataRef `__ which references a Google Drive file. mime_type (str): The mime type of the linked Google Drive diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/attachment.py b/packages/google-apps-chat/google/apps/chat_v1/types/attachment.py index ce3314620edb..39a9af1c55b5 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/attachment.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/attachment.py @@ -79,15 +79,15 @@ class Attachment(proto.Message): """ class Source(proto.Enum): - r""" + r"""The source of the attachment. Values: SOURCE_UNSPECIFIED (0): - No description available. + Reserved. DRIVE_FILE (1): - No description available. + The file is a Google Drive file. UPLOADED_CONTENT (2): - No description available. + The file is uploaded to Chat. """ SOURCE_UNSPECIFIED = 0 DRIVE_FILE = 1 @@ -148,7 +148,7 @@ class DriveDataRef(proto.Message): class AttachmentDataRef(proto.Message): - r""" + r"""A reference to the attachment data. Attributes: resource_name (str): @@ -173,7 +173,7 @@ class AttachmentDataRef(proto.Message): class GetAttachmentRequest(proto.Message): - r""" + r"""Request to get an attachment. Attributes: name (str): @@ -188,7 +188,7 @@ class GetAttachmentRequest(proto.Message): class UploadAttachmentRequest(proto.Message): - r""" + r"""Request to upload an attachment. Attributes: parent (str): @@ -211,7 +211,7 @@ class UploadAttachmentRequest(proto.Message): class UploadAttachmentResponse(proto.Message): - r""" + r"""Response of uploading an attachment. Attributes: attachment_data_ref (google.apps.chat_v1.types.AttachmentDataRef): diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/contextual_addon.py b/packages/google-apps-chat/google/apps/chat_v1/types/contextual_addon.py index bb447b1e6141..9db2f08d2bc9 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/contextual_addon.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/contextual_addon.py @@ -116,7 +116,7 @@ class Section(proto.Message): The header of the section. Formatted text is supported. For more information about formatting text, see `Formatting text in Google Chat - apps `__ + apps `__ and `Formatting text in Google Workspace Add-ons `__. widgets (MutableSequence[google.apps.chat_v1.types.WidgetMarkup]): diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/membership.py b/packages/google-apps-chat/google/apps/chat_v1/types/membership.py index 80dcde891d12..89c236f227d6 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/membership.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/membership.py @@ -65,9 +65,9 @@ class Membership(proto.Message): member (google.apps.chat_v1.types.User): The Google Chat user or app the membership corresponds to. If your Chat app `authenticates as a - user `__, + user `__, the output populates the - `user `__ + `user `__ ``name`` and ``type``. This field is a member of `oneof`_ ``memberType``. @@ -181,7 +181,7 @@ class MembershipRole(proto.Enum): class CreateMembershipRequest(proto.Message): - r""" + r"""Request message for creating a membership. Attributes: parent (str): @@ -224,7 +224,7 @@ class CreateMembershipRequest(proto.Message): class ListMembershipsRequest(proto.Message): - r""" + r"""Request message for listing memberships. Attributes: parent (str): @@ -238,8 +238,8 @@ class ListMembershipsRequest(proto.Message): If unspecified, at most 100 memberships are returned. - The maximum value is 1,000. If you use a value more than - 1,000, it's automatically changed to 1,000. + The maximum value is 1000. If you use a value more than + 1000, it's automatically changed to 1000. Negative values return an ``INVALID_ARGUMENT`` error. page_token (str): @@ -255,9 +255,9 @@ class ListMembershipsRequest(proto.Message): Optional. A query filter. You can filter memberships by a member's role - (```role`` `__) + (```role`` `__) and type - (```member.type`` `__). + (```member.type`` `__). To filter by role, set ``role`` to ``ROLE_MEMBER`` or ``ROLE_MANAGER``. @@ -304,7 +304,7 @@ class ListMembershipsRequest(proto.Message): returned. Currently requires `user - authentication `__. + authentication `__. """ parent: str = proto.Field( @@ -334,7 +334,7 @@ class ListMembershipsRequest(proto.Message): class ListMembershipsResponse(proto.Message): - r""" + r"""Response to list memberships of the space. Attributes: memberships (MutableSequence[google.apps.chat_v1.types.Membership]): @@ -362,7 +362,7 @@ def raw_page(self): class GetMembershipRequest(proto.Message): - r""" + r"""Request to get a membership of a space. Attributes: name (str): @@ -375,7 +375,7 @@ class GetMembershipRequest(proto.Message): ``spaces/{space}/members/app`` When `authenticated as a - user `__, + user `__, you can use the user's email as an alias for ``{member}``. For example, ``spaces/{space}/members/example@gmail.com`` where ``example@gmail.com`` is the email of the Google Chat @@ -389,7 +389,7 @@ class GetMembershipRequest(proto.Message): class DeleteMembershipRequest(proto.Message): - r""" + r"""Request to delete a membership in a space. Attributes: name (str): diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/message.py b/packages/google-apps-chat/google/apps/chat_v1/types/message.py index 73e65f028ff4..90dda263a1ec 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/message.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/message.py @@ -75,13 +75,13 @@ class Message(proto.Message): ``clientAssignedMessageId`` field. For example, ``spaces/AAAAAAAAAAA/messages/client-custom-name``. For details, see `Name a - message `__. + message `__. sender (google.apps.chat_v1.types.User): Output only. The user who created the message. If your Chat app `authenticates as a - user `__, + user `__, the output populates the - `user `__ + `user `__ ``name`` and ``type``. create_time (google.protobuf.timestamp_pb2.Timestamp): Optional. Immutable. For spaces created in @@ -104,13 +104,13 @@ class Message(proto.Message): text (str): Plain-text body of the message. The first link to an image, video, or web page generates a `preview - chip `__. + chip `__. You can also `@mention a Google Chat - user `__, + user `__, or everyone in the space. To learn about creating text messages, see `Send a text - message `__. + message `__. formatted_text (str): Output only. Contains the message ``text`` with markups added to communicate formatting. This field might not @@ -118,12 +118,12 @@ class Message(proto.Message): following: - `Markup - syntax `__ - for bold, italic, strikethrough, monospace, and monospace - block. + syntax `__ + for bold, italic, strikethrough, monospace, monospace + block, and bulleted list. - `User - mentions `__ + mentions `__ using the format ````. - Custom hyperlinks using the format @@ -136,7 +136,7 @@ class Message(proto.Message): emoji, such as ``U+1F600`` for a grinning face emoji. For more information, see `View text formatting sent in a - message `__ + message `__ cards (MutableSequence[google.apps.chat_v1.types.ContextualAddOnMarkup.Card]): Deprecated: Use ``cards_v2`` instead. @@ -147,16 +147,15 @@ class Message(proto.Message): can have a maximum size of 32 KB. cards_v2 (MutableSequence[google.apps.chat_v1.types.CardWithId]): An array of - `cards `__. + `cards `__. Only Chat apps can create cards. If your Chat app `authenticates as a - user `__, + user `__, the messages can't contain cards. - To learn about cards and how to create them, see `Design - dynamic, interactive, and consistent UIs with - cards `__. + To learn about cards and how to create them, see `Send card + messages `__. `Card builder `__ @@ -166,12 +165,12 @@ class Message(proto.Message): thread (google.apps.chat_v1.types.Thread): The thread the message belongs to. For example usage, see `Start or reply to a message - thread `__. + thread `__. space (google.apps.chat_v1.types.Space): If your Chat app `authenticates as a - user `__, + user `__, the output populates the - `space `__ + `space `__ ``name``. fallback_text (str): A plain-text description of the message's @@ -191,7 +190,7 @@ class Message(proto.Message): matched_url (google.apps.chat_v1.types.MatchedUrl): Output only. A URL in ``spaces.messages.text`` that matches a link preview pattern. For more information, see `Preview - links `__. + links `__. thread_reply (bool): Output only. When ``true``, the message is a response in a reply thread. When ``false``, the message is visible in the @@ -204,9 +203,9 @@ class Message(proto.Message): Optional. A custom ID for the message. You can use field to identify a message, or to get, delete, or update a message. To set a custom ID, specify the - ```messageId`` `__ + ```messageId`` `__ field when you create the message. For details, see `Name a - message `__. + message `__. emoji_reaction_summaries (MutableSequence[google.apps.chat_v1.types.EmojiReactionSummary]): Output only. The list of emoji reaction summaries on the message. @@ -219,12 +218,12 @@ class Message(proto.Message): Only Chat apps can send private messages. If your Chat app `authenticates as a - user `__ + user `__ to send a message, the message can't be private and must omit this field. For details, see `Send private messages to Google Chat - users `__. + users `__. deletion_metadata (google.apps.chat_v1.types.DeletionMetadata): Output only. Information about a deleted message. A message is deleted when ``delete_time`` is set. @@ -240,69 +239,13 @@ class Message(proto.Message): One or more interactive widgets that appear at the bottom of a message. You can add accessory widgets to messages that contain text, cards, or both text and cards. Not supported - for messages that contain dialogs. + for messages that contain dialogs. For details, see `Add + interactive widgets at the bottom of a + message `__. Creating a message with accessory widgets requires [app authentication] - (https://developers.google.com/chat/api/guides/auth/service-accounts). - - The following example shows a Chat app that uses accessory - widgets (thumbs up and thumbs down buttons) in a text - message: - - |Example accessory widgets message| - - The JSON for this example message is the following: - - :: - - { - "text": "Rate your experience with this Chat app.", - "accessoryWidgets": [ - { - "buttonList": { - "buttons": [ - { - "icon": { - "material_icon": { - "name": "thumb_up" - } - }, - "color": { - "red": 0, - "blue": 255, - "green": 0 - }, - "onClick": { - "action": { - "function": "doUpvote", - } - } - }, - { - "icon": { - "material_icon": { - "name": "thumb_down" - } - }, - "color": { - "red": 0, - "blue": 255, - "green": 0 - }, - "onClick": { - "action": { - "function": "doDownvote", - } - } - } - ] - } - } - ] - } - - .. |Example accessory widgets message| image:: https://developers.google.com/chat/images/message-accessory-widgets-reference.png + (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). """ name: str = proto.Field( @@ -477,10 +420,10 @@ class QuotedMessageMetadata(proto.Message): class Thread(proto.Message): r"""A thread in a Google Chat space. For example usage, see `Start or reply to a message - thread `__. + thread `__. If you specify a thread when creating a message, you can set the - ```messageReplyOption`` `__ + ```messageReplyOption`` `__ field to determine what happens if no matching thread is found. Attributes: @@ -522,7 +465,7 @@ class ActionResponse(proto.Message): (Only for ``REQUEST_CONFIG`` response types.) dialog_action (google.apps.chat_v1.types.DialogAction): Input only. A response to an interaction event related to a - `dialog `__. + `dialog `__. Must be accompanied by ``ResponseType.Dialog``. updated_widget (google.apps.chat_v1.types.ActionResponse.UpdatedWidget): Input only. The response of the updated @@ -551,7 +494,7 @@ class ResponseType(proto.Enum): authentication or configuration. DIALOG (4): Presents a - `dialog `__. + `dialog `__. UPDATE_WIDGET (7): Widget text autocomplete options query. """ @@ -630,16 +573,17 @@ class UpdatedWidget(proto.Message): class AccessoryWidget(proto.Message): - r"""A borderless widget attached to the bottom of an app's - message. + r"""One or more interactive widgets that appear at the bottom of a + message. For details, see `Add interactive widgets at the bottom of + a + message `__. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: button_list (google.apps.card_v1.types.ButtonList): - A list of buttons that are displayed under - the message. + A list of buttons. This field is a member of `oneof`_ ``action``. """ @@ -653,7 +597,7 @@ class AccessoryWidget(proto.Message): class GetMessageRequest(proto.Message): - r""" + r"""Request to get a message. Attributes: name (str): @@ -664,7 +608,7 @@ class GetMessageRequest(proto.Message): If you've set a custom ID for your message, you can use the value from the ``clientAssignedMessageId`` field for ``{message}``. For details, see [Name a message] - (https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message). + (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). """ name: str = proto.Field( @@ -674,7 +618,7 @@ class GetMessageRequest(proto.Message): class DeleteMessageRequest(proto.Message): - r""" + r"""Request to delete a message. Attributes: name (str): @@ -685,16 +629,16 @@ class DeleteMessageRequest(proto.Message): If you've set a custom ID for your message, you can use the value from the ``clientAssignedMessageId`` field for ``{message}``. For details, see [Name a message] - (https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message). + (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). force (bool): When ``true``, deleting a message also deletes its threaded replies. When ``false``, if a message has threaded replies, deletion fails. Only applies when `authenticating as a - user `__. + user `__. Has no effect when [authenticating as a Chat app] - (https://developers.google.com/chat/api/guides/auth/service-accounts). + (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). """ name: str = proto.Field( @@ -708,7 +652,7 @@ class DeleteMessageRequest(proto.Message): class UpdateMessageRequest(proto.Message): - r""" + r"""Request to update a message. Attributes: message (google.apps.chat_v1.types.Message): @@ -735,7 +679,7 @@ class UpdateMessageRequest(proto.Message): Optional. If ``true`` and the message isn't found, a new message is created and ``updateMask`` is ignored. The specified message ID must be - `client-assigned `__ + `client-assigned `__ or the request fails. """ @@ -774,7 +718,7 @@ class CreateMessageRequest(proto.Message): ``threadKey`` or the [thread.name][google.chat.v1.Thread.name]. For example usage, see `Start or reply to a message - thread `__. + thread `__. request_id (str): Optional. A unique request ID for this message. Specifying an existing request ID @@ -802,7 +746,7 @@ class CreateMessageRequest(proto.Message): custom ID for different messages. For details, see `Name a - message `__. + message `__. """ class MessageReplyOption(proto.Enum): @@ -876,8 +820,8 @@ class ListMessagesRequest(proto.Message): If unspecified, at most 25 are returned. - The maximum value is 1,000. If you use a value more than - 1,000, it's automatically changed to 1,000. + The maximum value is 1000. If you use a value more than + 1000, it's automatically changed to 1000. Negative values return an ``INVALID_ARGUMENT`` error. page_token (str): @@ -979,7 +923,7 @@ class ListMessagesRequest(proto.Message): class ListMessagesResponse(proto.Message): - r""" + r"""Response message for listing messages. Attributes: messages (MutableSequence[google.apps.chat_v1.types.Message]): @@ -1006,8 +950,8 @@ def raw_page(self): class DialogAction(proto.Message): r"""Contains a - `dialog `__ and - request status code. + `dialog `__ + and request status code. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -1015,14 +959,14 @@ class DialogAction(proto.Message): Attributes: dialog (google.apps.chat_v1.types.Dialog): Input only. - `Dialog `__ + `Dialog `__ for the request. This field is a member of `oneof`_ ``action``. action_status (google.apps.chat_v1.types.ActionStatus): Input only. Status for a request to either invoke or submit a - `dialog `__. + `dialog `__. Displays a status and message to users, if necessary. For example, in case of an error or success. """ @@ -1059,12 +1003,12 @@ class Dialog(proto.Message): class CardWithId(proto.Message): r"""A - `card `__ + `card `__ in a Google Chat message. Only Chat apps can create cards. If your Chat app `authenticates as a - user `__, + user `__, the message can't contain cards. `Card builder `__ diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/reaction.py b/packages/google-apps-chat/google/apps/chat_v1/types/reaction.py index 1a0877b5c3fa..4f4423244af7 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/reaction.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/reaction.py @@ -198,9 +198,9 @@ class ListReactionsRequest(proto.Message): Optional. A query filter. You can filter reactions by - `emoji `__ + `emoji `__ (either ``emoji.unicode`` or ``emoji.custom_emoji.uid``) and - `user `__ + `user `__ (``user.name``). To filter reactions for multiple emojis or users, join @@ -263,7 +263,7 @@ class ListReactionsRequest(proto.Message): class ListReactionsResponse(proto.Message): - r""" + r"""Response to a list reactions request. Attributes: reactions (MutableSequence[google.apps.chat_v1.types.Reaction]): diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/slash_command.py b/packages/google-apps-chat/google/apps/chat_v1/types/slash_command.py index 810c757685f0..0ded32898f02 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/slash_command.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/slash_command.py @@ -29,7 +29,7 @@ class SlashCommand(proto.Message): r"""A `slash - command `__ + command `__ in Google Chat. Attributes: diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/space.py b/packages/google-apps-chat/google/apps/chat_v1/types/space.py index 1c0593046026..0b8752ed7d4d 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/space.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/space.py @@ -64,7 +64,7 @@ class Space(proto.Message): instead. Whether messages are threaded in this space. display_name (str): The space's display name. Required when `creating a - space `__. + space `__. If you receive the error message ``ALREADY_EXISTS`` when creating a space or updating the ``displayName``, try a different ``displayName``. An existing space within the @@ -80,13 +80,18 @@ class Space(proto.Message): Workspace organization. Omit this field when creating spaces in the following conditions: - - The authenticated user uses a Google Account. By default, - the space permits any Google Chat user. + - The authenticated user uses a consumer account (unmanaged + user account). By default, a space created by a consumer + account permits any Google Chat user. - The space is used to [import data to Google Chat] - (https://developers.google.com/chat/api/guides/import-data-overview). - Import mode spaces must only permit members from the same - Google Workspace organization. + (https://developers.google.com/chat/api/guides/import-data-overview) + because import mode spaces must only permit members from + the same Google Workspace organization. However, as part + of the `Google Workspace Developer Preview + Program `__, + import mode spaces can permit any Google Chat user so + this field can then be set for import mode spaces. For existing spaces, this field is output only. space_threading_state (google.apps.chat_v1.types.Space.SpaceThreadingState): @@ -132,7 +137,7 @@ class Type(proto.Enum): Values: TYPE_UNSPECIFIED (0): - No description available. + Reserved. ROOM (1): Conversations between two or more humans. DM (2): @@ -277,7 +282,7 @@ class SpaceDetails(proto.Message): class CreateSpaceRequest(proto.Message): - r""" + r"""A request to create a named space. Attributes: space (google.apps.chat_v1.types.Space): @@ -323,8 +328,8 @@ class ListSpacesRequest(proto.Message): If unspecified, at most 100 spaces are returned. - The maximum value is 1,000. If you use a value more than - 1,000, it's automatically changed to 1,000. + The maximum value is 1000. If you use a value more than + 1000, it's automatically changed to 1000. Negative values return an ``INVALID_ARGUMENT`` error. page_token (str): @@ -339,7 +344,7 @@ class ListSpacesRequest(proto.Message): Optional. A query filter. You can filter spaces by the space type - (```space_type`` `__). + (```space_type`` `__). To filter by space type, you must specify valid enum value, such as ``SPACE`` or ``GROUP_CHAT`` (the ``space_type`` @@ -372,7 +377,7 @@ class ListSpacesRequest(proto.Message): class ListSpacesResponse(proto.Message): - r""" + r"""The response for a list spaces request. Attributes: spaces (MutableSequence[google.apps.chat_v1.types.Space]): @@ -433,7 +438,7 @@ class FindDirectMessageRequest(proto.Message): ID is ``123456789``, you can find a direct message with that person by using ``users/123456789`` as the ``name``. When `authenticated as a - user `__, + user `__, you can use the email as an alias for ``{user}``. For example, ``users/example@gmail.com`` where ``example@gmail.com`` is the email of the Google Chat user. @@ -546,7 +551,8 @@ class CompleteImportSpaceRequest(proto.Message): class CompleteImportSpaceResponse(proto.Message): - r""" + r"""Response message for completing the import process for a + space. Attributes: space (google.apps.chat_v1.types.Space): diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/space_setup.py b/packages/google-apps-chat/google/apps/chat_v1/types/space_setup.py index a97463782f0f..b26a6f342d54 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/space_setup.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/space_setup.py @@ -31,7 +31,7 @@ class SetUpSpaceRequest(proto.Message): - r""" + r"""Request to create a space and add specified users to it. Attributes: space (google.apps.chat_v1.types.Space): diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/user.py b/packages/google-apps-chat/google/apps/chat_v1/types/user.py index 7dfcc6dcd16c..e2aa30ee19b0 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/user.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/user.py @@ -30,7 +30,7 @@ class User(proto.Message): r"""A user in Google Chat. When returned as an output from a request, if your Chat app `authenticates as a - user `__, + user `__, the output for a ``User`` resource only populates the user's ``name`` and ``type``. diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/widgets.py b/packages/google-apps-chat/google/apps/chat_v1/types/widgets.py index 0973570dde2b..983d68ba9c6f 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/widgets.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/widgets.py @@ -157,7 +157,7 @@ class Icon(proto.Enum): class TextParagraph(proto.Message): r"""A paragraph of text. Formatted text supported. For more information about formatting text, see `Formatting text in Google Chat - apps `__ + apps `__ and `Formatting text in Google Workspace Add-ons `__. @@ -250,14 +250,14 @@ class KeyValue(proto.Message): The text of the top label. Formatted text supported. For more information about formatting text, see `Formatting text in Google Chat - apps `__ + apps `__ and `Formatting text in Google Workspace Add-ons `__. content (str): The text of the content. Formatted text supported and always required. For more information about formatting text, see `Formatting text in Google Chat - apps `__ + apps `__ and `Formatting text in Google Workspace Add-ons `__. content_multiline (bool): @@ -266,7 +266,7 @@ class KeyValue(proto.Message): The text of the bottom label. Formatted text supported. For more information about formatting text, see `Formatting text in Google Chat - apps `__ + apps `__ and `Formatting text in Google Workspace Add-ons `__. on_click (google.apps.chat_v1.types.WidgetMarkup.OnClick): diff --git a/packages/google-apps-chat/samples/generated_samples/snippet_metadata_google.chat.v1.json b/packages/google-apps-chat/samples/generated_samples/snippet_metadata_google.chat.v1.json index bcdb9971f49e..06e1e9c2ebf4 100644 --- a/packages/google-apps-chat/samples/generated_samples/snippet_metadata_google.chat.v1.json +++ b/packages/google-apps-chat/samples/generated_samples/snippet_metadata_google.chat.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-apps-chat", - "version": "0.1.2" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-apps-chat/setup.py b/packages/google-apps-chat/setup.py index 0c46111e4bb3..1b399c38c78b 100644 --- a/packages/google-apps-chat/setup.py +++ b/packages/google-apps-chat/setup.py @@ -45,7 +45,7 @@ "google-auth >= 2.14.1, <3.0.0dev,!=2.24.0,!=2.25.0", "proto-plus >= 1.22.3, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", - "google-apps-card >= 0.1.0, <1.0.0dev", + "google-apps-card >= 0.1.2, <1.0.0dev", ] url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-apps-chat" diff --git a/packages/google-apps-chat/testing/constraints-3.7.txt b/packages/google-apps-chat/testing/constraints-3.7.txt index b0fe42ddc60f..169496b87947 100644 --- a/packages/google-apps-chat/testing/constraints-3.7.txt +++ b/packages/google-apps-chat/testing/constraints-3.7.txt @@ -8,4 +8,4 @@ google-api-core==1.34.1 google-auth==2.14.1 proto-plus==1.22.3 protobuf==3.19.5 -google-apps-card==0.1.0 +google-apps-card==0.1.2 diff --git a/packages/google-apps-chat/tests/unit/gapic/chat_v1/test_chat_service.py b/packages/google-apps-chat/tests/unit/gapic/chat_v1/test_chat_service.py index 18341106ce05..14a4570e77cf 100644 --- a/packages/google-apps-chat/tests/unit/gapic/chat_v1/test_chat_service.py +++ b/packages/google-apps-chat/tests/unit/gapic/chat_v1/test_chat_service.py @@ -8053,6 +8053,12 @@ def test_create_message_rest(request_type): "icon": { "known_icon": "known_icon_value", "icon_url": "icon_url_value", + "material_icon": { + "name": "name_value", + "fill": True, + "weight": 648, + "grade": 515, + }, "alt_text": "alt_text_value", "image_type": 1, }, @@ -9996,6 +10002,12 @@ def test_update_message_rest(request_type): "icon": { "known_icon": "known_icon_value", "icon_url": "icon_url_value", + "material_icon": { + "name": "name_value", + "fill": True, + "weight": 648, + "grade": 515, + }, "alt_text": "alt_text_value", "image_type": 1, },