Skip to content

Commit 8b9c7bf

Browse files
gcf-owl-bot[bot]ohmayrparthea
authored
feat: [Many APIs] Add support for opt-in debug logging (googleapis#13349)
- [ ] Regenerate this pull request now. fix: Fix typing issue with gRPC metadata when key ends in -bin chore: Update gapic-generator-python to v1.21.0 PiperOrigin-RevId: 705285820 Source-Link: googleapis/googleapis@f9b8b91 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ca1e0a1e472d6e6f5de883a5cb54724f112ce348 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtbWFwc3BsYXRmb3JtZGF0YXNldHMvLk93bEJvdC55YW1sIiwiaCI6ImNhMWUwYTFlNDcyZDZlNmY1ZGU4ODNhNWNiNTQ3MjRmMTEyY2UzNDgifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcGxhY2VzLy5Pd2xCb3QueWFtbCIsImgiOiJjYTFlMGExZTQ3MmQ2ZTZmNWRlODgzYTVjYjU0NzI0ZjExMmNlMzQ4In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGVvcHRpbWl6YXRpb24vLk93bEJvdC55YW1sIiwiaCI6ImNhMWUwYTFlNDcyZDZlNmY1ZGU4ODNhNWNiNTQ3MjRmMTEyY2UzNDgifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiY2ExZTBhMWU0NzJkNmU2ZjVkZTg4M2E1Y2I1NDcyNGYxMTJjZTM0OCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtc29sYXIvLk93bEJvdC55YW1sIiwiaCI6ImNhMWUwYTFlNDcyZDZlNmY1ZGU4ODNhNWNiNTQ3MjRmMTEyY2UzNDgifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLy5Pd2xCb3QueWFtbCIsImgiOiJjYTFlMGExZTQ3MmQ2ZTZmNWRlODgzYTVjYjU0NzI0ZjExMmNlMzQ4In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWNvbnZlcnNpb25zLy5Pd2xCb3QueWFtbCIsImgiOiJjYTFlMGExZTQ3MmQ2ZTZmNWRlODgzYTVjYjU0NzI0ZjExMmNlMzQ4In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWRhdGFzb3VyY2VzLy5Pd2xCb3QueWFtbCIsImgiOiJjYTFlMGExZTQ3MmQ2ZTZmNWRlODgzYTVjYjU0NzI0ZjExMmNlMzQ4In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLy5Pd2xCb3QueWFtbCIsImgiOiJjYTFlMGExZTQ3MmQ2ZTZmNWRlODgzYTVjYjU0NzI0ZjExMmNlMzQ4In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC8uT3dsQm90LnlhbWwiLCJoIjoiY2ExZTBhMWU0NzJkNmU2ZjVkZTg4M2E1Y2I1NDcyNGYxMTJjZTM0OCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW5vdGlmaWNhdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6ImNhMWUwYTFlNDcyZDZlNmY1ZGU4ODNhNWNiNTQ3MjRmMTEyY2UzNDgifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb21vdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6ImNhMWUwYTFlNDcyZDZlNmY1ZGU4ODNhNWNiNTQ3MjRmMTEyY2UzNDgifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXF1b3RhLy5Pd2xCb3QueWFtbCIsImgiOiJjYTFlMGExZTQ3MmQ2ZTZmNWRlODgzYTVjYjU0NzI0ZjExMmNlMzQ4In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJlcG9ydHMvLk93bEJvdC55YW1sIiwiaCI6ImNhMWUwYTFlNDcyZDZlNmY1ZGU4ODNhNWNiNTQ3MjRmMTEyY2UzNDgifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ3JhZmVhcy8uT3dsQm90LnlhbWwiLCJoIjoiY2ExZTBhMWU0NzJkNmU2ZjVkZTg4M2E1Y2I1NDcyNGYxMTJjZTM0OCJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <omairnaveed@ymail.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 1fcae7a commit 8b9c7bf

File tree

260 files changed

+17135
-2034
lines changed

Some content is hidden

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

260 files changed

+17135
-2034
lines changed

packages/google-maps-mapsplatformdatasets/google/maps/mapsplatformdatasets/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.4.4" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-maps-mapsplatformdatasets/google/maps/mapsplatformdatasets_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.4.4" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-maps-mapsplatformdatasets/google/maps/mapsplatformdatasets_v1/services/maps_platform_datasets/async_client.py

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515
#
1616
from collections import OrderedDict
17+
import logging as std_logging
1718
import re
1819
from typing import (
1920
Callable,
@@ -56,6 +57,15 @@
5657
from .transports.base import DEFAULT_CLIENT_INFO, MapsPlatformDatasetsTransport
5758
from .transports.grpc_asyncio import MapsPlatformDatasetsGrpcAsyncIOTransport
5859

60+
try:
61+
from google.api_core import client_logging # type: ignore
62+
63+
CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
64+
except ImportError: # pragma: NO COVER
65+
CLIENT_LOGGING_SUPPORTED = False
66+
67+
_LOGGER = std_logging.getLogger(__name__)
68+
5969

6070
class MapsPlatformDatasetsAsyncClient:
6171
"""Service definition for the Maps Platform Datasets API."""
@@ -265,6 +275,28 @@ def __init__(
265275
client_info=client_info,
266276
)
267277

278+
if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
279+
std_logging.DEBUG
280+
): # pragma: NO COVER
281+
_LOGGER.debug(
282+
"Created client `google.maps.mapsplatformdatasets_v1.MapsPlatformDatasetsAsyncClient`.",
283+
extra={
284+
"serviceName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets",
285+
"universeDomain": getattr(
286+
self._client._transport._credentials, "universe_domain", ""
287+
),
288+
"credentialsType": f"{type(self._client._transport._credentials).__module__}.{type(self._client._transport._credentials).__qualname__}",
289+
"credentialsInfo": getattr(
290+
self.transport._credentials, "get_cred_info", lambda: None
291+
)(),
292+
}
293+
if hasattr(self._client._transport, "_credentials")
294+
else {
295+
"serviceName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets",
296+
"credentialsType": None,
297+
},
298+
)
299+
268300
async def create_dataset(
269301
self,
270302
request: Optional[
@@ -275,7 +307,7 @@ async def create_dataset(
275307
dataset: Optional[gmm_dataset.Dataset] = None,
276308
retry: OptionalRetry = gapic_v1.method.DEFAULT,
277309
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
278-
metadata: Sequence[Tuple[str, str]] = (),
310+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
279311
) -> gmm_dataset.Dataset:
280312
r"""Creates a new dataset for the specified project.
281313
@@ -326,8 +358,10 @@ async def sample_create_dataset():
326358
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
327359
should be retried.
328360
timeout (float): The timeout for this request.
329-
metadata (Sequence[Tuple[str, str]]): Strings which should be
330-
sent along with the request as metadata.
361+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
362+
sent along with the request as metadata. Normally, each value must be of type `str`,
363+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
364+
be of type `bytes`.
331365
332366
Returns:
333367
google.maps.mapsplatformdatasets_v1.types.Dataset:
@@ -393,7 +427,7 @@ async def update_dataset_metadata(
393427
update_mask: Optional[field_mask_pb2.FieldMask] = None,
394428
retry: OptionalRetry = gapic_v1.method.DEFAULT,
395429
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
396-
metadata: Sequence[Tuple[str, str]] = (),
430+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
397431
) -> gmm_dataset.Dataset:
398432
r"""Updates the metadata for the dataset.
399433
@@ -444,8 +478,10 @@ async def sample_update_dataset_metadata():
444478
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
445479
should be retried.
446480
timeout (float): The timeout for this request.
447-
metadata (Sequence[Tuple[str, str]]): Strings which should be
448-
sent along with the request as metadata.
481+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
482+
sent along with the request as metadata. Normally, each value must be of type `str`,
483+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
484+
be of type `bytes`.
449485
450486
Returns:
451487
google.maps.mapsplatformdatasets_v1.types.Dataset:
@@ -510,7 +546,7 @@ async def get_dataset(
510546
name: Optional[str] = None,
511547
retry: OptionalRetry = gapic_v1.method.DEFAULT,
512548
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
513-
metadata: Sequence[Tuple[str, str]] = (),
549+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
514550
) -> dataset.Dataset:
515551
r"""Gets the dataset.
516552
@@ -561,8 +597,10 @@ async def sample_get_dataset():
561597
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
562598
should be retried.
563599
timeout (float): The timeout for this request.
564-
metadata (Sequence[Tuple[str, str]]): Strings which should be
565-
sent along with the request as metadata.
600+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
601+
sent along with the request as metadata. Normally, each value must be of type `str`,
602+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
603+
be of type `bytes`.
566604
567605
Returns:
568606
google.maps.mapsplatformdatasets_v1.types.Dataset:
@@ -625,7 +663,7 @@ async def fetch_dataset_errors(
625663
dataset: Optional[str] = None,
626664
retry: OptionalRetry = gapic_v1.method.DEFAULT,
627665
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
628-
metadata: Sequence[Tuple[str, str]] = (),
666+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
629667
) -> pagers.FetchDatasetErrorsAsyncPager:
630668
r"""Gets all the errors of a dataset.
631669
@@ -670,8 +708,10 @@ async def sample_fetch_dataset_errors():
670708
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
671709
should be retried.
672710
timeout (float): The timeout for this request.
673-
metadata (Sequence[Tuple[str, str]]): Strings which should be
674-
sent along with the request as metadata.
711+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
712+
sent along with the request as metadata. Normally, each value must be of type `str`,
713+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
714+
be of type `bytes`.
675715
676716
Returns:
677717
google.maps.mapsplatformdatasets_v1.services.maps_platform_datasets.pagers.FetchDatasetErrorsAsyncPager:
@@ -748,7 +788,7 @@ async def list_datasets(
748788
parent: Optional[str] = None,
749789
retry: OptionalRetry = gapic_v1.method.DEFAULT,
750790
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
751-
metadata: Sequence[Tuple[str, str]] = (),
791+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
752792
) -> pagers.ListDatasetsAsyncPager:
753793
r"""Lists all the datasets for the specified project.
754794
@@ -794,8 +834,10 @@ async def sample_list_datasets():
794834
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
795835
should be retried.
796836
timeout (float): The timeout for this request.
797-
metadata (Sequence[Tuple[str, str]]): Strings which should be
798-
sent along with the request as metadata.
837+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
838+
sent along with the request as metadata. Normally, each value must be of type `str`,
839+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
840+
be of type `bytes`.
799841
800842
Returns:
801843
google.maps.mapsplatformdatasets_v1.services.maps_platform_datasets.pagers.ListDatasetsAsyncPager:
@@ -872,7 +914,7 @@ async def delete_dataset(
872914
name: Optional[str] = None,
873915
retry: OptionalRetry = gapic_v1.method.DEFAULT,
874916
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
875-
metadata: Sequence[Tuple[str, str]] = (),
917+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
876918
) -> None:
877919
r"""Deletes the specified dataset.
878920
@@ -912,8 +954,10 @@ async def sample_delete_dataset():
912954
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
913955
should be retried.
914956
timeout (float): The timeout for this request.
915-
metadata (Sequence[Tuple[str, str]]): Strings which should be
916-
sent along with the request as metadata.
957+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
958+
sent along with the request as metadata. Normally, each value must be of type `str`,
959+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
960+
be of type `bytes`.
917961
"""
918962
# Create or coerce a protobuf request object.
919963
# - Quick check: If we got a request object, we should *not* have

packages/google-maps-mapsplatformdatasets/google/maps/mapsplatformdatasets_v1/services/maps_platform_datasets/client.py

Lines changed: 67 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515
#
1616
from collections import OrderedDict
17+
import logging as std_logging
1718
import os
1819
import re
1920
from typing import (
@@ -48,6 +49,15 @@
4849
except AttributeError: # pragma: NO COVER
4950
OptionalRetry = Union[retries.Retry, object, None] # type: ignore
5051

52+
try:
53+
from google.api_core import client_logging # type: ignore
54+
55+
CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
56+
except ImportError: # pragma: NO COVER
57+
CLIENT_LOGGING_SUPPORTED = False
58+
59+
_LOGGER = std_logging.getLogger(__name__)
60+
5161
from google.protobuf import field_mask_pb2 # type: ignore
5262
from google.protobuf import timestamp_pb2 # type: ignore
5363
from google.rpc import status_pb2 # type: ignore
@@ -584,6 +594,10 @@ def __init__(
584594
# Initialize the universe domain validation.
585595
self._is_universe_domain_valid = False
586596

597+
if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER
598+
# Setup logging.
599+
client_logging.initialize_logging()
600+
587601
api_key_value = getattr(self._client_options, "api_key", None)
588602
if api_key_value and credentials:
589603
raise ValueError(
@@ -650,6 +664,29 @@ def __init__(
650664
api_audience=self._client_options.api_audience,
651665
)
652666

667+
if "async" not in str(self._transport):
668+
if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
669+
std_logging.DEBUG
670+
): # pragma: NO COVER
671+
_LOGGER.debug(
672+
"Created client `google.maps.mapsplatformdatasets_v1.MapsPlatformDatasetsClient`.",
673+
extra={
674+
"serviceName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets",
675+
"universeDomain": getattr(
676+
self._transport._credentials, "universe_domain", ""
677+
),
678+
"credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}",
679+
"credentialsInfo": getattr(
680+
self.transport._credentials, "get_cred_info", lambda: None
681+
)(),
682+
}
683+
if hasattr(self._transport, "_credentials")
684+
else {
685+
"serviceName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets",
686+
"credentialsType": None,
687+
},
688+
)
689+
653690
def create_dataset(
654691
self,
655692
request: Optional[
@@ -660,7 +697,7 @@ def create_dataset(
660697
dataset: Optional[gmm_dataset.Dataset] = None,
661698
retry: OptionalRetry = gapic_v1.method.DEFAULT,
662699
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
663-
metadata: Sequence[Tuple[str, str]] = (),
700+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
664701
) -> gmm_dataset.Dataset:
665702
r"""Creates a new dataset for the specified project.
666703
@@ -711,8 +748,10 @@ def sample_create_dataset():
711748
retry (google.api_core.retry.Retry): Designation of what errors, if any,
712749
should be retried.
713750
timeout (float): The timeout for this request.
714-
metadata (Sequence[Tuple[str, str]]): Strings which should be
715-
sent along with the request as metadata.
751+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
752+
sent along with the request as metadata. Normally, each value must be of type `str`,
753+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
754+
be of type `bytes`.
716755
717756
Returns:
718757
google.maps.mapsplatformdatasets_v1.types.Dataset:
@@ -775,7 +814,7 @@ def update_dataset_metadata(
775814
update_mask: Optional[field_mask_pb2.FieldMask] = None,
776815
retry: OptionalRetry = gapic_v1.method.DEFAULT,
777816
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
778-
metadata: Sequence[Tuple[str, str]] = (),
817+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
779818
) -> gmm_dataset.Dataset:
780819
r"""Updates the metadata for the dataset.
781820
@@ -826,8 +865,10 @@ def sample_update_dataset_metadata():
826865
retry (google.api_core.retry.Retry): Designation of what errors, if any,
827866
should be retried.
828867
timeout (float): The timeout for this request.
829-
metadata (Sequence[Tuple[str, str]]): Strings which should be
830-
sent along with the request as metadata.
868+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
869+
sent along with the request as metadata. Normally, each value must be of type `str`,
870+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
871+
be of type `bytes`.
831872
832873
Returns:
833874
google.maps.mapsplatformdatasets_v1.types.Dataset:
@@ -889,7 +930,7 @@ def get_dataset(
889930
name: Optional[str] = None,
890931
retry: OptionalRetry = gapic_v1.method.DEFAULT,
891932
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
892-
metadata: Sequence[Tuple[str, str]] = (),
933+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
893934
) -> dataset.Dataset:
894935
r"""Gets the dataset.
895936
@@ -940,8 +981,10 @@ def sample_get_dataset():
940981
retry (google.api_core.retry.Retry): Designation of what errors, if any,
941982
should be retried.
942983
timeout (float): The timeout for this request.
943-
metadata (Sequence[Tuple[str, str]]): Strings which should be
944-
sent along with the request as metadata.
984+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
985+
sent along with the request as metadata. Normally, each value must be of type `str`,
986+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
987+
be of type `bytes`.
945988
946989
Returns:
947990
google.maps.mapsplatformdatasets_v1.types.Dataset:
@@ -1001,7 +1044,7 @@ def fetch_dataset_errors(
10011044
dataset: Optional[str] = None,
10021045
retry: OptionalRetry = gapic_v1.method.DEFAULT,
10031046
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1004-
metadata: Sequence[Tuple[str, str]] = (),
1047+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
10051048
) -> pagers.FetchDatasetErrorsPager:
10061049
r"""Gets all the errors of a dataset.
10071050
@@ -1046,8 +1089,10 @@ def sample_fetch_dataset_errors():
10461089
retry (google.api_core.retry.Retry): Designation of what errors, if any,
10471090
should be retried.
10481091
timeout (float): The timeout for this request.
1049-
metadata (Sequence[Tuple[str, str]]): Strings which should be
1050-
sent along with the request as metadata.
1092+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1093+
sent along with the request as metadata. Normally, each value must be of type `str`,
1094+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
1095+
be of type `bytes`.
10511096
10521097
Returns:
10531098
google.maps.mapsplatformdatasets_v1.services.maps_platform_datasets.pagers.FetchDatasetErrorsPager:
@@ -1121,7 +1166,7 @@ def list_datasets(
11211166
parent: Optional[str] = None,
11221167
retry: OptionalRetry = gapic_v1.method.DEFAULT,
11231168
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1124-
metadata: Sequence[Tuple[str, str]] = (),
1169+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
11251170
) -> pagers.ListDatasetsPager:
11261171
r"""Lists all the datasets for the specified project.
11271172
@@ -1167,8 +1212,10 @@ def sample_list_datasets():
11671212
retry (google.api_core.retry.Retry): Designation of what errors, if any,
11681213
should be retried.
11691214
timeout (float): The timeout for this request.
1170-
metadata (Sequence[Tuple[str, str]]): Strings which should be
1171-
sent along with the request as metadata.
1215+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1216+
sent along with the request as metadata. Normally, each value must be of type `str`,
1217+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
1218+
be of type `bytes`.
11721219
11731220
Returns:
11741221
google.maps.mapsplatformdatasets_v1.services.maps_platform_datasets.pagers.ListDatasetsPager:
@@ -1242,7 +1289,7 @@ def delete_dataset(
12421289
name: Optional[str] = None,
12431290
retry: OptionalRetry = gapic_v1.method.DEFAULT,
12441291
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1245-
metadata: Sequence[Tuple[str, str]] = (),
1292+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
12461293
) -> None:
12471294
r"""Deletes the specified dataset.
12481295
@@ -1282,8 +1329,10 @@ def sample_delete_dataset():
12821329
retry (google.api_core.retry.Retry): Designation of what errors, if any,
12831330
should be retried.
12841331
timeout (float): The timeout for this request.
1285-
metadata (Sequence[Tuple[str, str]]): Strings which should be
1286-
sent along with the request as metadata.
1332+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1333+
sent along with the request as metadata. Normally, each value must be of type `str`,
1334+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
1335+
be of type `bytes`.
12871336
"""
12881337
# Create or coerce a protobuf request object.
12891338
# - Quick check: If we got a request object, we should *not* have

0 commit comments

Comments
 (0)