Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 9720fa4

Browse files
feat: add support for notification configs to v1 (#15)
1 parent 6a28717 commit 9720fa4

30 files changed

Lines changed: 2429 additions & 217 deletions

google/cloud/securitycenter_v1/gapic/security_center_client.py

Lines changed: 464 additions & 17 deletions
Large diffs are not rendered by default.

google/cloud/securitycenter_v1/gapic/security_center_client_config.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@
4747
"retry_codes_name": "non_idempotent",
4848
"retry_params_name": "default",
4949
},
50+
"CreateNotificationConfig": {
51+
"timeout_millis": 60000,
52+
"retry_codes_name": "non_idempotent",
53+
"retry_params_name": "default",
54+
},
55+
"DeleteNotificationConfig": {
56+
"timeout_millis": 60000,
57+
"retry_codes_name": "non_idempotent",
58+
"retry_params_name": "default",
59+
},
60+
"GetNotificationConfig": {
61+
"timeout_millis": 60000,
62+
"retry_codes_name": "idempotent",
63+
"retry_params_name": "default",
64+
},
5065
"GetOrganizationSettings": {
5166
"timeout_millis": 60000,
5267
"retry_codes_name": "idempotent",
@@ -67,6 +82,11 @@
6782
"retry_codes_name": "idempotent",
6883
"retry_params_name": "default",
6984
},
85+
"ListNotificationConfigs": {
86+
"timeout_millis": 60000,
87+
"retry_codes_name": "idempotent",
88+
"retry_params_name": "default",
89+
},
7090
"ListSources": {
7191
"timeout_millis": 60000,
7292
"retry_codes_name": "idempotent",
@@ -92,6 +112,11 @@
92112
"retry_codes_name": "non_idempotent",
93113
"retry_params_name": "default",
94114
},
115+
"UpdateNotificationConfig": {
116+
"timeout_millis": 60000,
117+
"retry_codes_name": "non_idempotent",
118+
"retry_params_name": "default",
119+
},
95120
"UpdateOrganizationSettings": {
96121
"timeout_millis": 60000,
97122
"retry_codes_name": "non_idempotent",

google/cloud/securitycenter_v1/gapic/transports/security_center_grpc_transport.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,45 @@ def create_finding(self):
204204
"""
205205
return self._stubs["security_center_stub"].CreateFinding
206206

207+
@property
208+
def create_notification_config(self):
209+
"""Return the gRPC stub for :meth:`SecurityCenterClient.create_notification_config`.
210+
211+
Creates a notification config.
212+
213+
Returns:
214+
Callable: A callable which accepts the appropriate
215+
deserialized request object and returns a
216+
deserialized response object.
217+
"""
218+
return self._stubs["security_center_stub"].CreateNotificationConfig
219+
220+
@property
221+
def delete_notification_config(self):
222+
"""Return the gRPC stub for :meth:`SecurityCenterClient.delete_notification_config`.
223+
224+
Deletes a notification config.
225+
226+
Returns:
227+
Callable: A callable which accepts the appropriate
228+
deserialized request object and returns a
229+
deserialized response object.
230+
"""
231+
return self._stubs["security_center_stub"].DeleteNotificationConfig
232+
233+
@property
234+
def get_notification_config(self):
235+
"""Return the gRPC stub for :meth:`SecurityCenterClient.get_notification_config`.
236+
237+
Gets a notification config.
238+
239+
Returns:
240+
Callable: A callable which accepts the appropriate
241+
deserialized request object and returns a
242+
deserialized response object.
243+
"""
244+
return self._stubs["security_center_stub"].GetNotificationConfig
245+
207246
@property
208247
def get_organization_settings(self):
209248
"""Return the gRPC stub for :meth:`SecurityCenterClient.get_organization_settings`.
@@ -259,6 +298,19 @@ def list_findings(self):
259298
"""
260299
return self._stubs["security_center_stub"].ListFindings
261300

301+
@property
302+
def list_notification_configs(self):
303+
"""Return the gRPC stub for :meth:`SecurityCenterClient.list_notification_configs`.
304+
305+
Lists notification configs.
306+
307+
Returns:
308+
Callable: A callable which accepts the appropriate
309+
deserialized request object and returns a
310+
deserialized response object.
311+
"""
312+
return self._stubs["security_center_stub"].ListNotificationConfigs
313+
262314
@property
263315
def list_sources(self):
264316
"""Return the gRPC stub for :meth:`SecurityCenterClient.list_sources`.
@@ -330,6 +382,19 @@ def update_finding(self):
330382
"""
331383
return self._stubs["security_center_stub"].UpdateFinding
332384

385+
@property
386+
def update_notification_config(self):
387+
"""Return the gRPC stub for :meth:`SecurityCenterClient.update_notification_config`.
388+
389+
Updates a notification config.
390+
391+
Returns:
392+
Callable: A callable which accepts the appropriate
393+
deserialized request object and returns a
394+
deserialized response object.
395+
"""
396+
return self._stubs["security_center_stub"].UpdateNotificationConfig
397+
333398
@property
334399
def update_organization_settings(self):
335400
"""Return the gRPC stub for :meth:`SecurityCenterClient.update_organization_settings`.

google/cloud/securitycenter_v1/proto/asset.proto

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2020 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,17 +11,16 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

1817
package google.cloud.securitycenter.v1;
1918

19+
import "google/api/annotations.proto";
2020
import "google/api/resource.proto";
2121
import "google/cloud/securitycenter/v1/security_marks.proto";
2222
import "google/protobuf/struct.proto";
2323
import "google/protobuf/timestamp.proto";
24-
import "google/api/annotations.proto";
2524

2625
option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
2726
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";

google/cloud/securitycenter_v1/proto/asset_pb2.py

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

google/cloud/securitycenter_v1/proto/finding.proto

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2020 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,18 +11,17 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

1817
package google.cloud.securitycenter.v1;
1918

19+
import "google/api/annotations.proto";
2020
import "google/api/field_behavior.proto";
2121
import "google/api/resource.proto";
2222
import "google/cloud/securitycenter/v1/security_marks.proto";
2323
import "google/protobuf/struct.proto";
2424
import "google/protobuf/timestamp.proto";
25-
import "google/api/annotations.proto";
2625

2726
option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
2827
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";

google/cloud/securitycenter_v1/proto/finding_pb2.py

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)