Skip to content

Commit 89d396b

Browse files
authored
Security Center: Generate v1 (googleapis#7495)
* Generate v1 for securitycenter * Blacken
1 parent 632ec6f commit 89d396b

35 files changed

Lines changed: 10200 additions & 14 deletions

securitycenter/docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Client for Cloud Security Command Center API
2+
============================================
3+
4+
.. automodule:: google.cloud.securitycenter_v1
5+
:members:
6+
:inherited-members:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Types for Cloud Security Command Center API Client
2+
==================================================
3+
4+
.. automodule:: google.cloud.securitycenter_v1.types
5+
:members:

securitycenter/docs/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ Api Reference
55
.. toctree::
66
:maxdepth: 2
77

8+
gapic/v1/api
9+
gapic/v1/types
810
gapic/v1beta1/api
9-
gapic/v1beta1/types
11+
gapic/v1beta1/types
12+
changelog

securitycenter/google/cloud/securitycenter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
from __future__ import absolute_import
1818

19-
from google.cloud.securitycenter_v1beta1 import SecurityCenterClient
20-
from google.cloud.securitycenter_v1beta1 import enums
21-
from google.cloud.securitycenter_v1beta1 import types
19+
from google.cloud.securitycenter_v1 import SecurityCenterClient
20+
from google.cloud.securitycenter_v1 import enums
21+
from google.cloud.securitycenter_v1 import types
2222

2323
__all__ = ("enums", "types", "SecurityCenterClient")
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2019 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
from __future__ import absolute_import
18+
19+
from google.cloud.securitycenter_v1 import types
20+
from google.cloud.securitycenter_v1.gapic import enums
21+
from google.cloud.securitycenter_v1.gapic import security_center_client
22+
23+
24+
class SecurityCenterClient(security_center_client.SecurityCenterClient):
25+
__doc__ = security_center_client.SecurityCenterClient.__doc__
26+
enums = enums
27+
28+
29+
__all__ = ("enums", "types", "SecurityCenterClient")

securitycenter/google/cloud/securitycenter_v1/gapic/__init__.py

Whitespace-only changes.
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2019 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
"""Wrappers for protocol buffer enum types."""
17+
18+
import enum
19+
20+
21+
class NullValue(enum.IntEnum):
22+
"""
23+
``NullValue`` is a singleton enumeration to represent the null value for
24+
the ``Value`` type union.
25+
26+
The JSON representation for ``NullValue`` is JSON ``null``.
27+
28+
Attributes:
29+
NULL_VALUE (int): Null value.
30+
"""
31+
32+
NULL_VALUE = 0
33+
34+
35+
class Finding(object):
36+
class State(enum.IntEnum):
37+
"""
38+
The state of the finding.
39+
40+
Attributes:
41+
STATE_UNSPECIFIED (int): Unspecified state.
42+
ACTIVE (int): The finding requires attention and has not been addressed yet.
43+
INACTIVE (int): The finding has been fixed, triaged as a non-issue or otherwise addressed
44+
and is no longer active.
45+
"""
46+
47+
STATE_UNSPECIFIED = 0
48+
ACTIVE = 1
49+
INACTIVE = 2
50+
51+
52+
class ListAssetsResponse(object):
53+
class ListAssetsResult(object):
54+
class StateChange(enum.IntEnum):
55+
"""
56+
The change in state of the asset.
57+
58+
When querying across two points in time this describes the change
59+
between the two points: ADDED, REMOVED, or ACTIVE. If there was no
60+
compare\_duration supplied in the request the state change will be:
61+
UNUSED
62+
63+
Attributes:
64+
UNUSED (int): State change is unused, this is the canonical default for this enum.
65+
ADDED (int): Asset was added between the points in time.
66+
REMOVED (int): Asset was removed between the points in time.
67+
ACTIVE (int): Asset was present at both point(s) in time.
68+
"""
69+
70+
UNUSED = 0
71+
ADDED = 1
72+
REMOVED = 2
73+
ACTIVE = 3
74+
75+
76+
class ListFindingsResponse(object):
77+
class ListFindingsResult(object):
78+
class StateChange(enum.IntEnum):
79+
"""
80+
The change in state of the finding.
81+
82+
When querying across two points in time this describes the change in the
83+
finding between the two points: CHANGED, UNCHANGED, ADDED, or REMOVED.
84+
Findings can not be deleted, so REMOVED implies that the finding at
85+
timestamp does not match the filter specified, but it did at timestamp -
86+
compare\_duration. If there was no compare\_duration supplied in the
87+
request the state change will be: UNUSED
88+
89+
Attributes:
90+
UNUSED (int): State change is unused, this is the canonical default for this enum.
91+
CHANGED (int): The finding has changed state in some way between the points in time
92+
and existed at both points.
93+
UNCHANGED (int): The finding has not changed state between the points in time and
94+
existed at both points.
95+
ADDED (int): The finding was created between the points in time.
96+
REMOVED (int): The finding at timestamp does not match the filter specified, but it did
97+
at timestamp - compare\_duration.
98+
"""
99+
100+
UNUSED = 0
101+
CHANGED = 1
102+
UNCHANGED = 2
103+
ADDED = 3
104+
REMOVED = 4
105+
106+
107+
class OrganizationSettings(object):
108+
class AssetDiscoveryConfig(object):
109+
class InclusionMode(enum.IntEnum):
110+
"""
111+
The mode of inclusion when running Asset Discovery. Asset discovery can
112+
be limited by explicitly identifying projects to be included or
113+
excluded. If INCLUDE\_ONLY is set, then only those projects within the
114+
organization and their children are discovered during asset discovery.
115+
If EXCLUDE is set, then projects that don't match those projects are
116+
discovered during asset discovery. If neither are set, then all projects
117+
within the organization are discovered during asset discovery.
118+
119+
Attributes:
120+
INCLUSION_MODE_UNSPECIFIED (int): Unspecified. Setting the mode with this value will disable
121+
inclusion/exclusion filtering for Asset Discovery.
122+
INCLUDE_ONLY (int): Asset Discovery will capture only the resources within the projects
123+
specified. All other resources will be ignored.
124+
EXCLUDE (int): Asset Discovery will ignore all resources under the projects specified.
125+
All other resources will be retrieved.
126+
"""
127+
128+
INCLUSION_MODE_UNSPECIFIED = 0
129+
INCLUDE_ONLY = 1
130+
EXCLUDE = 2

0 commit comments

Comments
 (0)