google-apps-chat 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {google_apps_chat-0.2.0/google_apps_chat.egg-info → google_apps_chat-0.2.2}/PKG-INFO +3 -3
  2. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/README.rst +2 -2
  3. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat/__init__.py +2 -0
  4. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat/gapic_version.py +1 -1
  5. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/__init__.py +2 -0
  6. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/gapic_version.py +1 -1
  7. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/async_client.py +3 -4
  8. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/client.py +32 -4
  9. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/transports/grpc.py +3 -4
  10. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/transports/grpc_asyncio.py +3 -4
  11. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/transports/rest.py +762 -52
  12. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/__init__.py +2 -0
  13. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/annotation.py +30 -1
  14. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/reaction.py +1 -1
  15. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/slash_command.py +1 -1
  16. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2/google_apps_chat.egg-info}/PKG-INFO +3 -3
  17. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/tests/unit/gapic/chat_v1/test_chat_service.py +193 -8
  18. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/LICENSE +0 -0
  19. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/MANIFEST.in +0 -0
  20. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat/py.typed +0 -0
  21. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/gapic_metadata.json +0 -0
  22. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/py.typed +0 -0
  23. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/__init__.py +0 -0
  24. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/__init__.py +0 -0
  25. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/pagers.py +0 -0
  26. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/transports/__init__.py +0 -0
  27. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/transports/base.py +0 -0
  28. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/services/chat_service/transports/rest_base.py +0 -0
  29. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/action_status.py +0 -0
  30. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/attachment.py +0 -0
  31. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/chat_service.py +0 -0
  32. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/contextual_addon.py +0 -0
  33. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/deletion_metadata.py +0 -0
  34. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/event_payload.py +0 -0
  35. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/group.py +0 -0
  36. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/history_state.py +0 -0
  37. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/matched_url.py +0 -0
  38. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/membership.py +0 -0
  39. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/message.py +0 -0
  40. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/space.py +0 -0
  41. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/space_event.py +0 -0
  42. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/space_read_state.py +0 -0
  43. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/space_setup.py +0 -0
  44. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/thread_read_state.py +0 -0
  45. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/user.py +0 -0
  46. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google/apps/chat_v1/types/widgets.py +0 -0
  47. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google_apps_chat.egg-info/SOURCES.txt +0 -0
  48. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google_apps_chat.egg-info/dependency_links.txt +0 -0
  49. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google_apps_chat.egg-info/not-zip-safe +0 -0
  50. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google_apps_chat.egg-info/requires.txt +0 -0
  51. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/google_apps_chat.egg-info/top_level.txt +0 -0
  52. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/setup.cfg +0 -0
  53. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/setup.py +0 -0
  54. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/tests/__init__.py +0 -0
  55. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/tests/unit/__init__.py +0 -0
  56. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/tests/unit/gapic/__init__.py +0 -0
  57. {google_apps_chat-0.2.0 → google_apps_chat-0.2.2}/tests/unit/gapic/chat_v1/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-apps-chat
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Google Apps Chat API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-apps-chat
6
6
  Author: Google LLC
@@ -58,12 +58,12 @@ In order to use this library, you first need to go through the following steps:
58
58
  1. `Select or create a Cloud Platform project.`_
59
59
  2. `Enable billing for your project.`_
60
60
  3. `Enable the Chat API.`_
61
- 4. `Setup Authentication.`_
61
+ 4. `Set up Authentication.`_
62
62
 
63
63
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
64
64
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
65
65
  .. _Enable the Chat API.: https://developers.google.com/chat/
66
- .. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
66
+ .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
67
67
 
68
68
  Installation
69
69
  ~~~~~~~~~~~~
@@ -26,12 +26,12 @@ In order to use this library, you first need to go through the following steps:
26
26
  1. `Select or create a Cloud Platform project.`_
27
27
  2. `Enable billing for your project.`_
28
28
  3. `Enable the Chat API.`_
29
- 4. `Setup Authentication.`_
29
+ 4. `Set up Authentication.`_
30
30
 
31
31
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
32
32
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
33
33
  .. _Enable the Chat API.: https://developers.google.com/chat/
34
- .. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
34
+ .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
35
35
 
36
36
  Installation
37
37
  ~~~~~~~~~~~~
@@ -27,6 +27,7 @@ from google.apps.chat_v1.types.annotation import (
27
27
  Annotation,
28
28
  AnnotationType,
29
29
  ChatSpaceLinkData,
30
+ CustomEmojiMetadata,
30
31
  DriveLinkData,
31
32
  RichLinkMetadata,
32
33
  SlashCommandMetadata,
@@ -141,6 +142,7 @@ __all__ = (
141
142
  "ActionStatus",
142
143
  "Annotation",
143
144
  "ChatSpaceLinkData",
145
+ "CustomEmojiMetadata",
144
146
  "DriveLinkData",
145
147
  "RichLinkMetadata",
146
148
  "SlashCommandMetadata",
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.2.0" # {x-release-please-version}
16
+ __version__ = "0.2.2" # {x-release-please-version}
@@ -24,6 +24,7 @@ from .types.annotation import (
24
24
  Annotation,
25
25
  AnnotationType,
26
26
  ChatSpaceLinkData,
27
+ CustomEmojiMetadata,
27
28
  DriveLinkData,
28
29
  RichLinkMetadata,
29
30
  SlashCommandMetadata,
@@ -150,6 +151,7 @@ __all__ = (
150
151
  "CreateReactionRequest",
151
152
  "CreateSpaceRequest",
152
153
  "CustomEmoji",
154
+ "CustomEmojiMetadata",
153
155
  "DeleteMembershipRequest",
154
156
  "DeleteMessageRequest",
155
157
  "DeleteReactionRequest",
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.2.0" # {x-release-please-version}
16
+ __version__ = "0.2.2" # {x-release-please-version}
@@ -3170,8 +3170,8 @@ class ChatServiceAsyncClient:
3170
3170
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
3171
3171
  metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
3172
3172
  ) -> gc_reaction.Reaction:
3173
- r"""Creates a reaction and adds it to a message. Only unicode emojis
3174
- are supported. For an example, see `Add a reaction to a
3173
+ r"""Creates a reaction and adds it to a message. For an example, see
3174
+ `Add a reaction to a
3175
3175
  message <https://developers.google.com/workspace/chat/create-reactions>`__.
3176
3176
 
3177
3177
  Requires `user
@@ -3420,8 +3420,7 @@ class ChatServiceAsyncClient:
3420
3420
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
3421
3421
  metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
3422
3422
  ) -> None:
3423
- r"""Deletes a reaction to a message. Only unicode emojis are
3424
- supported. For an example, see `Delete a
3423
+ r"""Deletes a reaction to a message. For an example, see `Delete a
3425
3424
  reaction <https://developers.google.com/workspace/chat/delete-reactions>`__.
3426
3425
 
3427
3426
  Requires `user
@@ -14,6 +14,8 @@
14
14
  # limitations under the License.
15
15
  #
16
16
  from collections import OrderedDict
17
+ from http import HTTPStatus
18
+ import json
17
19
  import logging as std_logging
18
20
  import os
19
21
  import re
@@ -677,6 +679,33 @@ class ChatServiceClient(metaclass=ChatServiceClientMeta):
677
679
  # NOTE (b/349488459): universe validation is disabled until further notice.
678
680
  return True
679
681
 
682
+ def _add_cred_info_for_auth_errors(
683
+ self, error: core_exceptions.GoogleAPICallError
684
+ ) -> None:
685
+ """Adds credential info string to error details for 401/403/404 errors.
686
+
687
+ Args:
688
+ error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info.
689
+ """
690
+ if error.code not in [
691
+ HTTPStatus.UNAUTHORIZED,
692
+ HTTPStatus.FORBIDDEN,
693
+ HTTPStatus.NOT_FOUND,
694
+ ]:
695
+ return
696
+
697
+ cred = self._transport._credentials
698
+
699
+ # get_cred_info is only available in google-auth>=2.35.0
700
+ if not hasattr(cred, "get_cred_info"):
701
+ return
702
+
703
+ # ignore the type check since pypy test fails when get_cred_info
704
+ # is not available
705
+ cred_info = cred.get_cred_info() # type: ignore
706
+ if cred_info and hasattr(error._details, "append"):
707
+ error._details.append(json.dumps(cred_info))
708
+
680
709
  @property
681
710
  def api_endpoint(self):
682
711
  """Return the API endpoint used by the client instance.
@@ -3648,8 +3677,8 @@ class ChatServiceClient(metaclass=ChatServiceClientMeta):
3648
3677
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
3649
3678
  metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
3650
3679
  ) -> gc_reaction.Reaction:
3651
- r"""Creates a reaction and adds it to a message. Only unicode emojis
3652
- are supported. For an example, see `Add a reaction to a
3680
+ r"""Creates a reaction and adds it to a message. For an example, see
3681
+ `Add a reaction to a
3653
3682
  message <https://developers.google.com/workspace/chat/create-reactions>`__.
3654
3683
 
3655
3684
  Requires `user
@@ -3892,8 +3921,7 @@ class ChatServiceClient(metaclass=ChatServiceClientMeta):
3892
3921
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
3893
3922
  metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
3894
3923
  ) -> None:
3895
- r"""Deletes a reaction to a message. Only unicode emojis are
3896
- supported. For an example, see `Delete a
3924
+ r"""Deletes a reaction to a message. For an example, see `Delete a
3897
3925
  reaction <https://developers.google.com/workspace/chat/delete-reactions>`__.
3898
3926
 
3899
3927
  Requires `user
@@ -1277,8 +1277,8 @@ class ChatServiceGrpcTransport(ChatServiceTransport):
1277
1277
  ) -> Callable[[gc_reaction.CreateReactionRequest], gc_reaction.Reaction]:
1278
1278
  r"""Return a callable for the create reaction method over gRPC.
1279
1279
 
1280
- Creates a reaction and adds it to a message. Only unicode emojis
1281
- are supported. For an example, see `Add a reaction to a
1280
+ Creates a reaction and adds it to a message. For an example, see
1281
+ `Add a reaction to a
1282
1282
  message <https://developers.google.com/workspace/chat/create-reactions>`__.
1283
1283
 
1284
1284
  Requires `user
@@ -1339,8 +1339,7 @@ class ChatServiceGrpcTransport(ChatServiceTransport):
1339
1339
  ) -> Callable[[reaction.DeleteReactionRequest], empty_pb2.Empty]:
1340
1340
  r"""Return a callable for the delete reaction method over gRPC.
1341
1341
 
1342
- Deletes a reaction to a message. Only unicode emojis are
1343
- supported. For an example, see `Delete a
1342
+ Deletes a reaction to a message. For an example, see `Delete a
1344
1343
  reaction <https://developers.google.com/workspace/chat/delete-reactions>`__.
1345
1344
 
1346
1345
  Requires `user
@@ -1304,8 +1304,8 @@ class ChatServiceGrpcAsyncIOTransport(ChatServiceTransport):
1304
1304
  ) -> Callable[[gc_reaction.CreateReactionRequest], Awaitable[gc_reaction.Reaction]]:
1305
1305
  r"""Return a callable for the create reaction method over gRPC.
1306
1306
 
1307
- Creates a reaction and adds it to a message. Only unicode emojis
1308
- are supported. For an example, see `Add a reaction to a
1307
+ Creates a reaction and adds it to a message. For an example, see
1308
+ `Add a reaction to a
1309
1309
  message <https://developers.google.com/workspace/chat/create-reactions>`__.
1310
1310
 
1311
1311
  Requires `user
@@ -1368,8 +1368,7 @@ class ChatServiceGrpcAsyncIOTransport(ChatServiceTransport):
1368
1368
  ) -> Callable[[reaction.DeleteReactionRequest], Awaitable[empty_pb2.Empty]]:
1369
1369
  r"""Return a callable for the delete reaction method over gRPC.
1370
1370
 
1371
- Deletes a reaction to a message. Only unicode emojis are
1372
- supported. For an example, see `Delete a
1371
+ Deletes a reaction to a message. For an example, see `Delete a
1373
1372
  reaction <https://developers.google.com/workspace/chat/delete-reactions>`__.
1374
1373
 
1375
1374
  Requires `user