Visitar URL original
feat: Add `NOTIFICATION_TYPE_SECURITY_MSA` and `NOTIFICATION_TYPE_THR… · googleapis/google-cloud-python@4679f2a · GitHub
Skip to content

Commit 4679f2a

Browse files
feat: Add NOTIFICATION_TYPE_SECURITY_MSA and NOTIFICATION_TYPE_THREAT_HORIZONS notification types (#11538)
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 8aab422 commit 4679f2a

10 files changed

Lines changed: 35 additions & 23 deletions

File tree

‎packages/google-cloud-advisorynotifications/.flake8‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2020 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

‎packages/google-cloud-advisorynotifications/CONTRIBUTING.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ We support:
236236

237237
Supported versions can be found in our ``noxfile.py`` `config`_.
238238

239-
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py
239+
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-advisorynotifications/noxfile.py
240240

241241

242242
**********

‎packages/google-cloud-advisorynotifications/MANIFEST.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2020 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

‎packages/google-cloud-advisorynotifications/README.rst‎

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,24 @@ In order to use this library, you first need to go through the following steps:
3636
Installation
3737
~~~~~~~~~~~~
3838

39-
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
40-
create isolated Python environments. The basic problem it addresses is one of
41-
dependencies and versions, and indirectly permissions.
39+
Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
40+
creates isolated Python environments. These isolated environments can have separate
41+
versions of Python packages, which allows you to isolate one project's dependencies
42+
from the dependencies of other projects.
4243

43-
With `virtualenv`_, it's possible to install this library without needing system
44+
With `venv`_, it's possible to install this library without needing system
4445
install permissions, and without clashing with the installed system
4546
dependencies.
4647

47-
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
48+
.. _`venv`: https://docs.python.org/3/library/venv.html
4849

4950

5051
Code samples and snippets
5152
~~~~~~~~~~~~~~~~~~~~~~~~~
5253

53-
Code samples and snippets live in the `samples/` folder.
54+
Code samples and snippets live in the `samples/`_ folder.
55+
56+
.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-advisorynotifications/samples
5457

5558

5659
Supported Python Versions
@@ -77,21 +80,19 @@ Mac/Linux
7780

7881
.. code-block:: console
7982
80-
pip install virtualenv
81-
virtualenv <your-env>
83+
python3 -m venv <your-env>
8284
source <your-env>/bin/activate
83-
<your-env>/bin/pip install google-cloud-advisorynotifications
85+
pip install google-cloud-advisorynotifications
8486
8587
8688
Windows
8789
^^^^^^^
8890

8991
.. code-block:: console
9092
91-
pip install virtualenv
92-
virtualenv <your-env>
93-
<your-env>\Scripts\activate
94-
<your-env>\Scripts\pip.exe install google-cloud-advisorynotifications
93+
py -m venv <your-env>
94+
.\<your-env>\Scripts\activate
95+
pip install google-cloud-advisorynotifications
9596
9697
Next Steps
9798
~~~~~~~~~~

‎packages/google-cloud-advisorynotifications/docs/conf.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2021 Google LLC
2+
# Copyright 2023 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

‎packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/services/advisory_notifications_service/async_client.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ async def sample_get_notification():
398398
name (:class:`str`):
399399
Required. A name of the notification
400400
to retrieve. Format:
401+
401402
organizations/{organization}/locations/{location}/notifications/{notification}.
402403
403404
This corresponds to the ``name`` field

‎packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/services/advisory_notifications_service/client.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ def sample_get_notification():
611611
name (str):
612612
Required. A name of the notification
613613
to retrieve. Format:
614+
614615
organizations/{organization}/locations/{location}/notifications/{notification}.
615616
616617
This corresponds to the ``name`` field

‎packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/types/service.py‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@ class LocalizationState(proto.Enum):
6868
LOCALIZATION_STATE_NOT_APPLICABLE (1):
6969
Localization is not applicable for requested
7070
language. This can happen when:
71+
7172
- The requested language was not supported by
72-
Advisory Notifications at the time of
73-
localization (including notifications created
74-
before the localization feature was launched).
73+
Advisory Notifications at the time of
74+
localization (including notifications created
75+
before the localization feature was launched).
7576
- The requested language is English, so only the
76-
English text is returned.
77+
English text is returned.
7778
LOCALIZATION_STATE_PENDING (2):
7879
Localization for requested language is in
7980
progress, and not ready yet.
@@ -97,10 +98,16 @@ class NotificationType(proto.Enum):
9798
Security and privacy advisory notifications
9899
NOTIFICATION_TYPE_SENSITIVE_ACTIONS (2):
99100
Sensitive action notifications
101+
NOTIFICATION_TYPE_SECURITY_MSA (3):
102+
General security MSA
103+
NOTIFICATION_TYPE_THREAT_HORIZONS (4):
104+
Threat horizons MSA
100105
"""
101106
NOTIFICATION_TYPE_UNSPECIFIED = 0
102107
NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY = 1
103108
NOTIFICATION_TYPE_SENSITIVE_ACTIONS = 2
109+
NOTIFICATION_TYPE_SECURITY_MSA = 3
110+
NOTIFICATION_TYPE_THREAT_HORIZONS = 4
104111

105112

106113
class Notification(proto.Message):
@@ -111,6 +118,7 @@ class Notification(proto.Message):
111118
name (str):
112119
The resource name of the notification.
113120
Format:
121+
114122
organizations/{organization}/locations/{location}/notifications/{notification}.
115123
subject (google.cloud.advisorynotifications_v1.types.Subject):
116124
The subject line of the notification.
@@ -405,6 +413,7 @@ class GetNotificationRequest(proto.Message):
405413
name (str):
406414
Required. A name of the notification to
407415
retrieve. Format:
416+
408417
organizations/{organization}/locations/{location}/notifications/{notification}.
409418
language_code (str):
410419
ISO code for requested localization language.

‎packages/google-cloud-advisorynotifications/noxfile.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2018 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

‎packages/google-cloud-advisorynotifications/scripts/decrypt-secrets.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Copyright 2015 Google Inc. All rights reserved.
3+
# Copyright 2023 Google LLC All rights reserved.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)