Skip to content

Commit 7656037

Browse files
chore: upgrade gapic-generator-python to 0.46.3 (#73)
PiperOrigin-RevId: 373649163 Source-Link: googleapis/googleapis@7e1b14e Source-Link: googleapis/googleapis-gen@0a3c7d2
1 parent 90ef918 commit 7656037

File tree

19 files changed

+500
-186
lines changed

19 files changed

+500
-186
lines changed

packages/google-cloud-phishing-protection/google/cloud/phishingprotection/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,12 +14,13 @@
1514
# limitations under the License.
1615
#
1716

18-
from google.cloud.phishingprotection_v1beta1.services.phishing_protection_service_v1_beta1.async_client import (
19-
PhishingProtectionServiceV1Beta1AsyncClient,
20-
)
2117
from google.cloud.phishingprotection_v1beta1.services.phishing_protection_service_v1_beta1.client import (
2218
PhishingProtectionServiceV1Beta1Client,
2319
)
20+
from google.cloud.phishingprotection_v1beta1.services.phishing_protection_service_v1_beta1.async_client import (
21+
PhishingProtectionServiceV1Beta1AsyncClient,
22+
)
23+
2424
from google.cloud.phishingprotection_v1beta1.types.phishingprotection import (
2525
ReportPhishingRequest,
2626
)
@@ -29,8 +29,8 @@
2929
)
3030

3131
__all__ = (
32-
"PhishingProtectionServiceV1Beta1AsyncClient",
3332
"PhishingProtectionServiceV1Beta1Client",
33+
"PhishingProtectionServiceV1Beta1AsyncClient",
3434
"ReportPhishingRequest",
3535
"ReportPhishingResponse",
3636
)

packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,12 +17,16 @@
1817
from .services.phishing_protection_service_v1_beta1 import (
1918
PhishingProtectionServiceV1Beta1Client,
2019
)
20+
from .services.phishing_protection_service_v1_beta1 import (
21+
PhishingProtectionServiceV1Beta1AsyncClient,
22+
)
23+
2124
from .types.phishingprotection import ReportPhishingRequest
2225
from .types.phishingprotection import ReportPhishingResponse
2326

24-
2527
__all__ = (
28+
"PhishingProtectionServiceV1Beta1AsyncClient",
29+
"PhishingProtectionServiceV1Beta1Client",
2630
"ReportPhishingRequest",
2731
"ReportPhishingResponse",
28-
"PhishingProtectionServiceV1Beta1Client",
2932
)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3+
"language": "python",
4+
"libraryPackage": "google.cloud.phishingprotection_v1beta1",
5+
"protoPackage": "google.cloud.phishingprotection.v1beta1",
6+
"schema": "1.0",
7+
"services": {
8+
"PhishingProtectionServiceV1Beta1": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "PhishingProtectionServiceV1Beta1Client",
12+
"rpcs": {
13+
"ReportPhishing": {
14+
"methods": [
15+
"report_phishing"
16+
]
17+
}
18+
}
19+
},
20+
"grpc-async": {
21+
"libraryClient": "PhishingProtectionServiceV1Beta1AsyncClient",
22+
"rpcs": {
23+
"ReportPhishing": {
24+
"methods": [
25+
"report_phishing"
26+
]
27+
}
28+
}
29+
}
30+
}
31+
}
32+
}
33+
}

packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/services/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");

packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/services/phishing_protection_service_v1_beta1/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +13,6 @@
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
1615
#
17-
1816
from .client import PhishingProtectionServiceV1Beta1Client
1917
from .async_client import PhishingProtectionServiceV1Beta1AsyncClient
2018

packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/services/phishing_protection_service_v1_beta1/async_client.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,22 +13,20 @@
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
1615
#
17-
1816
from collections import OrderedDict
1917
import functools
2018
import re
2119
from typing import Dict, Sequence, Tuple, Type, Union
2220
import pkg_resources
2321

2422
import google.api_core.client_options as ClientOptions # type: ignore
25-
from google.api_core import exceptions # type: ignore
23+
from google.api_core import exceptions as core_exceptions # type: ignore
2624
from google.api_core import gapic_v1 # type: ignore
2725
from google.api_core import retry as retries # type: ignore
28-
from google.auth import credentials # type: ignore
26+
from google.auth import credentials as ga_credentials # type: ignore
2927
from google.oauth2 import service_account # type: ignore
3028

3129
from google.cloud.phishingprotection_v1beta1.types import phishingprotection
32-
3330
from .transports.base import (
3431
PhishingProtectionServiceV1Beta1Transport,
3532
DEFAULT_CLIENT_INFO,
@@ -54,28 +51,24 @@ class PhishingProtectionServiceV1Beta1AsyncClient:
5451
parse_common_billing_account_path = staticmethod(
5552
PhishingProtectionServiceV1Beta1Client.parse_common_billing_account_path
5653
)
57-
5854
common_folder_path = staticmethod(
5955
PhishingProtectionServiceV1Beta1Client.common_folder_path
6056
)
6157
parse_common_folder_path = staticmethod(
6258
PhishingProtectionServiceV1Beta1Client.parse_common_folder_path
6359
)
64-
6560
common_organization_path = staticmethod(
6661
PhishingProtectionServiceV1Beta1Client.common_organization_path
6762
)
6863
parse_common_organization_path = staticmethod(
6964
PhishingProtectionServiceV1Beta1Client.parse_common_organization_path
7065
)
71-
7266
common_project_path = staticmethod(
7367
PhishingProtectionServiceV1Beta1Client.common_project_path
7468
)
7569
parse_common_project_path = staticmethod(
7670
PhishingProtectionServiceV1Beta1Client.parse_common_project_path
7771
)
78-
7972
common_location_path = staticmethod(
8073
PhishingProtectionServiceV1Beta1Client.common_location_path
8174
)
@@ -85,7 +78,8 @@ class PhishingProtectionServiceV1Beta1AsyncClient:
8578

8679
@classmethod
8780
def from_service_account_info(cls, info: dict, *args, **kwargs):
88-
"""Creates an instance of this client using the provided credentials info.
81+
"""Creates an instance of this client using the provided credentials
82+
info.
8983
9084
Args:
9185
info (dict): The service account private key info.
@@ -100,7 +94,7 @@ def from_service_account_info(cls, info: dict, *args, **kwargs):
10094
@classmethod
10195
def from_service_account_file(cls, filename: str, *args, **kwargs):
10296
"""Creates an instance of this client using the provided credentials
103-
file.
97+
file.
10498
10599
Args:
106100
filename (str): The path to the service account private key json
@@ -117,7 +111,7 @@ def from_service_account_file(cls, filename: str, *args, **kwargs):
117111

118112
@property
119113
def transport(self) -> PhishingProtectionServiceV1Beta1Transport:
120-
"""Return the transport used by the client instance.
114+
"""Returns the transport used by the client instance.
121115
122116
Returns:
123117
PhishingProtectionServiceV1Beta1Transport: The transport used by the client instance.
@@ -132,14 +126,14 @@ def transport(self) -> PhishingProtectionServiceV1Beta1Transport:
132126
def __init__(
133127
self,
134128
*,
135-
credentials: credentials.Credentials = None,
129+
credentials: ga_credentials.Credentials = None,
136130
transport: Union[
137131
str, PhishingProtectionServiceV1Beta1Transport
138132
] = "grpc_asyncio",
139133
client_options: ClientOptions = None,
140134
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
141135
) -> None:
142-
"""Instantiate the phishing protection service v1 beta1 client.
136+
"""Instantiates the phishing protection service v1 beta1 client.
143137
144138
Args:
145139
credentials (Optional[google.auth.credentials.Credentials]): The
@@ -171,7 +165,6 @@ def __init__(
171165
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
172166
creation failed for any reason.
173167
"""
174-
175168
self._client = PhishingProtectionServiceV1Beta1Client(
176169
credentials=credentials,
177170
transport=transport,
@@ -218,7 +211,6 @@ async def report_phishing(
218211
This corresponds to the ``uri`` field
219212
on the ``request`` instance; if ``request`` is provided, this
220213
should not be set.
221-
222214
retry (google.api_core.retry.Retry): Designation of what errors, if any,
223215
should be retried.
224216
timeout (float): The timeout for this request.
@@ -245,7 +237,6 @@ async def report_phishing(
245237

246238
# If we have keyword arguments corresponding to fields on the
247239
# request, apply these.
248-
249240
if parent is not None:
250241
request.parent = parent
251242
if uri is not None:

0 commit comments

Comments
 (0)