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

Commit 149f428

Browse files
chore: use gapic-generator-python 0.51.2 (#88)
- [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: googleapis/googleapis@b224dfa Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
1 parent 1f57e7c commit 149f428

File tree

9 files changed

+35
-35
lines changed

9 files changed

+35
-35
lines changed

google/cloud/dataqna_v1alpha/services/auto_suggestion_service/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from distutils import util
1818
import os
1919
import re
20-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
20+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2121
import pkg_resources
2222

2323
from google.api_core import client_options as client_options_lib # type: ignore
@@ -408,7 +408,7 @@ def __init__(
408408

409409
def suggest_queries(
410410
self,
411-
request: auto_suggestion_service.SuggestQueriesRequest = None,
411+
request: Union[auto_suggestion_service.SuggestQueriesRequest, dict] = None,
412412
*,
413413
retry: retries.Retry = gapic_v1.method.DEFAULT,
414414
timeout: float = None,
@@ -418,7 +418,7 @@ def suggest_queries(
418418
AutoSuggestion tolerance should be less than 1 second.
419419
420420
Args:
421-
request (google.cloud.dataqna_v1alpha.types.SuggestQueriesRequest):
421+
request (Union[google.cloud.dataqna_v1alpha.types.SuggestQueriesRequest, dict]):
422422
The request object. Request for query suggestions.
423423
retry (google.api_core.retry.Retry): Designation of what errors, if any,
424424
should be retried.

google/cloud/dataqna_v1alpha/services/auto_suggestion_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __init__(
115115
**scopes_kwargs, quota_project_id=quota_project_id
116116
)
117117

118-
# If the credentials is service account credentials, then always try to use self signed JWT.
118+
# If the credentials are service account credentials, then always try to use self signed JWT.
119119
if (
120120
always_use_jwt_access
121121
and isinstance(credentials, service_account.Credentials)

google/cloud/dataqna_v1alpha/services/auto_suggestion_service/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,16 @@ def __init__(
150150
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
151151
If provided, it overrides the ``host`` argument and tries to create
152152
a mutual TLS channel with client SSL credentials from
153-
``client_cert_source`` or applicatin default SSL credentials.
153+
``client_cert_source`` or application default SSL credentials.
154154
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
155155
Deprecated. A callback to provide client SSL certificate bytes and
156156
private key bytes, both in PEM format. It is ignored if
157157
``api_mtls_endpoint`` is None.
158158
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
159-
for grpc channel. It is ignored if ``channel`` is provided.
159+
for the grpc channel. It is ignored if ``channel`` is provided.
160160
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
161161
A callback to provide client certificate bytes and private key bytes,
162-
both in PEM format. It is used to configure mutual TLS channel. It is
162+
both in PEM format. It is used to configure a mutual TLS channel. It is
163163
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
164164
quota_project_id (Optional[str]): An optional project to use for billing
165165
and quota.

google/cloud/dataqna_v1alpha/services/auto_suggestion_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,16 @@ def __init__(
197197
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
198198
If provided, it overrides the ``host`` argument and tries to create
199199
a mutual TLS channel with client SSL credentials from
200-
``client_cert_source`` or applicatin default SSL credentials.
200+
``client_cert_source`` or application default SSL credentials.
201201
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
202202
Deprecated. A callback to provide client SSL certificate bytes and
203203
private key bytes, both in PEM format. It is ignored if
204204
``api_mtls_endpoint`` is None.
205205
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
206-
for grpc channel. It is ignored if ``channel`` is provided.
206+
for the grpc channel. It is ignored if ``channel`` is provided.
207207
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
208208
A callback to provide client certificate bytes and private key bytes,
209-
both in PEM format. It is used to configure mutual TLS channel. It is
209+
both in PEM format. It is used to configure a mutual TLS channel. It is
210210
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
211211
quota_project_id (Optional[str]): An optional project to use for billing
212212
and quota.

google/cloud/dataqna_v1alpha/services/question_service/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from distutils import util
1818
import os
1919
import re
20-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
20+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2121
import pkg_resources
2222

2323
from google.api_core import client_options as client_options_lib # type: ignore
@@ -391,7 +391,7 @@ def __init__(
391391

392392
def get_question(
393393
self,
394-
request: question_service.GetQuestionRequest = None,
394+
request: Union[question_service.GetQuestionRequest, dict] = None,
395395
*,
396396
name: str = None,
397397
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -401,7 +401,7 @@ def get_question(
401401
r"""Gets a previously created question.
402402
403403
Args:
404-
request (google.cloud.dataqna_v1alpha.types.GetQuestionRequest):
404+
request (Union[google.cloud.dataqna_v1alpha.types.GetQuestionRequest, dict]):
405405
The request object. A request to get a previously
406406
created question.
407407
name (str):
@@ -465,7 +465,7 @@ def get_question(
465465

466466
def create_question(
467467
self,
468-
request: question_service.CreateQuestionRequest = None,
468+
request: Union[question_service.CreateQuestionRequest, dict] = None,
469469
*,
470470
parent: str = None,
471471
question: gcd_question.Question = None,
@@ -476,7 +476,7 @@ def create_question(
476476
r"""Creates a question.
477477
478478
Args:
479-
request (google.cloud.dataqna_v1alpha.types.CreateQuestionRequest):
479+
request (Union[google.cloud.dataqna_v1alpha.types.CreateQuestionRequest, dict]):
480480
The request object. Request to create a question
481481
resource.
482482
parent (str):
@@ -548,7 +548,7 @@ def create_question(
548548

549549
def execute_question(
550550
self,
551-
request: question_service.ExecuteQuestionRequest = None,
551+
request: Union[question_service.ExecuteQuestionRequest, dict] = None,
552552
*,
553553
name: str = None,
554554
interpretation_index: int = None,
@@ -559,7 +559,7 @@ def execute_question(
559559
r"""Executes an interpretation.
560560
561561
Args:
562-
request (google.cloud.dataqna_v1alpha.types.ExecuteQuestionRequest):
562+
request (Union[google.cloud.dataqna_v1alpha.types.ExecuteQuestionRequest, dict]):
563563
The request object. Request to execute an
564564
interpretation.
565565
name (str):
@@ -632,7 +632,7 @@ def execute_question(
632632

633633
def get_user_feedback(
634634
self,
635-
request: question_service.GetUserFeedbackRequest = None,
635+
request: Union[question_service.GetUserFeedbackRequest, dict] = None,
636636
*,
637637
name: str = None,
638638
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -642,7 +642,7 @@ def get_user_feedback(
642642
r"""Gets previously created user feedback.
643643
644644
Args:
645-
request (google.cloud.dataqna_v1alpha.types.GetUserFeedbackRequest):
645+
request (Union[google.cloud.dataqna_v1alpha.types.GetUserFeedbackRequest, dict]):
646646
The request object. Request to get user feedback.
647647
name (str):
648648
Required. The unique identifier for the user feedback.
@@ -702,7 +702,7 @@ def get_user_feedback(
702702

703703
def update_user_feedback(
704704
self,
705-
request: question_service.UpdateUserFeedbackRequest = None,
705+
request: Union[question_service.UpdateUserFeedbackRequest, dict] = None,
706706
*,
707707
user_feedback: gcd_user_feedback.UserFeedback = None,
708708
update_mask: field_mask_pb2.FieldMask = None,
@@ -714,7 +714,7 @@ def update_user_feedback(
714714
there was none before (upsert).
715715
716716
Args:
717-
request (google.cloud.dataqna_v1alpha.types.UpdateUserFeedbackRequest):
717+
request (Union[google.cloud.dataqna_v1alpha.types.UpdateUserFeedbackRequest, dict]):
718718
The request object. Request to updates user feedback.
719719
user_feedback (google.cloud.dataqna_v1alpha.types.UserFeedback):
720720
Required. The user feedback to

google/cloud/dataqna_v1alpha/services/question_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def __init__(
119119
**scopes_kwargs, quota_project_id=quota_project_id
120120
)
121121

122-
# If the credentials is service account credentials, then always try to use self signed JWT.
122+
# If the credentials are service account credentials, then always try to use self signed JWT.
123123
if (
124124
always_use_jwt_access
125125
and isinstance(credentials, service_account.Credentials)

google/cloud/dataqna_v1alpha/services/question_service/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@ def __init__(
100100
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
101101
If provided, it overrides the ``host`` argument and tries to create
102102
a mutual TLS channel with client SSL credentials from
103-
``client_cert_source`` or applicatin default SSL credentials.
103+
``client_cert_source`` or application default SSL credentials.
104104
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
105105
Deprecated. A callback to provide client SSL certificate bytes and
106106
private key bytes, both in PEM format. It is ignored if
107107
``api_mtls_endpoint`` is None.
108108
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
109-
for grpc channel. It is ignored if ``channel`` is provided.
109+
for the grpc channel. It is ignored if ``channel`` is provided.
110110
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
111111
A callback to provide client certificate bytes and private key bytes,
112-
both in PEM format. It is used to configure mutual TLS channel. It is
112+
both in PEM format. It is used to configure a mutual TLS channel. It is
113113
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
114114
quota_project_id (Optional[str]): An optional project to use for billing
115115
and quota.

google/cloud/dataqna_v1alpha/services/question_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,16 @@ def __init__(
147147
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
148148
If provided, it overrides the ``host`` argument and tries to create
149149
a mutual TLS channel with client SSL credentials from
150-
``client_cert_source`` or applicatin default SSL credentials.
150+
``client_cert_source`` or application default SSL credentials.
151151
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
152152
Deprecated. A callback to provide client SSL certificate bytes and
153153
private key bytes, both in PEM format. It is ignored if
154154
``api_mtls_endpoint`` is None.
155155
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
156-
for grpc channel. It is ignored if ``channel`` is provided.
156+
for the grpc channel. It is ignored if ``channel`` is provided.
157157
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
158158
A callback to provide client certificate bytes and private key bytes,
159-
both in PEM format. It is used to configure mutual TLS channel. It is
159+
both in PEM format. It is used to configure a mutual TLS channel. It is
160160
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
161161
quota_project_id (Optional[str]): An optional project to use for billing
162162
and quota.

scripts/fixup_dataqna_v1alpha_keywords.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def partition(
3939
class dataqnaCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'create_question': ('parent', 'question', ),
43-
'execute_question': ('name', 'interpretation_index', ),
44-
'get_question': ('name', 'read_mask', ),
45-
'get_user_feedback': ('name', ),
46-
'suggest_queries': ('parent', 'scopes', 'query', 'suggestion_types', ),
47-
'update_user_feedback': ('user_feedback', 'update_mask', ),
42+
'create_question': ('parent', 'question', ),
43+
'execute_question': ('name', 'interpretation_index', ),
44+
'get_question': ('name', 'read_mask', ),
45+
'get_user_feedback': ('name', ),
46+
'suggest_queries': ('parent', 'scopes', 'query', 'suggestion_types', ),
47+
'update_user_feedback': ('user_feedback', 'update_mask', ),
4848
}
4949

5050
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -63,7 +63,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
6363
return updated
6464

6565
kwargs, ctrl_kwargs = partition(
66-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
66+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6767
kwargs
6868
)
6969

0 commit comments

Comments
 (0)