apache-airflow-providers-google 9.0.0rc2__py3-none-any.whl → 10.0.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airflow/providers/google/cloud/hooks/automl.py +5 -6
- airflow/providers/google/cloud/hooks/bigquery.py +5 -6
- airflow/providers/google/cloud/hooks/bigquery_dts.py +11 -8
- airflow/providers/google/cloud/hooks/bigtable.py +5 -6
- airflow/providers/google/cloud/hooks/cloud_build.py +14 -11
- airflow/providers/google/cloud/hooks/cloud_composer.py +16 -0
- airflow/providers/google/cloud/hooks/cloud_memorystore.py +5 -14
- airflow/providers/google/cloud/hooks/cloud_sql.py +5 -7
- airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +5 -5
- airflow/providers/google/cloud/hooks/compute.py +5 -6
- airflow/providers/google/cloud/hooks/compute_ssh.py +8 -12
- airflow/providers/google/cloud/hooks/datacatalog.py +5 -9
- airflow/providers/google/cloud/hooks/dataflow.py +14 -6
- airflow/providers/google/cloud/hooks/dataform.py +8 -0
- airflow/providers/google/cloud/hooks/datafusion.py +13 -6
- airflow/providers/google/cloud/hooks/dataplex.py +5 -8
- airflow/providers/google/cloud/hooks/dataproc.py +13 -8
- airflow/providers/google/cloud/hooks/dataproc_metastore.py +8 -0
- airflow/providers/google/cloud/hooks/datastore.py +5 -6
- airflow/providers/google/cloud/hooks/dlp.py +5 -9
- airflow/providers/google/cloud/hooks/functions.py +5 -6
- airflow/providers/google/cloud/hooks/gcs.py +6 -6
- airflow/providers/google/cloud/hooks/gdm.py +5 -6
- airflow/providers/google/cloud/hooks/kms.py +5 -9
- airflow/providers/google/cloud/hooks/kubernetes_engine.py +6 -4
- airflow/providers/google/cloud/hooks/life_sciences.py +5 -9
- airflow/providers/google/cloud/hooks/mlengine.py +8 -0
- airflow/providers/google/cloud/hooks/natural_language.py +5 -9
- airflow/providers/google/cloud/hooks/os_login.py +5 -6
- airflow/providers/google/cloud/hooks/pubsub.py +5 -5
- airflow/providers/google/cloud/hooks/secret_manager.py +5 -9
- airflow/providers/google/cloud/hooks/spanner.py +5 -6
- airflow/providers/google/cloud/hooks/speech_to_text.py +5 -9
- airflow/providers/google/cloud/hooks/stackdriver.py +5 -6
- airflow/providers/google/cloud/hooks/tasks.py +5 -9
- airflow/providers/google/cloud/hooks/text_to_speech.py +5 -9
- airflow/providers/google/cloud/hooks/translate.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +5 -5
- airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/dataset.py +8 -0
- airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py +8 -0
- airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/model_service.py +8 -0
- airflow/providers/google/cloud/hooks/video_intelligence.py +5 -9
- airflow/providers/google/cloud/hooks/vision.py +5 -6
- airflow/providers/google/cloud/hooks/workflows.py +8 -0
- airflow/providers/google/cloud/operators/bigquery.py +1 -148
- airflow/providers/google/cloud/operators/cloud_build.py +0 -13
- airflow/providers/google/cloud/operators/cloud_composer.py +2 -68
- airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +0 -21
- airflow/providers/google/cloud/operators/dataflow.py +2 -72
- airflow/providers/google/cloud/operators/dataform.py +5 -141
- airflow/providers/google/cloud/operators/datafusion.py +0 -102
- airflow/providers/google/cloud/operators/dataplex.py +3 -61
- airflow/providers/google/cloud/operators/dataproc.py +5 -13
- airflow/providers/google/cloud/operators/datastore.py +2 -86
- airflow/providers/google/cloud/operators/gcs.py +1 -43
- airflow/providers/google/cloud/operators/mlengine.py +1 -123
- airflow/providers/google/cloud/operators/pubsub.py +0 -61
- airflow/providers/google/cloud/operators/stackdriver.py +0 -101
- airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +0 -26
- airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py +0 -41
- airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +0 -39
- airflow/providers/google/cloud/operators/vertex_ai/dataset.py +0 -71
- airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py +0 -71
- airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py +0 -35
- airflow/providers/google/cloud/operators/vertex_ai/model_service.py +0 -41
- airflow/providers/google/cloud/sensors/bigquery.py +0 -24
- airflow/providers/google/cloud/sensors/cloud_composer.py +0 -10
- airflow/providers/google/cloud/sensors/dataflow.py +0 -42
- airflow/providers/google/cloud/sensors/dataform.py +0 -12
- airflow/providers/google/cloud/sensors/datafusion.py +0 -11
- airflow/providers/google/cloud/sensors/dataplex.py +0 -10
- airflow/providers/google/cloud/sensors/gcs.py +0 -44
- airflow/providers/google/cloud/sensors/pubsub.py +0 -11
- airflow/providers/google/cloud/transfers/adls_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +0 -10
- airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/bigquery_to_mssql.py +0 -11
- airflow/providers/google/cloud/transfers/bigquery_to_mysql.py +0 -11
- airflow/providers/google/cloud/transfers/calendar_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/cassandra_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +0 -13
- airflow/providers/google/cloud/transfers/gcs_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/gcs_to_local.py +0 -11
- airflow/providers/google/cloud/transfers/gcs_to_sftp.py +0 -11
- airflow/providers/google/cloud/transfers/gdrive_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/gdrive_to_local.py +0 -11
- airflow/providers/google/cloud/transfers/local_to_gcs.py +0 -9
- airflow/providers/google/cloud/transfers/s3_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/sftp_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/sheets_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/sql_to_gcs.py +0 -11
- airflow/providers/google/cloud/triggers/bigquery_dts.py +0 -12
- airflow/providers/google/cloud/triggers/cloud_build.py +0 -11
- airflow/providers/google/cloud/triggers/cloud_composer.py +0 -9
- airflow/providers/google/cloud/triggers/dataflow.py +0 -7
- airflow/providers/google/cloud/triggers/datafusion.py +0 -11
- airflow/providers/google/cloud/triggers/dataproc.py +2 -8
- airflow/providers/google/cloud/triggers/kubernetes_engine.py +0 -4
- airflow/providers/google/cloud/triggers/mlengine.py +0 -3
- airflow/providers/google/common/hooks/discovery_api.py +0 -7
- airflow/providers/google/firebase/hooks/firestore.py +0 -10
- airflow/providers/google/get_provider_info.py +1 -0
- airflow/providers/google/marketing_platform/example_dags/example_display_video.py +0 -64
- airflow/providers/google/marketing_platform/hooks/campaign_manager.py +3 -3
- airflow/providers/google/marketing_platform/hooks/display_video.py +7 -38
- airflow/providers/google/marketing_platform/operators/campaign_manager.py +22 -22
- airflow/providers/google/marketing_platform/operators/display_video.py +0 -284
- airflow/providers/google/marketing_platform/sensors/campaign_manager.py +3 -3
- airflow/providers/google/marketing_platform/sensors/display_video.py +0 -65
- airflow/providers/google/suite/transfers/gcs_to_gdrive.py +0 -4
- airflow/providers/google/suite/transfers/gcs_to_sheets.py +0 -4
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/METADATA +33 -4
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/RECORD +122 -122
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/LICENSE +0 -0
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/NOTICE +0 -0
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/entry_points.txt +0 -0
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/top_level.txt +0 -0
@@ -18,7 +18,6 @@
|
|
18
18
|
"""This module contains a Google Cloud Text to Speech Hook."""
|
19
19
|
from __future__ import annotations
|
20
20
|
|
21
|
-
import warnings
|
22
21
|
from typing import Sequence
|
23
22
|
|
24
23
|
from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
|
@@ -43,9 +42,6 @@ class CloudTextToSpeechHook(GoogleBaseHook):
|
|
43
42
|
keyword arguments rather than positional.
|
44
43
|
|
45
44
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
46
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
47
|
-
if any. For this to work, the service account making the request must have
|
48
|
-
domain-wide delegation enabled.
|
49
45
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
50
46
|
credentials, or chained list of accounts required to get the access_token
|
51
47
|
of the last account in the list, which will be impersonated in the request.
|
@@ -59,16 +55,16 @@ class CloudTextToSpeechHook(GoogleBaseHook):
|
|
59
55
|
def __init__(
|
60
56
|
self,
|
61
57
|
gcp_conn_id: str = "google_cloud_default",
|
62
|
-
delegate_to: str | None = None,
|
63
58
|
impersonation_chain: str | Sequence[str] | None = None,
|
59
|
+
**kwargs,
|
64
60
|
) -> None:
|
65
|
-
if delegate_to:
|
66
|
-
|
67
|
-
"
|
61
|
+
if kwargs.get("delegate_to") is not None:
|
62
|
+
raise RuntimeError(
|
63
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
64
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
68
65
|
)
|
69
66
|
super().__init__(
|
70
67
|
gcp_conn_id=gcp_conn_id,
|
71
|
-
delegate_to=delegate_to,
|
72
68
|
impersonation_chain=impersonation_chain,
|
73
69
|
)
|
74
70
|
self._client: TextToSpeechClient | None = None
|
@@ -18,7 +18,6 @@
|
|
18
18
|
"""This module contains a Google Cloud Translate Hook."""
|
19
19
|
from __future__ import annotations
|
20
20
|
|
21
|
-
import warnings
|
22
21
|
from typing import Sequence
|
23
22
|
|
24
23
|
from google.cloud.translate_v2 import Client
|
@@ -38,16 +37,16 @@ class CloudTranslateHook(GoogleBaseHook):
|
|
38
37
|
def __init__(
|
39
38
|
self,
|
40
39
|
gcp_conn_id: str = "google_cloud_default",
|
41
|
-
delegate_to: str | None = None,
|
42
40
|
impersonation_chain: str | Sequence[str] | None = None,
|
41
|
+
**kwargs,
|
43
42
|
) -> None:
|
44
|
-
if delegate_to:
|
45
|
-
|
46
|
-
"
|
43
|
+
if kwargs.get("delegate_to") is not None:
|
44
|
+
raise RuntimeError(
|
45
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
46
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
47
47
|
)
|
48
48
|
super().__init__(
|
49
49
|
gcp_conn_id=gcp_conn_id,
|
50
|
-
delegate_to=delegate_to,
|
51
50
|
impersonation_chain=impersonation_chain,
|
52
51
|
)
|
53
52
|
self._client: Client | None = None
|
@@ -74,16 +74,16 @@ class AutoMLHook(GoogleBaseHook):
|
|
74
74
|
def __init__(
|
75
75
|
self,
|
76
76
|
gcp_conn_id: str = "google_cloud_default",
|
77
|
-
delegate_to: str | None = None,
|
78
77
|
impersonation_chain: str | Sequence[str] | None = None,
|
78
|
+
**kwargs,
|
79
79
|
) -> None:
|
80
|
-
if delegate_to:
|
81
|
-
|
82
|
-
"
|
80
|
+
if kwargs.get("delegate_to") is not None:
|
81
|
+
raise RuntimeError(
|
82
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
83
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
83
84
|
)
|
84
85
|
super().__init__(
|
85
86
|
gcp_conn_id=gcp_conn_id,
|
86
|
-
delegate_to=delegate_to,
|
87
87
|
impersonation_chain=impersonation_chain,
|
88
88
|
)
|
89
89
|
self._job: None | (
|
@@ -26,7 +26,6 @@
|
|
26
26
|
"""
|
27
27
|
from __future__ import annotations
|
28
28
|
|
29
|
-
import warnings
|
30
29
|
from typing import Sequence
|
31
30
|
|
32
31
|
from google.api_core.client_options import ClientOptions
|
@@ -47,16 +46,16 @@ class BatchPredictionJobHook(GoogleBaseHook):
|
|
47
46
|
def __init__(
|
48
47
|
self,
|
49
48
|
gcp_conn_id: str = "google_cloud_default",
|
50
|
-
delegate_to: str | None = None,
|
51
49
|
impersonation_chain: str | Sequence[str] | None = None,
|
50
|
+
**kwargs,
|
52
51
|
) -> None:
|
53
|
-
if delegate_to:
|
54
|
-
|
55
|
-
"
|
52
|
+
if kwargs.get("delegate_to") is not None:
|
53
|
+
raise RuntimeError(
|
54
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
55
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
56
56
|
)
|
57
57
|
super().__init__(
|
58
58
|
gcp_conn_id=gcp_conn_id,
|
59
|
-
delegate_to=delegate_to,
|
60
59
|
impersonation_chain=impersonation_chain,
|
61
60
|
)
|
62
61
|
self._batch_prediction_job: BatchPredictionJob | None = None
|
@@ -18,7 +18,6 @@
|
|
18
18
|
"""This module contains a Google Cloud Vertex AI hook."""
|
19
19
|
from __future__ import annotations
|
20
20
|
|
21
|
-
import warnings
|
22
21
|
from typing import Sequence
|
23
22
|
|
24
23
|
from google.api_core.client_options import ClientOptions
|
@@ -51,16 +50,16 @@ class CustomJobHook(GoogleBaseHook):
|
|
51
50
|
def __init__(
|
52
51
|
self,
|
53
52
|
gcp_conn_id: str = "google_cloud_default",
|
54
|
-
delegate_to: str | None = None,
|
55
53
|
impersonation_chain: str | Sequence[str] | None = None,
|
54
|
+
**kwargs,
|
56
55
|
) -> None:
|
57
|
-
if delegate_to:
|
58
|
-
|
59
|
-
"
|
56
|
+
if kwargs.get("delegate_to") is not None:
|
57
|
+
raise RuntimeError(
|
58
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
59
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
60
60
|
)
|
61
61
|
super().__init__(
|
62
62
|
gcp_conn_id=gcp_conn_id,
|
63
|
-
delegate_to=delegate_to,
|
64
63
|
impersonation_chain=impersonation_chain,
|
65
64
|
)
|
66
65
|
self._job: None | (
|
@@ -41,6 +41,14 @@ from airflow.providers.google.common.hooks.base_google import GoogleBaseHook
|
|
41
41
|
class DatasetHook(GoogleBaseHook):
|
42
42
|
"""Hook for Google Cloud Vertex AI Dataset APIs."""
|
43
43
|
|
44
|
+
def __init__(self, **kwargs):
|
45
|
+
if kwargs.get("delegate_to") is not None:
|
46
|
+
raise RuntimeError(
|
47
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
48
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
49
|
+
)
|
50
|
+
super().__init__(**kwargs)
|
51
|
+
|
44
52
|
def get_dataset_service_client(self, region: str | None = None) -> DatasetServiceClient:
|
45
53
|
"""Returns DatasetServiceClient."""
|
46
54
|
if region and region != "global":
|
@@ -46,6 +46,14 @@ from airflow.providers.google.common.hooks.base_google import GoogleBaseHook
|
|
46
46
|
class EndpointServiceHook(GoogleBaseHook):
|
47
47
|
"""Hook for Google Cloud Vertex AI Endpoint Service APIs."""
|
48
48
|
|
49
|
+
def __init__(self, **kwargs):
|
50
|
+
if kwargs.get("delegate_to") is not None:
|
51
|
+
raise RuntimeError(
|
52
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
53
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
54
|
+
)
|
55
|
+
super().__init__(**kwargs)
|
56
|
+
|
49
57
|
def get_endpoint_service_client(self, region: str | None = None) -> EndpointServiceClient:
|
50
58
|
"""Returns EndpointServiceClient."""
|
51
59
|
if region and region != "global":
|
@@ -27,7 +27,6 @@
|
|
27
27
|
"""
|
28
28
|
from __future__ import annotations
|
29
29
|
|
30
|
-
import warnings
|
31
30
|
from typing import Sequence
|
32
31
|
|
33
32
|
from google.api_core.client_options import ClientOptions
|
@@ -48,16 +47,16 @@ class HyperparameterTuningJobHook(GoogleBaseHook):
|
|
48
47
|
def __init__(
|
49
48
|
self,
|
50
49
|
gcp_conn_id: str = "google_cloud_default",
|
51
|
-
delegate_to: str | None = None,
|
52
50
|
impersonation_chain: str | Sequence[str] | None = None,
|
51
|
+
**kwargs,
|
53
52
|
) -> None:
|
54
|
-
if delegate_to:
|
55
|
-
|
56
|
-
"
|
53
|
+
if kwargs.get("delegate_to") is not None:
|
54
|
+
raise RuntimeError(
|
55
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
56
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
57
57
|
)
|
58
58
|
super().__init__(
|
59
59
|
gcp_conn_id=gcp_conn_id,
|
60
|
-
delegate_to=delegate_to,
|
61
60
|
impersonation_chain=impersonation_chain,
|
62
61
|
)
|
63
62
|
self._hyperparameter_tuning_job: HyperparameterTuningJob | None = None
|
@@ -41,6 +41,14 @@ from airflow.providers.google.common.hooks.base_google import GoogleBaseHook
|
|
41
41
|
class ModelServiceHook(GoogleBaseHook):
|
42
42
|
"""Hook for Google Cloud Vertex AI Endpoint Service APIs."""
|
43
43
|
|
44
|
+
def __init__(self, **kwargs):
|
45
|
+
if kwargs.get("delegate_to") is not None:
|
46
|
+
raise RuntimeError(
|
47
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
48
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
49
|
+
)
|
50
|
+
super().__init__(**kwargs)
|
51
|
+
|
44
52
|
def get_model_service_client(self, region: str | None = None) -> ModelServiceClient:
|
45
53
|
"""Returns ModelServiceClient."""
|
46
54
|
if region and region != "global":
|
@@ -18,7 +18,6 @@
|
|
18
18
|
"""This module contains a Google Cloud Video Intelligence Hook."""
|
19
19
|
from __future__ import annotations
|
20
20
|
|
21
|
-
import warnings
|
22
21
|
from typing import Sequence
|
23
22
|
|
24
23
|
from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
|
@@ -39,9 +38,6 @@ class CloudVideoIntelligenceHook(GoogleBaseHook):
|
|
39
38
|
keyword arguments rather than positional.
|
40
39
|
|
41
40
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
42
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
43
|
-
if any. For this to work, the service account making the request must have
|
44
|
-
domain-wide delegation enabled.
|
45
41
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
46
42
|
credentials, or chained list of accounts required to get the access_token
|
47
43
|
of the last account in the list, which will be impersonated in the request.
|
@@ -55,16 +51,16 @@ class CloudVideoIntelligenceHook(GoogleBaseHook):
|
|
55
51
|
def __init__(
|
56
52
|
self,
|
57
53
|
gcp_conn_id: str = "google_cloud_default",
|
58
|
-
delegate_to: str | None = None,
|
59
54
|
impersonation_chain: str | Sequence[str] | None = None,
|
55
|
+
**kwargs,
|
60
56
|
) -> None:
|
61
|
-
if delegate_to:
|
62
|
-
|
63
|
-
"
|
57
|
+
if kwargs.get("delegate_to") is not None:
|
58
|
+
raise RuntimeError(
|
59
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
60
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
64
61
|
)
|
65
62
|
super().__init__(
|
66
63
|
gcp_conn_id=gcp_conn_id,
|
67
|
-
delegate_to=delegate_to,
|
68
64
|
impersonation_chain=impersonation_chain,
|
69
65
|
)
|
70
66
|
self._conn = None
|
@@ -18,7 +18,6 @@
|
|
18
18
|
"""This module contains a Google Cloud Vision Hook."""
|
19
19
|
from __future__ import annotations
|
20
20
|
|
21
|
-
import warnings
|
22
21
|
from copy import deepcopy
|
23
22
|
from typing import Any, Callable, Sequence
|
24
23
|
|
@@ -127,16 +126,16 @@ class CloudVisionHook(GoogleBaseHook):
|
|
127
126
|
def __init__(
|
128
127
|
self,
|
129
128
|
gcp_conn_id: str = "google_cloud_default",
|
130
|
-
delegate_to: str | None = None,
|
131
129
|
impersonation_chain: str | Sequence[str] | None = None,
|
130
|
+
**kwargs,
|
132
131
|
) -> None:
|
133
|
-
if delegate_to:
|
134
|
-
|
135
|
-
"
|
132
|
+
if kwargs.get("delegate_to") is not None:
|
133
|
+
raise RuntimeError(
|
134
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
135
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
136
136
|
)
|
137
137
|
super().__init__(
|
138
138
|
gcp_conn_id=gcp_conn_id,
|
139
|
-
delegate_to=delegate_to,
|
140
139
|
impersonation_chain=impersonation_chain,
|
141
140
|
)
|
142
141
|
self._client = None
|
@@ -39,6 +39,14 @@ class WorkflowsHook(GoogleBaseHook):
|
|
39
39
|
keyword arguments rather than positional.
|
40
40
|
"""
|
41
41
|
|
42
|
+
def __init__(self, **kwargs):
|
43
|
+
if kwargs.get("delegate_to") is not None:
|
44
|
+
raise RuntimeError(
|
45
|
+
"The `delegate_to` parameter has been deprecated before and finally removed in this version"
|
46
|
+
" of Google Provider. You MUST convert it to `impersonate_chain`"
|
47
|
+
)
|
48
|
+
super().__init__(**kwargs)
|
49
|
+
|
42
50
|
def get_workflows_client(self) -> WorkflowsClient:
|
43
51
|
"""Returns WorkflowsClient."""
|
44
52
|
return WorkflowsClient(credentials=self.get_credentials(), client_info=CLIENT_INFO)
|