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

Commit dfaf574

Browse files
chore: Update gapic-generator-python to v1.6.1 (#246)
* chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud.<api>.__version__` PiperOrigin-RevId: 484665853 Source-Link: googleapis/googleapis@8eb249a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update version in gapic_version.py * add .release-please-manifest.json with correct version * add owlbot.py to exclude generated gapic_version.py * set manifest to true in .github/release-please.yml * add release-please-config.json * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: googleapis/googleapis@da380c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: googleapis/googleapis@5be5981 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update path to snippet metadata json * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: googleapis/googleapis@08f275f Source-Link: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 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> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent dc4500b commit dfaf574

File tree

64 files changed

+1108
-746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1108
-746
lines changed

‎.github/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
releaseType: python
22
handleGHRelease: true
3+
manifest: true
34
# NOTE: this section is generated by synthtool.languages.python
45
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
56
branches:

‎.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.9.2"
3+
}

‎docs/websecurityscanner_v1/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Websecurityscanner v1 API
33

44
.. automodule:: google.cloud.websecurityscanner_v1.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

‎docs/websecurityscanner_v1alpha/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Websecurityscanner v1alpha API
33

44
.. automodule:: google.cloud.websecurityscanner_v1alpha.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

‎docs/websecurityscanner_v1beta/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Websecurityscanner v1beta API
33

44
.. automodule:: google.cloud.websecurityscanner_v1beta.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

‎google/cloud/websecurityscanner/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.websecurityscanner import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from google.cloud.websecurityscanner_v1.services.web_security_scanner.async_client import (
1822
WebSecurityScannerAsyncClient,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "1.9.2" # {x-release-please-version}

‎google/cloud/websecurityscanner_v1/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.websecurityscanner import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.web_security_scanner import (
1822
WebSecurityScannerAsyncClient,

‎google/cloud/websecurityscanner_v1/services/web_security_scanner/async_client.py

Lines changed: 66 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
MutableMapping,
23+
MutableSequence,
24+
Optional,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
)
2030

2131
from google.api_core import exceptions as core_exceptions
2232
from google.api_core import gapic_v1
@@ -176,9 +186,9 @@ def transport(self) -> WebSecurityScannerTransport:
176186
def __init__(
177187
self,
178188
*,
179-
credentials: ga_credentials.Credentials = None,
189+
credentials: Optional[ga_credentials.Credentials] = None,
180190
transport: Union[str, WebSecurityScannerTransport] = "grpc_asyncio",
181-
client_options: ClientOptions = None,
191+
client_options: Optional[ClientOptions] = None,
182192
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
183193
) -> None:
184194
"""Instantiates the web security scanner client.
@@ -222,10 +232,12 @@ def __init__(
222232

223233
async def create_scan_config(
224234
self,
225-
request: Union[web_security_scanner.CreateScanConfigRequest, dict] = None,
235+
request: Optional[
236+
Union[web_security_scanner.CreateScanConfigRequest, dict]
237+
] = None,
226238
*,
227239
retry: OptionalRetry = gapic_v1.method.DEFAULT,
228-
timeout: float = None,
240+
timeout: Optional[float] = None,
229241
metadata: Sequence[Tuple[str, str]] = (),
230242
) -> scan_config.ScanConfig:
231243
r"""Creates a new ScanConfig.
@@ -256,7 +268,7 @@ async def sample_create_scan_config():
256268
print(response)
257269
258270
Args:
259-
request (Union[google.cloud.websecurityscanner_v1.types.CreateScanConfigRequest, dict]):
271+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.CreateScanConfigRequest, dict]]):
260272
The request object. Request for the `CreateScanConfig`
261273
method.
262274
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -301,10 +313,12 @@ async def sample_create_scan_config():
301313

302314
async def delete_scan_config(
303315
self,
304-
request: Union[web_security_scanner.DeleteScanConfigRequest, dict] = None,
316+
request: Optional[
317+
Union[web_security_scanner.DeleteScanConfigRequest, dict]
318+
] = None,
305319
*,
306320
retry: OptionalRetry = gapic_v1.method.DEFAULT,
307-
timeout: float = None,
321+
timeout: Optional[float] = None,
308322
metadata: Sequence[Tuple[str, str]] = (),
309323
) -> None:
310324
r"""Deletes an existing ScanConfig and its child
@@ -333,7 +347,7 @@ async def sample_delete_scan_config():
333347
await client.delete_scan_config(request=request)
334348
335349
Args:
336-
request (Union[google.cloud.websecurityscanner_v1.types.DeleteScanConfigRequest, dict]):
350+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.DeleteScanConfigRequest, dict]]):
337351
The request object. Request for the `DeleteScanConfig`
338352
method.
339353
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -379,10 +393,12 @@ async def sample_delete_scan_config():
379393

380394
async def get_scan_config(
381395
self,
382-
request: Union[web_security_scanner.GetScanConfigRequest, dict] = None,
396+
request: Optional[
397+
Union[web_security_scanner.GetScanConfigRequest, dict]
398+
] = None,
383399
*,
384400
retry: OptionalRetry = gapic_v1.method.DEFAULT,
385-
timeout: float = None,
401+
timeout: Optional[float] = None,
386402
metadata: Sequence[Tuple[str, str]] = (),
387403
) -> scan_config.ScanConfig:
388404
r"""Gets a ScanConfig.
@@ -413,7 +429,7 @@ async def sample_get_scan_config():
413429
print(response)
414430
415431
Args:
416-
request (Union[google.cloud.websecurityscanner_v1.types.GetScanConfigRequest, dict]):
432+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.GetScanConfigRequest, dict]]):
417433
The request object. Request for the `GetScanConfig`
418434
method.
419435
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -468,10 +484,12 @@ async def sample_get_scan_config():
468484

469485
async def list_scan_configs(
470486
self,
471-
request: Union[web_security_scanner.ListScanConfigsRequest, dict] = None,
487+
request: Optional[
488+
Union[web_security_scanner.ListScanConfigsRequest, dict]
489+
] = None,
472490
*,
473491
retry: OptionalRetry = gapic_v1.method.DEFAULT,
474-
timeout: float = None,
492+
timeout: Optional[float] = None,
475493
metadata: Sequence[Tuple[str, str]] = (),
476494
) -> pagers.ListScanConfigsAsyncPager:
477495
r"""Lists ScanConfigs under a given project.
@@ -503,7 +521,7 @@ async def sample_list_scan_configs():
503521
print(response)
504522
505523
Args:
506-
request (Union[google.cloud.websecurityscanner_v1.types.ListScanConfigsRequest, dict]):
524+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.ListScanConfigsRequest, dict]]):
507525
The request object. Request for the `ListScanConfigs`
508526
method.
509527
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -569,10 +587,12 @@ async def sample_list_scan_configs():
569587

570588
async def update_scan_config(
571589
self,
572-
request: Union[web_security_scanner.UpdateScanConfigRequest, dict] = None,
590+
request: Optional[
591+
Union[web_security_scanner.UpdateScanConfigRequest, dict]
592+
] = None,
573593
*,
574594
retry: OptionalRetry = gapic_v1.method.DEFAULT,
575-
timeout: float = None,
595+
timeout: Optional[float] = None,
576596
metadata: Sequence[Tuple[str, str]] = (),
577597
) -> scan_config.ScanConfig:
578598
r"""Updates a ScanConfig. This method support partial
@@ -604,7 +624,7 @@ async def sample_update_scan_config():
604624
print(response)
605625
606626
Args:
607-
request (Union[google.cloud.websecurityscanner_v1.types.UpdateScanConfigRequest, dict]):
627+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.UpdateScanConfigRequest, dict]]):
608628
The request object. Request for the
609629
`UpdateScanConfigRequest` method.
610630
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -651,10 +671,10 @@ async def sample_update_scan_config():
651671

652672
async def start_scan_run(
653673
self,
654-
request: Union[web_security_scanner.StartScanRunRequest, dict] = None,
674+
request: Optional[Union[web_security_scanner.StartScanRunRequest, dict]] = None,
655675
*,
656676
retry: OptionalRetry = gapic_v1.method.DEFAULT,
657-
timeout: float = None,
677+
timeout: Optional[float] = None,
658678
metadata: Sequence[Tuple[str, str]] = (),
659679
) -> scan_run.ScanRun:
660680
r"""Start a ScanRun according to the given ScanConfig.
@@ -685,7 +705,7 @@ async def sample_start_scan_run():
685705
print(response)
686706
687707
Args:
688-
request (Union[google.cloud.websecurityscanner_v1.types.StartScanRunRequest, dict]):
708+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.StartScanRunRequest, dict]]):
689709
The request object. Request for the `StartScanRun`
690710
method.
691711
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -731,10 +751,10 @@ async def sample_start_scan_run():
731751

732752
async def get_scan_run(
733753
self,
734-
request: Union[web_security_scanner.GetScanRunRequest, dict] = None,
754+
request: Optional[Union[web_security_scanner.GetScanRunRequest, dict]] = None,
735755
*,
736756
retry: OptionalRetry = gapic_v1.method.DEFAULT,
737-
timeout: float = None,
757+
timeout: Optional[float] = None,
738758
metadata: Sequence[Tuple[str, str]] = (),
739759
) -> scan_run.ScanRun:
740760
r"""Gets a ScanRun.
@@ -765,7 +785,7 @@ async def sample_get_scan_run():
765785
print(response)
766786
767787
Args:
768-
request (Union[google.cloud.websecurityscanner_v1.types.GetScanRunRequest, dict]):
788+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.GetScanRunRequest, dict]]):
769789
The request object. Request for the `GetScanRun` method.
770790
retry (google.api_core.retry.Retry): Designation of what errors, if any,
771791
should be retried.
@@ -820,10 +840,10 @@ async def sample_get_scan_run():
820840

821841
async def list_scan_runs(
822842
self,
823-
request: Union[web_security_scanner.ListScanRunsRequest, dict] = None,
843+
request: Optional[Union[web_security_scanner.ListScanRunsRequest, dict]] = None,
824844
*,
825845
retry: OptionalRetry = gapic_v1.method.DEFAULT,
826-
timeout: float = None,
846+
timeout: Optional[float] = None,
827847
metadata: Sequence[Tuple[str, str]] = (),
828848
) -> pagers.ListScanRunsAsyncPager:
829849
r"""Lists ScanRuns under a given ScanConfig, in
@@ -856,7 +876,7 @@ async def sample_list_scan_runs():
856876
print(response)
857877
858878
Args:
859-
request (Union[google.cloud.websecurityscanner_v1.types.ListScanRunsRequest, dict]):
879+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.ListScanRunsRequest, dict]]):
860880
The request object. Request for the `ListScanRuns`
861881
method.
862882
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -922,10 +942,10 @@ async def sample_list_scan_runs():
922942

923943
async def stop_scan_run(
924944
self,
925-
request: Union[web_security_scanner.StopScanRunRequest, dict] = None,
945+
request: Optional[Union[web_security_scanner.StopScanRunRequest, dict]] = None,
926946
*,
927947
retry: OptionalRetry = gapic_v1.method.DEFAULT,
928-
timeout: float = None,
948+
timeout: Optional[float] = None,
929949
metadata: Sequence[Tuple[str, str]] = (),
930950
) -> scan_run.ScanRun:
931951
r"""Stops a ScanRun. The stopped ScanRun is returned.
@@ -956,7 +976,7 @@ async def sample_stop_scan_run():
956976
print(response)
957977
958978
Args:
959-
request (Union[google.cloud.websecurityscanner_v1.types.StopScanRunRequest, dict]):
979+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.StopScanRunRequest, dict]]):
960980
The request object. Request for the `StopScanRun`
961981
method.
962982
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -1002,10 +1022,12 @@ async def sample_stop_scan_run():
10021022

10031023
async def list_crawled_urls(
10041024
self,
1005-
request: Union[web_security_scanner.ListCrawledUrlsRequest, dict] = None,
1025+
request: Optional[
1026+
Union[web_security_scanner.ListCrawledUrlsRequest, dict]
1027+
] = None,
10061028
*,
10071029
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1008-
timeout: float = None,
1030+
timeout: Optional[float] = None,
10091031
metadata: Sequence[Tuple[str, str]] = (),
10101032
) -> pagers.ListCrawledUrlsAsyncPager:
10111033
r"""List CrawledUrls under a given ScanRun.
@@ -1037,7 +1059,7 @@ async def sample_list_crawled_urls():
10371059
print(response)
10381060
10391061
Args:
1040-
request (Union[google.cloud.websecurityscanner_v1.types.ListCrawledUrlsRequest, dict]):
1062+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.ListCrawledUrlsRequest, dict]]):
10411063
The request object. Request for the `ListCrawledUrls`
10421064
method.
10431065
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -1103,10 +1125,10 @@ async def sample_list_crawled_urls():
11031125

11041126
async def get_finding(
11051127
self,
1106-
request: Union[web_security_scanner.GetFindingRequest, dict] = None,
1128+
request: Optional[Union[web_security_scanner.GetFindingRequest, dict]] = None,
11071129
*,
11081130
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1109-
timeout: float = None,
1131+
timeout: Optional[float] = None,
11101132
metadata: Sequence[Tuple[str, str]] = (),
11111133
) -> finding.Finding:
11121134
r"""Gets a Finding.
@@ -1137,7 +1159,7 @@ async def sample_get_finding():
11371159
print(response)
11381160
11391161
Args:
1140-
request (Union[google.cloud.websecurityscanner_v1.types.GetFindingRequest, dict]):
1162+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.GetFindingRequest, dict]]):
11411163
The request object. Request for the `GetFinding` method.
11421164
retry (google.api_core.retry.Retry): Designation of what errors, if any,
11431165
should be retried.
@@ -1192,10 +1214,10 @@ async def sample_get_finding():
11921214

11931215
async def list_findings(
11941216
self,
1195-
request: Union[web_security_scanner.ListFindingsRequest, dict] = None,
1217+
request: Optional[Union[web_security_scanner.ListFindingsRequest, dict]] = None,
11961218
*,
11971219
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1198-
timeout: float = None,
1220+
timeout: Optional[float] = None,
11991221
metadata: Sequence[Tuple[str, str]] = (),
12001222
) -> pagers.ListFindingsAsyncPager:
12011223
r"""List Findings under a given ScanRun.
@@ -1227,7 +1249,7 @@ async def sample_list_findings():
12271249
print(response)
12281250
12291251
Args:
1230-
request (Union[google.cloud.websecurityscanner_v1.types.ListFindingsRequest, dict]):
1252+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.ListFindingsRequest, dict]]):
12311253
The request object. Request for the `ListFindings`
12321254
method.
12331255
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -1293,10 +1315,12 @@ async def sample_list_findings():
12931315

12941316
async def list_finding_type_stats(
12951317
self,
1296-
request: Union[web_security_scanner.ListFindingTypeStatsRequest, dict] = None,
1318+
request: Optional[
1319+
Union[web_security_scanner.ListFindingTypeStatsRequest, dict]
1320+
] = None,
12971321
*,
12981322
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1299-
timeout: float = None,
1323+
timeout: Optional[float] = None,
13001324
metadata: Sequence[Tuple[str, str]] = (),
13011325
) -> web_security_scanner.ListFindingTypeStatsResponse:
13021326
r"""List all FindingTypeStats under a given ScanRun.
@@ -1327,7 +1351,7 @@ async def sample_list_finding_type_stats():
13271351
print(response)
13281352
13291353
Args:
1330-
request (Union[google.cloud.websecurityscanner_v1.types.ListFindingTypeStatsRequest, dict]):
1354+
request (Optional[Union[google.cloud.websecurityscanner_v1.types.ListFindingTypeStatsRequest, dict]]):
13311355
The request object. Request for the
13321356
`ListFindingTypeStats` method.
13331357
retry (google.api_core.retry.Retry): Designation of what errors, if any,

0 commit comments

Comments
 (0)