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

Commit 9749c44

Browse files
chore: Use gapic-generator-python 0.65.0 (#195)
- [ ] 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 5698c4a commit 9749c44

File tree

18 files changed

+220
-200
lines changed

18 files changed

+220
-200
lines changed

google/cloud/recommender_v1/services/recommender/async_client.py

Lines changed: 13 additions & 33 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
@@ -229,7 +229,6 @@ async def list_insights(
229229
recommender.*.list IAM permission for the specified insight
230230
type.
231231
232-
233232
.. code-block:: python
234233
235234
from google.cloud import recommender_v1
@@ -316,8 +315,7 @@ def sample_list_insights():
316315
maximum=60.0,
317316
multiplier=1.3,
318317
predicate=retries.if_exception_type(
319-
core_exceptions.DeadlineExceeded,
320-
core_exceptions.ServiceUnavailable,
318+
core_exceptions.GoogleAPICallError,
321319
),
322320
deadline=60.0,
323321
),
@@ -363,7 +361,6 @@ async def get_insight(
363361
r"""Gets the requested insight. Requires the recommender.*.get IAM
364362
permission for the specified insight type.
365363
366-
367364
.. code-block:: python
368365
369366
from google.cloud import recommender_v1
@@ -431,8 +428,7 @@ def sample_get_insight():
431428
maximum=60.0,
432429
multiplier=1.3,
433430
predicate=retries.if_exception_type(
434-
core_exceptions.DeadlineExceeded,
435-
core_exceptions.ServiceUnavailable,
431+
core_exceptions.GoogleAPICallError,
436432
),
437433
deadline=60.0,
438434
),
@@ -462,9 +458,7 @@ async def mark_insight_accepted(
462458
request: Union[recommender_service.MarkInsightAcceptedRequest, dict] = None,
463459
*,
464460
name: str = None,
465-
state_metadata: Sequence[
466-
recommender_service.MarkInsightAcceptedRequest.StateMetadataEntry
467-
] = None,
461+
state_metadata: Mapping[str, str] = None,
468462
etag: str = None,
469463
retry: OptionalRetry = gapic_v1.method.DEFAULT,
470464
timeout: float = None,
@@ -479,7 +473,6 @@ async def mark_insight_accepted(
479473
Requires the recommender.*.update IAM permission for the
480474
specified insight.
481475
482-
483476
.. code-block:: python
484477
485478
from google.cloud import recommender_v1
@@ -509,7 +502,7 @@ def sample_mark_insight_accepted():
509502
This corresponds to the ``name`` field
510503
on the ``request`` instance; if ``request`` is provided, this
511504
should not be set.
512-
state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkInsightAcceptedRequest.StateMetadataEntry]`):
505+
state_metadata (:class:`Mapping[str, str]`):
513506
Optional. State properties user wish to include with
514507
this state. Full replace of the current state_metadata.
515508
@@ -598,7 +591,6 @@ async def list_recommendations(
598591
the recommender.*.list IAM permission for the specified
599592
recommender.
600593
601-
602594
.. code-block:: python
603595
604596
from google.cloud import recommender_v1
@@ -713,8 +705,7 @@ def sample_list_recommendations():
713705
maximum=60.0,
714706
multiplier=1.3,
715707
predicate=retries.if_exception_type(
716-
core_exceptions.DeadlineExceeded,
717-
core_exceptions.ServiceUnavailable,
708+
core_exceptions.GoogleAPICallError,
718709
),
719710
deadline=60.0,
720711
),
@@ -760,7 +751,6 @@ async def get_recommendation(
760751
r"""Gets the requested recommendation. Requires the
761752
recommender.*.get IAM permission for the specified recommender.
762753
763-
764754
.. code-block:: python
765755
766756
from google.cloud import recommender_v1
@@ -829,8 +819,7 @@ def sample_get_recommendation():
829819
maximum=60.0,
830820
multiplier=1.3,
831821
predicate=retries.if_exception_type(
832-
core_exceptions.DeadlineExceeded,
833-
core_exceptions.ServiceUnavailable,
822+
core_exceptions.GoogleAPICallError,
834823
),
835824
deadline=60.0,
836825
),
@@ -862,9 +851,7 @@ async def mark_recommendation_claimed(
862851
] = None,
863852
*,
864853
name: str = None,
865-
state_metadata: Sequence[
866-
recommender_service.MarkRecommendationClaimedRequest.StateMetadataEntry
867-
] = None,
854+
state_metadata: Mapping[str, str] = None,
868855
etag: str = None,
869856
retry: OptionalRetry = gapic_v1.method.DEFAULT,
870857
timeout: float = None,
@@ -882,7 +869,6 @@ async def mark_recommendation_claimed(
882869
Requires the recommender.*.update IAM permission for the
883870
specified recommender.
884871
885-
886872
.. code-block:: python
887873
888874
from google.cloud import recommender_v1
@@ -912,7 +898,7 @@ def sample_mark_recommendation_claimed():
912898
This corresponds to the ``name`` field
913899
on the ``request`` instance; if ``request`` is provided, this
914900
should not be set.
915-
state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]`):
901+
state_metadata (:class:`Mapping[str, str]`):
916902
State properties to include with this state. Overwrites
917903
any existing ``state_metadata``. Keys must match the
918904
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
@@ -997,9 +983,7 @@ async def mark_recommendation_succeeded(
997983
] = None,
998984
*,
999985
name: str = None,
1000-
state_metadata: Sequence[
1001-
recommender_service.MarkRecommendationSucceededRequest.StateMetadataEntry
1002-
] = None,
986+
state_metadata: Mapping[str, str] = None,
1003987
etag: str = None,
1004988
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1005989
timeout: float = None,
@@ -1017,7 +1001,6 @@ async def mark_recommendation_succeeded(
10171001
Requires the recommender.*.update IAM permission for the
10181002
specified recommender.
10191003
1020-
10211004
.. code-block:: python
10221005
10231006
from google.cloud import recommender_v1
@@ -1047,7 +1030,7 @@ def sample_mark_recommendation_succeeded():
10471030
This corresponds to the ``name`` field
10481031
on the ``request`` instance; if ``request`` is provided, this
10491032
should not be set.
1050-
state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]`):
1033+
state_metadata (:class:`Mapping[str, str]`):
10511034
State properties to include with this state. Overwrites
10521035
any existing ``state_metadata``. Keys must match the
10531036
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
@@ -1132,9 +1115,7 @@ async def mark_recommendation_failed(
11321115
] = None,
11331116
*,
11341117
name: str = None,
1135-
state_metadata: Sequence[
1136-
recommender_service.MarkRecommendationFailedRequest.StateMetadataEntry
1137-
] = None,
1118+
state_metadata: Mapping[str, str] = None,
11381119
etag: str = None,
11391120
retry: OptionalRetry = gapic_v1.method.DEFAULT,
11401121
timeout: float = None,
@@ -1152,7 +1133,6 @@ async def mark_recommendation_failed(
11521133
Requires the recommender.*.update IAM permission for the
11531134
specified recommender.
11541135
1155-
11561136
.. code-block:: python
11571137
11581138
from google.cloud import recommender_v1
@@ -1182,7 +1162,7 @@ def sample_mark_recommendation_failed():
11821162
This corresponds to the ``name`` field
11831163
on the ``request`` instance; if ``request`` is provided, this
11841164
should not be set.
1185-
state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkRecommendationFailedRequest.StateMetadataEntry]`):
1165+
state_metadata (:class:`Mapping[str, str]`):
11861166
State properties to include with this state. Overwrites
11871167
any existing ``state_metadata``. Keys must match the
11881168
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must

google/cloud/recommender_v1/services/recommender/client.py

Lines changed: 9 additions & 25 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
@@ -519,7 +519,6 @@ def list_insights(
519519
recommender.*.list IAM permission for the specified insight
520520
type.
521521
522-
523522
.. code-block:: python
524523
525524
from google.cloud import recommender_v1
@@ -643,7 +642,6 @@ def get_insight(
643642
r"""Gets the requested insight. Requires the recommender.*.get IAM
644643
permission for the specified insight type.
645644
646-
647645
.. code-block:: python
648646
649647
from google.cloud import recommender_v1
@@ -732,9 +730,7 @@ def mark_insight_accepted(
732730
request: Union[recommender_service.MarkInsightAcceptedRequest, dict] = None,
733731
*,
734732
name: str = None,
735-
state_metadata: Sequence[
736-
recommender_service.MarkInsightAcceptedRequest.StateMetadataEntry
737-
] = None,
733+
state_metadata: Mapping[str, str] = None,
738734
etag: str = None,
739735
retry: OptionalRetry = gapic_v1.method.DEFAULT,
740736
timeout: float = None,
@@ -749,7 +745,6 @@ def mark_insight_accepted(
749745
Requires the recommender.*.update IAM permission for the
750746
specified insight.
751747
752-
753748
.. code-block:: python
754749
755750
from google.cloud import recommender_v1
@@ -779,7 +774,7 @@ def sample_mark_insight_accepted():
779774
This corresponds to the ``name`` field
780775
on the ``request`` instance; if ``request`` is provided, this
781776
should not be set.
782-
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkInsightAcceptedRequest.StateMetadataEntry]):
777+
state_metadata (Mapping[str, str]):
783778
Optional. State properties user wish to include with
784779
this state. Full replace of the current state_metadata.
785780
@@ -867,7 +862,6 @@ def list_recommendations(
867862
the recommender.*.list IAM permission for the specified
868863
recommender.
869864
870-
871865
.. code-block:: python
872866
873867
from google.cloud import recommender_v1
@@ -1019,7 +1013,6 @@ def get_recommendation(
10191013
r"""Gets the requested recommendation. Requires the
10201014
recommender.*.get IAM permission for the specified recommender.
10211015
1022-
10231016
.. code-block:: python
10241017
10251018
from google.cloud import recommender_v1
@@ -1111,9 +1104,7 @@ def mark_recommendation_claimed(
11111104
] = None,
11121105
*,
11131106
name: str = None,
1114-
state_metadata: Sequence[
1115-
recommender_service.MarkRecommendationClaimedRequest.StateMetadataEntry
1116-
] = None,
1107+
state_metadata: Mapping[str, str] = None,
11171108
etag: str = None,
11181109
retry: OptionalRetry = gapic_v1.method.DEFAULT,
11191110
timeout: float = None,
@@ -1131,7 +1122,6 @@ def mark_recommendation_claimed(
11311122
Requires the recommender.*.update IAM permission for the
11321123
specified recommender.
11331124
1134-
11351125
.. code-block:: python
11361126
11371127
from google.cloud import recommender_v1
@@ -1161,7 +1151,7 @@ def sample_mark_recommendation_claimed():
11611151
This corresponds to the ``name`` field
11621152
on the ``request`` instance; if ``request`` is provided, this
11631153
should not be set.
1164-
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]):
1154+
state_metadata (Mapping[str, str]):
11651155
State properties to include with this state. Overwrites
11661156
any existing ``state_metadata``. Keys must match the
11671157
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
@@ -1249,9 +1239,7 @@ def mark_recommendation_succeeded(
12491239
] = None,
12501240
*,
12511241
name: str = None,
1252-
state_metadata: Sequence[
1253-
recommender_service.MarkRecommendationSucceededRequest.StateMetadataEntry
1254-
] = None,
1242+
state_metadata: Mapping[str, str] = None,
12551243
etag: str = None,
12561244
retry: OptionalRetry = gapic_v1.method.DEFAULT,
12571245
timeout: float = None,
@@ -1269,7 +1257,6 @@ def mark_recommendation_succeeded(
12691257
Requires the recommender.*.update IAM permission for the
12701258
specified recommender.
12711259
1272-
12731260
.. code-block:: python
12741261
12751262
from google.cloud import recommender_v1
@@ -1299,7 +1286,7 @@ def sample_mark_recommendation_succeeded():
12991286
This corresponds to the ``name`` field
13001287
on the ``request`` instance; if ``request`` is provided, this
13011288
should not be set.
1302-
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]):
1289+
state_metadata (Mapping[str, str]):
13031290
State properties to include with this state. Overwrites
13041291
any existing ``state_metadata``. Keys must match the
13051292
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
@@ -1387,9 +1374,7 @@ def mark_recommendation_failed(
13871374
] = None,
13881375
*,
13891376
name: str = None,
1390-
state_metadata: Sequence[
1391-
recommender_service.MarkRecommendationFailedRequest.StateMetadataEntry
1392-
] = None,
1377+
state_metadata: Mapping[str, str] = None,
13931378
etag: str = None,
13941379
retry: OptionalRetry = gapic_v1.method.DEFAULT,
13951380
timeout: float = None,
@@ -1407,7 +1392,6 @@ def mark_recommendation_failed(
14071392
Requires the recommender.*.update IAM permission for the
14081393
specified recommender.
14091394
1410-
14111395
.. code-block:: python
14121396
14131397
from google.cloud import recommender_v1
@@ -1437,7 +1421,7 @@ def sample_mark_recommendation_failed():
14371421
This corresponds to the ``name`` field
14381422
on the ``request`` instance; if ``request`` is provided, this
14391423
should not be set.
1440-
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationFailedRequest.StateMetadataEntry]):
1424+
state_metadata (Mapping[str, str]):
14411425
State properties to include with this state. Overwrites
14421426
any existing ``state_metadata``. Keys must match the
14431427
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy