Skip to content

Commit 006b2d4

Browse files
chore: use gapic-generator-python 0.65.1 (#377)
* chore: use gapic-generator-python 0.65.1 PiperOrigin-RevId: 441524537 Source-Link: googleapis/googleapis@2a27391 Source-Link: googleapis/googleapis-gen@ab6756a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 9a4bacf commit 006b2d4

File tree

33 files changed

+4110
-370
lines changed

33 files changed

+4110
-370
lines changed

packages/google-cloud-automl/google/cloud/automl_v1/services/auto_ml/async_client.py

Lines changed: 1 addition & 9 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
@@ -708,7 +708,6 @@ async def delete_dataset(
708708
completes, and ``delete_details`` in the
709709
[metadata][google.longrunning.Operation.metadata] field.
710710
711-
712711
.. code-block:: python
713712
714713
from google.cloud import automl_v1
@@ -849,7 +848,6 @@ async def import_data(
849848
in the [response][google.longrunning.Operation.response]
850849
field when it completes.
851850
852-
853851
.. code-block:: python
854852
855853
from google.cloud import automl_v1
@@ -989,7 +987,6 @@ async def export_data(
989987
[response][google.longrunning.Operation.response] field when it
990988
completes.
991989
992-
993990
.. code-block:: python
994991
995992
from google.cloud import automl_v1
@@ -1231,7 +1228,6 @@ async def create_model(
12311228
are created for it: a global evaluation, and one evaluation for
12321229
each annotation spec.
12331230
1234-
12351231
.. code-block:: python
12361232
12371233
from google.cloud import automl_v1
@@ -1574,7 +1570,6 @@ async def delete_model(
15741570
completes, and ``delete_details`` in the
15751571
[metadata][google.longrunning.Operation.metadata] field.
15761572
1577-
15781573
.. code-block:: python
15791574
15801575
from google.cloud import automl_v1
@@ -1824,7 +1819,6 @@ async def deploy_model(
18241819
[response][google.longrunning.Operation.response] field when it
18251820
completes.
18261821
1827-
18281822
.. code-block:: python
18291823
18301824
from google.cloud import automl_v1
@@ -1953,7 +1947,6 @@ async def undeploy_model(
19531947
[response][google.longrunning.Operation.response] field when it
19541948
completes.
19551949
1956-
19571950
.. code-block:: python
19581951
19591952
from google.cloud import automl_v1
@@ -2082,7 +2075,6 @@ async def export_model(
20822075
[response][google.longrunning.Operation.response] field when it
20832076
completes.
20842077
2085-
20862078
.. code-block:: python
20872079
20882080
from google.cloud import automl_v1

packages/google-cloud-automl/google/cloud/automl_v1/services/auto_ml/client.py

Lines changed: 1 addition & 9 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
@@ -984,7 +984,6 @@ def delete_dataset(
984984
completes, and ``delete_details`` in the
985985
[metadata][google.longrunning.Operation.metadata] field.
986986
987-
988987
.. code-block:: python
989988
990989
from google.cloud import automl_v1
@@ -1115,7 +1114,6 @@ def import_data(
11151114
in the [response][google.longrunning.Operation.response]
11161115
field when it completes.
11171116
1118-
11191117
.. code-block:: python
11201118
11211119
from google.cloud import automl_v1
@@ -1255,7 +1253,6 @@ def export_data(
12551253
[response][google.longrunning.Operation.response] field when it
12561254
completes.
12571255
1258-
12591256
.. code-block:: python
12601257
12611258
from google.cloud import automl_v1
@@ -1487,7 +1484,6 @@ def create_model(
14871484
are created for it: a global evaluation, and one evaluation for
14881485
each annotation spec.
14891486
1490-
14911487
.. code-block:: python
14921488
14931489
from google.cloud import automl_v1
@@ -1810,7 +1806,6 @@ def delete_model(
18101806
completes, and ``delete_details`` in the
18111807
[metadata][google.longrunning.Operation.metadata] field.
18121808
1813-
18141809
.. code-block:: python
18151810
18161811
from google.cloud import automl_v1
@@ -2050,7 +2045,6 @@ def deploy_model(
20502045
[response][google.longrunning.Operation.response] field when it
20512046
completes.
20522047
2053-
20542048
.. code-block:: python
20552049
20562050
from google.cloud import automl_v1
@@ -2179,7 +2173,6 @@ def undeploy_model(
21792173
[response][google.longrunning.Operation.response] field when it
21802174
completes.
21812175
2182-
21832176
.. code-block:: python
21842177
21852178
from google.cloud import automl_v1
@@ -2308,7 +2301,6 @@ def export_model(
23082301
[response][google.longrunning.Operation.response] field when it
23092302
completes.
23102303
2311-
23122304
.. code-block:: python
23132305
23142306
from google.cloud import automl_v1

packages/google-cloud-automl/google/cloud/automl_v1/services/auto_ml/transports/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def __init__(
8888
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8989
be used for service account credentials.
9090
"""
91+
9192
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9293
if ":" not in host:
9394
host += ":443"
@@ -491,5 +492,9 @@ def list_model_evaluations(
491492
]:
492493
raise NotImplementedError()
493494

495+
@property
496+
def kind(self) -> str:
497+
raise NotImplementedError()
498+
494499

495500
__all__ = ("AutoMlTransport",)

packages/google-cloud-automl/google/cloud/automl_v1/services/auto_ml/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,5 +784,9 @@ def list_model_evaluations(
784784
def close(self):
785785
self.grpc_channel.close()
786786

787+
@property
788+
def kind(self) -> str:
789+
return "grpc"
790+
787791

788792
__all__ = ("AutoMlGrpcTransport",)

packages/google-cloud-automl/google/cloud/automl_v1/services/prediction_service/async_client.py

Lines changed: 5 additions & 7 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
@@ -217,7 +217,7 @@ async def predict(
217217
*,
218218
name: str = None,
219219
payload: data_items.ExamplePayload = None,
220-
params: Sequence[prediction_service.PredictRequest.ParamsEntry] = None,
220+
params: Mapping[str, str] = None,
221221
retry: OptionalRetry = gapic_v1.method.DEFAULT,
222222
timeout: float = None,
223223
metadata: Sequence[Tuple[str, str]] = (),
@@ -260,7 +260,6 @@ async def predict(
260260
- A row with column values matching the columns of the model,
261261
up to 5MB. Not available for FORECASTING ``prediction_type``.
262262
263-
264263
.. code-block:: python
265264
266265
from google.cloud import automl_v1
@@ -304,7 +303,7 @@ def sample_predict():
304303
This corresponds to the ``payload`` field
305304
on the ``request`` instance; if ``request`` is provided, this
306305
should not be set.
307-
params (:class:`Sequence[google.cloud.automl_v1.types.PredictRequest.ParamsEntry]`):
306+
params (:class:`Mapping[str, str]`):
308307
Additional domain-specific parameters, any string must
309308
be up to 25000 characters long.
310309
@@ -404,7 +403,7 @@ async def batch_predict(
404403
name: str = None,
405404
input_config: io.BatchPredictInputConfig = None,
406405
output_config: io.BatchPredictOutputConfig = None,
407-
params: Sequence[prediction_service.BatchPredictRequest.ParamsEntry] = None,
406+
params: Mapping[str, str] = None,
408407
retry: OptionalRetry = gapic_v1.method.DEFAULT,
409408
timeout: float = None,
410409
metadata: Sequence[Tuple[str, str]] = (),
@@ -430,7 +429,6 @@ async def batch_predict(
430429
- AutoML Natural Language Sentiment Analysis
431430
- AutoML Tables
432431
433-
434432
.. code-block:: python
435433
436434
from google.cloud import automl_v1
@@ -488,7 +486,7 @@ def sample_batch_predict():
488486
This corresponds to the ``output_config`` field
489487
on the ``request`` instance; if ``request`` is provided, this
490488
should not be set.
491-
params (:class:`Sequence[google.cloud.automl_v1.types.BatchPredictRequest.ParamsEntry]`):
489+
params (:class:`Mapping[str, str]`):
492490
Additional domain-specific parameters for the
493491
predictions, any string must be up to 25000 characters
494492
long.

packages/google-cloud-automl/google/cloud/automl_v1/services/prediction_service/client.py

Lines changed: 5 additions & 7 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
@@ -441,7 +441,7 @@ def predict(
441441
*,
442442
name: str = None,
443443
payload: data_items.ExamplePayload = None,
444-
params: Sequence[prediction_service.PredictRequest.ParamsEntry] = None,
444+
params: Mapping[str, str] = None,
445445
retry: OptionalRetry = gapic_v1.method.DEFAULT,
446446
timeout: float = None,
447447
metadata: Sequence[Tuple[str, str]] = (),
@@ -484,7 +484,6 @@ def predict(
484484
- A row with column values matching the columns of the model,
485485
up to 5MB. Not available for FORECASTING ``prediction_type``.
486486
487-
488487
.. code-block:: python
489488
490489
from google.cloud import automl_v1
@@ -528,7 +527,7 @@ def sample_predict():
528527
This corresponds to the ``payload`` field
529528
on the ``request`` instance; if ``request`` is provided, this
530529
should not be set.
531-
params (Sequence[google.cloud.automl_v1.types.PredictRequest.ParamsEntry]):
530+
params (Mapping[str, str]):
532531
Additional domain-specific parameters, any string must
533532
be up to 25000 characters long.
534533
@@ -627,7 +626,7 @@ def batch_predict(
627626
name: str = None,
628627
input_config: io.BatchPredictInputConfig = None,
629628
output_config: io.BatchPredictOutputConfig = None,
630-
params: Sequence[prediction_service.BatchPredictRequest.ParamsEntry] = None,
629+
params: Mapping[str, str] = None,
631630
retry: OptionalRetry = gapic_v1.method.DEFAULT,
632631
timeout: float = None,
633632
metadata: Sequence[Tuple[str, str]] = (),
@@ -653,7 +652,6 @@ def batch_predict(
653652
- AutoML Natural Language Sentiment Analysis
654653
- AutoML Tables
655654
656-
657655
.. code-block:: python
658656
659657
from google.cloud import automl_v1
@@ -711,7 +709,7 @@ def sample_batch_predict():
711709
This corresponds to the ``output_config`` field
712710
on the ``request`` instance; if ``request`` is provided, this
713711
should not be set.
714-
params (Sequence[google.cloud.automl_v1.types.BatchPredictRequest.ParamsEntry]):
712+
params (Mapping[str, str]):
715713
Additional domain-specific parameters for the
716714
predictions, any string must be up to 25000 characters
717715
long.

packages/google-cloud-automl/google/cloud/automl_v1/services/prediction_service/transports/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def __init__(
8282
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8383
be used for service account credentials.
8484
"""
85+
8586
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
8687
if ":" not in host:
8788
host += ":443"
@@ -169,5 +170,9 @@ def batch_predict(
169170
]:
170171
raise NotImplementedError()
171172

173+
@property
174+
def kind(self) -> str:
175+
raise NotImplementedError()
176+
172177

173178
__all__ = ("PredictionServiceTransport",)

packages/google-cloud-automl/google/cloud/automl_v1/services/prediction_service/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,5 +359,9 @@ def batch_predict(
359359
def close(self):
360360
self.grpc_channel.close()
361361

362+
@property
363+
def kind(self) -> str:
364+
return "grpc"
365+
362366

363367
__all__ = ("PredictionServiceGrpcTransport",)

packages/google-cloud-automl/google/cloud/automl_v1/types/__init__.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .annotation_payload import AnnotationPayload
17-
from .annotation_spec import AnnotationSpec
16+
from .annotation_payload import (
17+
AnnotationPayload,
18+
)
19+
from .annotation_spec import (
20+
AnnotationSpec,
21+
)
1822
from .classification import (
1923
ClassificationAnnotation,
2024
ClassificationEvaluationMetrics,
@@ -27,7 +31,9 @@
2731
Image,
2832
TextSnippet,
2933
)
30-
from .dataset import Dataset
34+
from .dataset import (
35+
Dataset,
36+
)
3137
from .detection import (
3238
BoundingBoxMetricsEntry,
3339
ImageObjectDetectionAnnotation,
@@ -55,8 +61,12 @@
5561
ModelExportOutputConfig,
5662
OutputConfig,
5763
)
58-
from .model import Model
59-
from .model_evaluation import ModelEvaluation
64+
from .model import (
65+
Model,
66+
)
67+
from .model_evaluation import (
68+
ModelEvaluation,
69+
)
6070
from .operations import (
6171
BatchPredictOperationMetadata,
6272
CreateDatasetOperationMetadata,
@@ -110,7 +120,9 @@
110120
TextExtractionAnnotation,
111121
TextExtractionEvaluationMetrics,
112122
)
113-
from .text_segment import TextSegment
123+
from .text_segment import (
124+
TextSegment,
125+
)
114126
from .text_sentiment import (
115127
TextSentimentAnnotation,
116128
TextSentimentEvaluationMetrics,

packages/google-cloud-automl/google/cloud/automl_v1/types/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Dataset(proto.Message):
9292
Used to perform consistent read-modify-write
9393
updates. If not set, a blind "overwrite" update
9494
happens.
95-
labels (Sequence[google.cloud.automl_v1.types.Dataset.LabelsEntry]):
95+
labels (Mapping[str, str]):
9696
Optional. The labels with user-defined
9797
metadata to organize your dataset.
9898
Label keys and values can be no longer than 64

0 commit comments

Comments
 (0)