Skip to content

Commit 47d994c

Browse files
chore: use gapic-generator-python 0.65.1 (#322)
* chore: use gapic-generator-python 0.65.1 PiperOrigin-RevId: 441524537 Source-Link: googleapis/googleapis@2a27391 Source-Link: googleapis/googleapis-gen@ab6756a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent bf378f7 commit 47d994c

File tree

36 files changed

+6470
-592
lines changed

36 files changed

+6470
-592
lines changed

packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/async_client.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core.client_options import ClientOptions
@@ -279,7 +279,6 @@ async def bulk_mute_findings(
279279
organization, folder or project. The findings matched by
280280
the filter will be muted after the LRO is done.
281281
282-
283282
.. code-block:: python
284283
285284
from google.cloud import securitycenter_v1
@@ -512,7 +511,6 @@ async def create_finding(
512511
r"""Creates a finding. The corresponding source must
513512
exist for finding creation to succeed.
514513
515-
516514
.. code-block:: python
517515
518516
from google.cloud import securitycenter_v1
@@ -1163,17 +1161,17 @@ async def get_iam_policy(
11631161
r"""Gets the access control policy on the specified
11641162
Source.
11651163
1166-
11671164
.. code-block:: python
11681165
11691166
from google.cloud import securitycenter_v1
1167+
from google.iam.v1 import iam_policy_pb2 # type: ignore
11701168
11711169
def sample_get_iam_policy():
11721170
# Create a client
11731171
client = securitycenter_v1.SecurityCenterClient()
11741172
11751173
# Initialize request argument(s)
1176-
request = securitycenter_v1.GetIamPolicyRequest(
1174+
request = iam_policy_pb2.GetIamPolicyRequest(
11771175
resource="resource_value",
11781176
)
11791177
@@ -1762,7 +1760,6 @@ async def group_assets(
17621760
r"""Filters an organization's assets and groups them by
17631761
their specified properties.
17641762
1765-
17661763
.. code-block:: python
17671764
17681765
from google.cloud import securitycenter_v1
@@ -1868,7 +1865,6 @@ async def group_findings(
18681865
/v1/folders/{folder_id}/sources/-/findings,
18691866
/v1/projects/{project_id}/sources/-/findings
18701867
1871-
18721868
.. code-block:: python
18731869
18741870
from google.cloud import securitycenter_v1
@@ -2114,7 +2110,6 @@ async def list_findings(
21142110
To list across all sources provide a ``-`` as the source id.
21152111
Example: /v1/organizations/{organization_id}/sources/-/findings
21162112
2117-
21182113
.. code-block:: python
21192114
21202115
from google.cloud import securitycenter_v1
@@ -2567,7 +2562,6 @@ async def run_asset_discovery(
25672562
organization. If it is called too frequently the caller will
25682563
receive a TOO_MANY_REQUESTS error.
25692564
2570-
25712565
.. code-block:: python
25722566
25732567
from google.cloud import securitycenter_v1
@@ -2924,17 +2918,17 @@ async def set_iam_policy(
29242918
r"""Sets the access control policy on the specified
29252919
Source.
29262920
2927-
29282921
.. code-block:: python
29292922
29302923
from google.cloud import securitycenter_v1
2924+
from google.iam.v1 import iam_policy_pb2 # type: ignore
29312925
29322926
def sample_set_iam_policy():
29332927
# Create a client
29342928
client = securitycenter_v1.SecurityCenterClient()
29352929
29362930
# Initialize request argument(s)
2937-
request = securitycenter_v1.SetIamPolicyRequest(
2931+
request = iam_policy_pb2.SetIamPolicyRequest(
29382932
resource="resource_value",
29392933
)
29402934
@@ -3085,17 +3079,17 @@ async def test_iam_permissions(
30853079
r"""Returns the permissions that a caller has on the
30863080
specified source.
30873081
3088-
30893082
.. code-block:: python
30903083
30913084
from google.cloud import securitycenter_v1
3085+
from google.iam.v1 import iam_policy_pb2 # type: ignore
30923086
30933087
def sample_test_iam_permissions():
30943088
# Create a client
30953089
client = securitycenter_v1.SecurityCenterClient()
30963090
30973091
# Initialize request argument(s)
3098-
request = securitycenter_v1.TestIamPermissionsRequest(
3092+
request = iam_policy_pb2.TestIamPermissionsRequest(
30993093
resource="resource_value",
31003094
permissions=['permissions_value_1', 'permissions_value_2'],
31013095
)
@@ -3313,7 +3307,6 @@ async def update_finding(
33133307
r"""Creates or updates a finding. The corresponding
33143308
source must exist for a finding creation to succeed.
33153309
3316-
33173310
.. code-block:: python
33183311
33193312
from google.cloud import securitycenter_v1
@@ -3538,7 +3531,6 @@ async def update_notification_config(
35383531
r"""Updates a notification config. The following update fields are
35393532
allowed: description, pubsub_topic, streaming_config.filter
35403533
3541-
35423534
.. code-block:: python
35433535
35443536
from google.cloud import securitycenter_v1
@@ -4270,7 +4262,6 @@ async def list_big_query_exports(
42704262
immediately under the folder plus the ones created under
42714263
the projects within the folder are returned.
42724264
4273-
42744265
.. code-block:: python
42754266
42764267
from google.cloud import securitycenter_v1

packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/client.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core import client_options as client_options_lib
@@ -649,7 +649,6 @@ def bulk_mute_findings(
649649
organization, folder or project. The findings matched by
650650
the filter will be muted after the LRO is done.
651651
652-
653652
.. code-block:: python
654653
655654
from google.cloud import securitycenter_v1
@@ -882,7 +881,6 @@ def create_finding(
882881
r"""Creates a finding. The corresponding source must
883882
exist for finding creation to succeed.
884883
885-
886884
.. code-block:: python
887885
888886
from google.cloud import securitycenter_v1
@@ -1541,17 +1539,17 @@ def get_iam_policy(
15411539
r"""Gets the access control policy on the specified
15421540
Source.
15431541
1544-
15451542
.. code-block:: python
15461543
15471544
from google.cloud import securitycenter_v1
1545+
from google.iam.v1 import iam_policy_pb2 # type: ignore
15481546
15491547
def sample_get_iam_policy():
15501548
# Create a client
15511549
client = securitycenter_v1.SecurityCenterClient()
15521550
15531551
# Initialize request argument(s)
1554-
request = securitycenter_v1.GetIamPolicyRequest(
1552+
request = iam_policy_pb2.GetIamPolicyRequest(
15551553
resource="resource_value",
15561554
)
15571555
@@ -2101,7 +2099,6 @@ def group_assets(
21012099
r"""Filters an organization's assets and groups them by
21022100
their specified properties.
21032101
2104-
21052102
.. code-block:: python
21062103
21072104
from google.cloud import securitycenter_v1
@@ -2198,7 +2195,6 @@ def group_findings(
21982195
/v1/folders/{folder_id}/sources/-/findings,
21992196
/v1/projects/{project_id}/sources/-/findings
22002197
2201-
22022198
.. code-block:: python
22032199
22042200
from google.cloud import securitycenter_v1
@@ -2425,7 +2421,6 @@ def list_findings(
24252421
To list across all sources provide a ``-`` as the source id.
24262422
Example: /v1/organizations/{organization_id}/sources/-/findings
24272423
2428-
24292424
.. code-block:: python
24302425
24312426
from google.cloud import securitycenter_v1
@@ -2853,7 +2848,6 @@ def run_asset_discovery(
28532848
organization. If it is called too frequently the caller will
28542849
receive a TOO_MANY_REQUESTS error.
28552850
2856-
28572851
.. code-block:: python
28582852
28592853
from google.cloud import securitycenter_v1
@@ -3210,17 +3204,17 @@ def set_iam_policy(
32103204
r"""Sets the access control policy on the specified
32113205
Source.
32123206
3213-
32143207
.. code-block:: python
32153208
32163209
from google.cloud import securitycenter_v1
3210+
from google.iam.v1 import iam_policy_pb2 # type: ignore
32173211
32183212
def sample_set_iam_policy():
32193213
# Create a client
32203214
client = securitycenter_v1.SecurityCenterClient()
32213215
32223216
# Initialize request argument(s)
3223-
request = securitycenter_v1.SetIamPolicyRequest(
3217+
request = iam_policy_pb2.SetIamPolicyRequest(
32243218
resource="resource_value",
32253219
)
32263220
@@ -3368,17 +3362,17 @@ def test_iam_permissions(
33683362
r"""Returns the permissions that a caller has on the
33693363
specified source.
33703364
3371-
33723365
.. code-block:: python
33733366
33743367
from google.cloud import securitycenter_v1
3368+
from google.iam.v1 import iam_policy_pb2 # type: ignore
33753369
33763370
def sample_test_iam_permissions():
33773371
# Create a client
33783372
client = securitycenter_v1.SecurityCenterClient()
33793373
33803374
# Initialize request argument(s)
3381-
request = securitycenter_v1.TestIamPermissionsRequest(
3375+
request = iam_policy_pb2.TestIamPermissionsRequest(
33823376
resource="resource_value",
33833377
permissions=['permissions_value_1', 'permissions_value_2'],
33843378
)
@@ -3584,7 +3578,6 @@ def update_finding(
35843578
r"""Creates or updates a finding. The corresponding
35853579
source must exist for a finding creation to succeed.
35863580
3587-
35883581
.. code-block:: python
35893582
35903583
from google.cloud import securitycenter_v1
@@ -3809,7 +3802,6 @@ def update_notification_config(
38093802
r"""Updates a notification config. The following update fields are
38103803
allowed: description, pubsub_topic, streaming_config.filter
38113804
3812-
38133805
.. code-block:: python
38143806
38153807
from google.cloud import securitycenter_v1
@@ -4549,7 +4541,6 @@ def list_big_query_exports(
45494541
immediately under the folder plus the ones created under
45504542
the projects within the folder are returned.
45514543
4552-
45534544
.. code-block:: python
45544545
45554546
from google.cloud import securitycenter_v1

packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def __init__(
102102
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
103103
be used for service account credentials.
104104
"""
105+
105106
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
106107
if ":" not in host:
107108
host += ":443"
@@ -826,5 +827,9 @@ def list_big_query_exports(
826827
]:
827828
raise NotImplementedError()
828829

830+
@property
831+
def kind(self) -> str:
832+
raise NotImplementedError()
833+
829834

830835
__all__ = ("SecurityCenterTransport",)

packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,5 +1303,9 @@ def list_big_query_exports(
13031303
def close(self):
13041304
self.grpc_channel.close()
13051305

1306+
@property
1307+
def kind(self) -> str:
1308+
return "grpc"
1309+
13061310

13071311
__all__ = ("SecurityCenterGrpcTransport",)

0 commit comments

Comments
 (0)