Skip to content

Commit 9dcbdf7

Browse files
committed
regenerate client locally; add client-specific post processing
1 parent 789cf4a commit 9dcbdf7

709 files changed

Lines changed: 98116 additions & 21 deletions

File tree

Some content is hidden

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

packages/google-cloud-compute/README.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ dependencies.
4747

4848
.. _`venv`: https://docs.python.org/3/library/venv.html
4949

50+
PyCharm/JetBrains IDEs
51+
~~~~~~~~~~~~~~~~~~~~~~
52+
This library has now grown in size past the `JetBrains default size limit of ~2.5Mb`_.
53+
As a result, code completion in JetBrains products can fail to work with the classes from our library. To
54+
fix this, you need to update the ``idea.max.intellisense.filesize`` setting in custom properties
55+
(Help -> Edit custom properties...). Just add the line ``idea.max.intellisense.filesize = 10000`` to change this
56+
limit to ~10Mb.
57+
58+
.. _JetBrains default size limit of ~2.5Mb: https://www.jetbrains.com/help/pycharm/file-idea-properties.html
5059

5160
Code samples and snippets
5261
~~~~~~~~~~~~~~~~~~~~~~~~~

packages/google-cloud-compute/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-
compute_v1/services
12-
compute_v1/types
11+
compute_v1/services_
12+
compute_v1/types_
1313

1414

1515
Changelog

packages/google-cloud-compute/google/cloud/compute/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__ = "1.14.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-compute/google/cloud/compute_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__ = "1.14.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-compute/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
Lines changed: 53 additions & 0 deletions
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 AggregatedList
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-compute
24+
25+
26+
# [START compute_v1_generated_AcceleratorTypes_AggregatedList_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 import compute_v1
35+
36+
37+
def sample_aggregated_list():
38+
# Create a client
39+
client = compute_v1.AcceleratorTypesClient()
40+
41+
# Initialize request argument(s)
42+
request = compute_v1.AggregatedListAcceleratorTypesRequest(
43+
project="project_value",
44+
)
45+
46+
# Make the request
47+
page_result = client.aggregated_list(request=request)
48+
49+
# Handle the response
50+
for response in page_result:
51+
print(response)
52+
53+
# [END compute_v1_generated_AcceleratorTypes_AggregatedList_sync]
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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 Get
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-compute
24+
25+
26+
# [START compute_v1_generated_AcceleratorTypes_Get_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 import compute_v1
35+
36+
37+
def sample_get():
38+
# Create a client
39+
client = compute_v1.AcceleratorTypesClient()
40+
41+
# Initialize request argument(s)
42+
request = compute_v1.GetAcceleratorTypeRequest(
43+
accelerator_type="accelerator_type_value",
44+
project="project_value",
45+
zone="zone_value",
46+
)
47+
48+
# Make the request
49+
response = client.get(request=request)
50+
51+
# Handle the response
52+
print(response)
53+
54+
# [END compute_v1_generated_AcceleratorTypes_Get_sync]
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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 List
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-compute
24+
25+
26+
# [START compute_v1_generated_AcceleratorTypes_List_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 import compute_v1
35+
36+
37+
def sample_list():
38+
# Create a client
39+
client = compute_v1.AcceleratorTypesClient()
40+
41+
# Initialize request argument(s)
42+
request = compute_v1.ListAcceleratorTypesRequest(
43+
project="project_value",
44+
zone="zone_value",
45+
)
46+
47+
# Make the request
48+
page_result = client.list(request=request)
49+
50+
# Handle the response
51+
for response in page_result:
52+
print(response)
53+
54+
# [END compute_v1_generated_AcceleratorTypes_List_sync]
Lines changed: 53 additions & 0 deletions
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 AggregatedList
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-compute
24+
25+
26+
# [START compute_v1_generated_Addresses_AggregatedList_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 import compute_v1
35+
36+
37+
def sample_aggregated_list():
38+
# Create a client
39+
client = compute_v1.AddressesClient()
40+
41+
# Initialize request argument(s)
42+
request = compute_v1.AggregatedListAddressesRequest(
43+
project="project_value",
44+
)
45+
46+
# Make the request
47+
page_result = client.aggregated_list(request=request)
48+
49+
# Handle the response
50+
for response in page_result:
51+
print(response)
52+
53+
# [END compute_v1_generated_Addresses_AggregatedList_sync]

0 commit comments

Comments
 (0)