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

Commit 3ce7908

Browse files
chore: Use gapic-generator-python 0.65.0 (#132)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 440970084 Source-Link: googleapis/googleapis@5e0a3d5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b0c628a3fade768f225d76992791ea1ba2a881be Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9 docs: fix type in docstring for map fields
1 parent faa136f commit 3ce7908

File tree

21 files changed

+240
-80
lines changed

21 files changed

+240
-80
lines changed

google/cloud/servicecontrol_v1/services/quota_controller/async_client.py

Lines changed: 1 addition & 2 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
@@ -225,7 +225,6 @@ async def allocate_quota(
225225
inject these errors to prohibit any hard dependency on the quota
226226
functionality.
227227
228-
229228
.. code-block:: python
230229
231230
from google.cloud import servicecontrol_v1

google/cloud/servicecontrol_v1/services/quota_controller/client.py

Lines changed: 1 addition & 2 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
@@ -429,7 +429,6 @@ def allocate_quota(
429429
inject these errors to prohibit any hard dependency on the quota
430430
functionality.
431431
432-
433432
.. code-block:: python
434433
435434
from google.cloud import servicecontrol_v1

google/cloud/servicecontrol_v1/services/quota_controller/transports/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def __init__(
8383
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8484
be used for service account credentials.
8585
"""
86+
8687
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
8788
if ":" not in host:
8889
host += ":443"
@@ -151,5 +152,9 @@ def allocate_quota(
151152
]:
152153
raise NotImplementedError()
153154

155+
@property
156+
def kind(self) -> str:
157+
raise NotImplementedError()
158+
154159

155160
__all__ = ("QuotaControllerTransport",)

google/cloud/servicecontrol_v1/services/quota_controller/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,5 +272,9 @@ def allocate_quota(
272272
def close(self):
273273
self.grpc_channel.close()
274274

275+
@property
276+
def kind(self) -> str:
277+
return "grpc"
278+
275279

276280
__all__ = ("QuotaControllerGrpcTransport",)

google/cloud/servicecontrol_v1/services/service_controller/async_client.py

Lines changed: 2 additions & 4 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
@@ -232,7 +232,6 @@ async def check(
232232
permission on the specified service. For more information, see
233233
`Cloud IAM <https://cloud.google.com/iam>`__.
234234
235-
236235
.. code-block:: python
237236
238237
from google.cloud import servicecontrol_v1
@@ -279,7 +278,7 @@ def sample_check():
279278
maximum=10.0,
280279
multiplier=1.3,
281280
predicate=retries.if_exception_type(
282-
core_exceptions.ServiceUnavailable,
281+
core_exceptions.GoogleAPICallError,
283282
),
284283
deadline=5.0,
285284
),
@@ -325,7 +324,6 @@ async def report(
325324
permission on the specified service. For more information, see
326325
`Google Cloud IAM <https://cloud.google.com/iam>`__.
327326
328-
329327
.. code-block:: python
330328
331329
from google.cloud import servicecontrol_v1

google/cloud/servicecontrol_v1/services/service_controller/client.py

Lines changed: 1 addition & 3 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
@@ -436,7 +436,6 @@ def check(
436436
permission on the specified service. For more information, see
437437
`Cloud IAM <https://cloud.google.com/iam>`__.
438438
439-
440439
.. code-block:: python
441440
442441
from google.cloud import servicecontrol_v1
@@ -521,7 +520,6 @@ def report(
521520
permission on the specified service. For more information, see
522521
`Google Cloud IAM <https://cloud.google.com/iam>`__.
523522
524-
525523
.. code-block:: python
526524
527525
from google.cloud import servicecontrol_v1

google/cloud/servicecontrol_v1/services/service_controller/transports/base.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def __init__(
8383
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8484
be used for service account credentials.
8585
"""
86+
8687
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
8788
if ":" not in host:
8889
host += ":443"
@@ -130,7 +131,7 @@ def _prep_wrapped_messages(self, client_info):
130131
maximum=10.0,
131132
multiplier=1.3,
132133
predicate=retries.if_exception_type(
133-
core_exceptions.ServiceUnavailable,
134+
core_exceptions.GoogleAPICallError,
134135
),
135136
deadline=5.0,
136137
),
@@ -177,5 +178,9 @@ def report(
177178
]:
178179
raise NotImplementedError()
179180

181+
@property
182+
def kind(self) -> str:
183+
raise NotImplementedError()
184+
180185

181186
__all__ = ("ServiceControllerTransport",)

google/cloud/servicecontrol_v1/services/service_controller/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,5 +322,9 @@ def report(
322322
def close(self):
323323
self.grpc_channel.close()
324324

325+
@property
326+
def kind(self) -> str:
327+
return "grpc"
328+
325329

326330
__all__ = ("ServiceControllerGrpcTransport",)

google/cloud/servicecontrol_v1/types/__init__.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .check_error import CheckError
17-
from .distribution import Distribution
18-
from .http_request import HttpRequest
16+
from .check_error import (
17+
CheckError,
18+
)
19+
from .distribution import (
20+
Distribution,
21+
)
22+
from .http_request import (
23+
HttpRequest,
24+
)
1925
from .log_entry import (
2026
LogEntry,
2127
LogEntryOperation,
@@ -25,7 +31,9 @@
2531
MetricValue,
2632
MetricValueSet,
2733
)
28-
from .operation import Operation
34+
from .operation import (
35+
Operation,
36+
)
2937
from .quota_controller import (
3038
AllocateQuotaRequest,
3139
AllocateQuotaResponse,

google/cloud/servicecontrol_v1/types/log_entry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class LogEntry(proto.Message):
6666
A unique ID for the log entry used for deduplication. If
6767
omitted, the implementation will generate one based on
6868
operation_id.
69-
labels (Sequence[google.cloud.servicecontrol_v1.types.LogEntry.LabelsEntry]):
69+
labels (Mapping[str, str]):
7070
A set of user-defined (key, value) data that
7171
provides additional information about the log
7272
entry.

0 commit comments

Comments
 (0)