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

Commit 4a5ed62

Browse files
chore: use gapic-generator-python 0.51.2 (#132)
- [ ] 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 b1e2c0d commit 4a5ed62

File tree

10 files changed

+33
-33
lines changed

10 files changed

+33
-33
lines changed

google/cloud/trace_v1/services/trace_service/client.py

Lines changed: 7 additions & 7 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
@@ -340,7 +340,7 @@ def __init__(
340340

341341
def list_traces(
342342
self,
343-
request: trace.ListTracesRequest = None,
343+
request: Union[trace.ListTracesRequest, dict] = None,
344344
*,
345345
project_id: str = None,
346346
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -351,7 +351,7 @@ def list_traces(
351351
filter conditions.
352352
353353
Args:
354-
request (google.cloud.trace_v1.types.ListTracesRequest):
354+
request (Union[google.cloud.trace_v1.types.ListTracesRequest, dict]):
355355
The request object. The request message for the
356356
`ListTraces` method. All fields are required unless
357357
specified.
@@ -415,7 +415,7 @@ def list_traces(
415415

416416
def get_trace(
417417
self,
418-
request: trace.GetTraceRequest = None,
418+
request: Union[trace.GetTraceRequest, dict] = None,
419419
*,
420420
project_id: str = None,
421421
trace_id: str = None,
@@ -426,7 +426,7 @@ def get_trace(
426426
r"""Gets a single trace by its ID.
427427
428428
Args:
429-
request (google.cloud.trace_v1.types.GetTraceRequest):
429+
request (Union[google.cloud.trace_v1.types.GetTraceRequest, dict]):
430430
The request object. The request message for the
431431
`GetTrace` method.
432432
project_id (str):
@@ -491,7 +491,7 @@ def get_trace(
491491

492492
def patch_traces(
493493
self,
494-
request: trace.PatchTracesRequest = None,
494+
request: Union[trace.PatchTracesRequest, dict] = None,
495495
*,
496496
project_id: str = None,
497497
traces: trace.Traces = None,
@@ -508,7 +508,7 @@ def patch_traces(
508508
a new trace is created.
509509
510510
Args:
511-
request (google.cloud.trace_v1.types.PatchTracesRequest):
511+
request (Union[google.cloud.trace_v1.types.PatchTracesRequest, dict]):
512512
The request object. The request message for the
513513
`PatchTraces` method.
514514
project_id (str):

google/cloud/trace_v1/services/trace_service/transports/base.py

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

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

google/cloud/trace_v1/services/trace_service/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ def __init__(
8686
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8787
If provided, it overrides the ``host`` argument and tries to create
8888
a mutual TLS channel with client SSL credentials from
89-
``client_cert_source`` or applicatin default SSL credentials.
89+
``client_cert_source`` or application default SSL credentials.
9090
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
9191
Deprecated. A callback to provide client SSL certificate bytes and
9292
private key bytes, both in PEM format. It is ignored if
9393
``api_mtls_endpoint`` is None.
9494
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
95-
for grpc channel. It is ignored if ``channel`` is provided.
95+
for the grpc channel. It is ignored if ``channel`` is provided.
9696
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9797
A callback to provide client certificate bytes and private key bytes,
98-
both in PEM format. It is used to configure mutual TLS channel. It is
98+
both in PEM format. It is used to configure a mutual TLS channel. It is
9999
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
100100
quota_project_id (Optional[str]): An optional project to use for billing
101101
and quota.

google/cloud/trace_v1/services/trace_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,16 @@ def __init__(
133133
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
134134
If provided, it overrides the ``host`` argument and tries to create
135135
a mutual TLS channel with client SSL credentials from
136-
``client_cert_source`` or applicatin default SSL credentials.
136+
``client_cert_source`` or application default SSL credentials.
137137
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
138138
Deprecated. A callback to provide client SSL certificate bytes and
139139
private key bytes, both in PEM format. It is ignored if
140140
``api_mtls_endpoint`` is None.
141141
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
142-
for grpc channel. It is ignored if ``channel`` is provided.
142+
for the grpc channel. It is ignored if ``channel`` is provided.
143143
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
144144
A callback to provide client certificate bytes and private key bytes,
145-
both in PEM format. It is used to configure mutual TLS channel. It is
145+
both in PEM format. It is used to configure a mutual TLS channel. It is
146146
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
147147
quota_project_id (Optional[str]): An optional project to use for billing
148148
and quota.

google/cloud/trace_v2/services/trace_service/client.py

Lines changed: 5 additions & 5 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
@@ -359,7 +359,7 @@ def __init__(
359359

360360
def batch_write_spans(
361361
self,
362-
request: tracing.BatchWriteSpansRequest = None,
362+
request: Union[tracing.BatchWriteSpansRequest, dict] = None,
363363
*,
364364
name: str = None,
365365
spans: Sequence[trace.Span] = None,
@@ -371,7 +371,7 @@ def batch_write_spans(
371371
update existing spans.
372372
373373
Args:
374-
request (google.cloud.trace_v2.types.BatchWriteSpansRequest):
374+
request (Union[google.cloud.trace_v2.types.BatchWriteSpansRequest, dict]):
375375
The request object. The request message for the
376376
`BatchWriteSpans` method.
377377
name (str):
@@ -435,7 +435,7 @@ def batch_write_spans(
435435

436436
def create_span(
437437
self,
438-
request: trace.Span = None,
438+
request: Union[trace.Span, dict] = None,
439439
*,
440440
retry: retries.Retry = gapic_v1.method.DEFAULT,
441441
timeout: float = None,
@@ -444,7 +444,7 @@ def create_span(
444444
r"""Creates a new span.
445445
446446
Args:
447-
request (google.cloud.trace_v2.types.Span):
447+
request (Union[google.cloud.trace_v2.types.Span, dict]):
448448
The request object. A span represents a single operation
449449
within a trace. Spans can be nested to form a trace
450450
tree. Often, a trace contains a root span that describes

google/cloud/trace_v2/services/trace_service/transports/base.py

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

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

google/cloud/trace_v2/services/trace_service/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,16 @@ def __init__(
8787
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8888
If provided, it overrides the ``host`` argument and tries to create
8989
a mutual TLS channel with client SSL credentials from
90-
``client_cert_source`` or applicatin default SSL credentials.
90+
``client_cert_source`` or application default SSL credentials.
9191
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
9292
Deprecated. A callback to provide client SSL certificate bytes and
9393
private key bytes, both in PEM format. It is ignored if
9494
``api_mtls_endpoint`` is None.
9595
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
96-
for grpc channel. It is ignored if ``channel`` is provided.
96+
for the grpc channel. It is ignored if ``channel`` is provided.
9797
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9898
A callback to provide client certificate bytes and private key bytes,
99-
both in PEM format. It is used to configure mutual TLS channel. It is
99+
both in PEM format. It is used to configure a mutual TLS channel. It is
100100
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
101101
quota_project_id (Optional[str]): An optional project to use for billing
102102
and quota.

google/cloud/trace_v2/services/trace_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,16 @@ def __init__(
134134
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
135135
If provided, it overrides the ``host`` argument and tries to create
136136
a mutual TLS channel with client SSL credentials from
137-
``client_cert_source`` or applicatin default SSL credentials.
137+
``client_cert_source`` or application default SSL credentials.
138138
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
139139
Deprecated. A callback to provide client SSL certificate bytes and
140140
private key bytes, both in PEM format. It is ignored if
141141
``api_mtls_endpoint`` is None.
142142
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
143-
for grpc channel. It is ignored if ``channel`` is provided.
143+
for the grpc channel. It is ignored if ``channel`` is provided.
144144
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
145145
A callback to provide client certificate bytes and private key bytes,
146-
both in PEM format. It is used to configure mutual TLS channel. It is
146+
both in PEM format. It is used to configure a mutual TLS channel. It is
147147
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
148148
quota_project_id (Optional[str]): An optional project to use for billing
149149
and quota.

scripts/fixup_trace_v1_keywords.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def partition(
3939
class traceCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'get_trace': ('project_id', 'trace_id', ),
43-
'list_traces': ('project_id', 'view', 'page_size', 'page_token', 'start_time', 'end_time', 'filter', 'order_by', ),
44-
'patch_traces': ('project_id', 'traces', ),
42+
'get_trace': ('project_id', 'trace_id', ),
43+
'list_traces': ('project_id', 'view', 'page_size', 'page_token', 'start_time', 'end_time', 'filter', 'order_by', ),
44+
'patch_traces': ('project_id', 'traces', ),
4545
}
4646

4747
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -60,7 +60,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
6060
return updated
6161

6262
kwargs, ctrl_kwargs = partition(
63-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
63+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6464
kwargs
6565
)
6666

scripts/fixup_trace_v2_keywords.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def partition(
3939
class traceCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'batch_write_spans': ('name', 'spans', ),
43-
'create_span': ('name', 'span_id', 'display_name', 'start_time', 'end_time', 'parent_span_id', 'attributes', 'stack_trace', 'time_events', 'links', 'status', 'same_process_as_parent_span', 'child_span_count', 'span_kind', ),
42+
'batch_write_spans': ('name', 'spans', ),
43+
'create_span': ('name', 'span_id', 'display_name', 'start_time', 'end_time', 'parent_span_id', 'attributes', 'stack_trace', 'time_events', 'links', 'status', 'same_process_as_parent_span', 'child_span_count', 'span_kind', ),
4444
}
4545

4646
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -59,7 +59,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
5959
return updated
6060

6161
kwargs, ctrl_kwargs = partition(
62-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
62+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6363
kwargs
6464
)
6565

0 commit comments

Comments
 (0)