Skip to content

Commit 0501b70

Browse files
committed
regenerate client locally; add client-specific post processing
1 parent 8224435 commit 0501b70

19 files changed

Lines changed: 1276 additions & 33 deletions

packages/google-cloud-containeranalysis/docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ API Reference
88
.. toctree::
99
:maxdepth: 2
1010

11-
containeranalysis_v1/services
12-
containeranalysis_v1/types
11+
containeranalysis_v1/services_
12+
containeranalysis_v1/types_
1313

1414

1515
Changelog

packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis/gapic_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2022 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.
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.12.4" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/gapic_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2022 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.
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.12.4" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/async_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ def get_grafeas_client(self) -> grafeas_v1.GrafeasClient:
243243
)
244244
return grafeas_v1.GrafeasClient(transport=grafeas_transport)
245245

246-
# Service calls
247246

248247
async def set_iam_policy(
249248
self,

packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ def get_grafeas_client(self) -> grafeas_v1.GrafeasClient:
452452
)
453453
return grafeas_v1.GrafeasClient(transport=grafeas_transport)
454454

455-
# Service calls
456455

457456
def set_iam_policy(
458457
self,

packages/google-cloud-containeranalysis/noxfile.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,44 @@
2222
import pathlib
2323
import re
2424
import shutil
25+
from typing import Dict, List
2526
import warnings
2627

2728
import nox
2829

29-
BLACK_VERSION = "black==22.3.0"
30-
ISORT_VERSION = "isort==5.10.1"
30+
BLACK_VERSION = "black[jupyter]==23.7.0"
31+
ISORT_VERSION = "isort==5.11.0"
32+
3133
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3234

35+
3336
DEFAULT_PYTHON_VERSION = "3.9"
3437

35-
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
38+
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11"]
3639
UNIT_TEST_STANDARD_DEPENDENCIES = [
3740
"mock",
3841
"asyncmock",
3942
"pytest",
4043
"pytest-cov",
4144
"pytest-asyncio",
4245
]
43-
UNIT_TEST_EXTERNAL_DEPENDENCIES = []
44-
UNIT_TEST_LOCAL_DEPENDENCIES = []
45-
UNIT_TEST_DEPENDENCIES = []
46-
UNIT_TEST_EXTRAS = []
47-
UNIT_TEST_EXTRAS_BY_PYTHON = {}
46+
UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
47+
UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = []
48+
UNIT_TEST_DEPENDENCIES: List[str] = []
49+
UNIT_TEST_EXTRAS: List[str] = []
50+
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
4851

49-
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
52+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11"]
5053
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
5154
"mock",
5255
"pytest",
5356
"google-cloud-testutils",
5457
]
55-
SYSTEM_TEST_EXTERNAL_DEPENDENCIES = []
56-
SYSTEM_TEST_LOCAL_DEPENDENCIES = []
57-
SYSTEM_TEST_DEPENDENCIES = []
58-
SYSTEM_TEST_EXTRAS = []
59-
SYSTEM_TEST_EXTRAS_BY_PYTHON = {}
58+
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
59+
SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = []
60+
SYSTEM_TEST_DEPENDENCIES: List[str] = []
61+
SYSTEM_TEST_EXTRAS: List[str] = []
62+
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
6063

6164
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
6265

@@ -88,6 +91,7 @@ def lint(session):
8891
"--check",
8992
*LINT_PATHS,
9093
)
94+
9195
session.run("flake8", "google", "tests")
9296

9397

@@ -187,7 +191,6 @@ def unit(session):
187191

188192

189193
def install_systemtest_dependencies(session, *constraints):
190-
191194
# Use pre-release gRPC for system tests.
192195
# Exclude version 1.52.0rc1 which has a known issue.
193196
# See https://github.com/grpc/grpc/issues/32163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2023 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+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetIamPolicy
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-containeranalysis
24+
25+
26+
# [START containeranalysis_v1_generated_ContainerAnalysis_GetIamPolicy_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud.devtools import containeranalysis_v1
35+
from google.iam.v1 import iam_policy_pb2 # type: ignore
36+
37+
38+
async def sample_get_iam_policy():
39+
# Create a client
40+
client = containeranalysis_v1.ContainerAnalysisAsyncClient()
41+
42+
# Initialize request argument(s)
43+
request = iam_policy_pb2.GetIamPolicyRequest(
44+
resource="resource_value",
45+
)
46+
47+
# Make the request
48+
response = await client.get_iam_policy(request=request)
49+
50+
# Handle the response
51+
print(response)
52+
53+
# [END containeranalysis_v1_generated_ContainerAnalysis_GetIamPolicy_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2023 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+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetIamPolicy
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-containeranalysis
24+
25+
26+
# [START containeranalysis_v1_generated_ContainerAnalysis_GetIamPolicy_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud.devtools import containeranalysis_v1
35+
from google.iam.v1 import iam_policy_pb2 # type: ignore
36+
37+
38+
def sample_get_iam_policy():
39+
# Create a client
40+
client = containeranalysis_v1.ContainerAnalysisClient()
41+
42+
# Initialize request argument(s)
43+
request = iam_policy_pb2.GetIamPolicyRequest(
44+
resource="resource_value",
45+
)
46+
47+
# Make the request
48+
response = client.get_iam_policy(request=request)
49+
50+
# Handle the response
51+
print(response)
52+
53+
# [END containeranalysis_v1_generated_ContainerAnalysis_GetIamPolicy_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2023 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+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetVulnerabilityOccurrencesSummary
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-containeranalysis
24+
25+
26+
# [START containeranalysis_v1_generated_ContainerAnalysis_GetVulnerabilityOccurrencesSummary_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud.devtools import containeranalysis_v1
35+
36+
37+
async def sample_get_vulnerability_occurrences_summary():
38+
# Create a client
39+
client = containeranalysis_v1.ContainerAnalysisAsyncClient()
40+
41+
# Initialize request argument(s)
42+
request = containeranalysis_v1.GetVulnerabilityOccurrencesSummaryRequest(
43+
parent="parent_value",
44+
)
45+
46+
# Make the request
47+
response = await client.get_vulnerability_occurrences_summary(request=request)
48+
49+
# Handle the response
50+
print(response)
51+
52+
# [END containeranalysis_v1_generated_ContainerAnalysis_GetVulnerabilityOccurrencesSummary_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2023 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+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetVulnerabilityOccurrencesSummary
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-containeranalysis
24+
25+
26+
# [START containeranalysis_v1_generated_ContainerAnalysis_GetVulnerabilityOccurrencesSummary_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud.devtools import containeranalysis_v1
35+
36+
37+
def sample_get_vulnerability_occurrences_summary():
38+
# Create a client
39+
client = containeranalysis_v1.ContainerAnalysisClient()
40+
41+
# Initialize request argument(s)
42+
request = containeranalysis_v1.GetVulnerabilityOccurrencesSummaryRequest(
43+
parent="parent_value",
44+
)
45+
46+
# Make the request
47+
response = client.get_vulnerability_occurrences_summary(request=request)
48+
49+
# Handle the response
50+
print(response)
51+
52+
# [END containeranalysis_v1_generated_ContainerAnalysis_GetVulnerabilityOccurrencesSummary_sync]

0 commit comments

Comments
 (0)