Skip to content

Commit 17fc24a

Browse files
yoshi-automationtswast
authored andcommitted
Add DatasourceServiceClient; add start_manual_transfer_runs method; add client_info/version_info support; allow passing kwargs to create_channel; add path helpers (via synth). (googleapis#8630)
* Add `DatasourceServiceClient`; add `start_manual_transfer_runs` method; add `client_info`/`version_info` support; allow passing kwargs to `create_channel`; add path helpers (via synth). * Add manual unit test for versionless import.
1 parent f651c87 commit 17fc24a

21 files changed

+4124
-247
lines changed

bigquery_datatransfer/.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Generated by synthtool. DO NOT EDIT!
12
[run]
23
branch = True
34

bigquery_datatransfer/.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Generated by synthtool. DO NOT EDIT!
12
[flake8]
23
ignore = E203, E266, E501, W503
34
exclude =

bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py

Lines changed: 184 additions & 19 deletions
Large diffs are not rendered by default.

bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@
8282
"retry_codes_name": "idempotent",
8383
"retry_params_name": "default",
8484
},
85+
"StartManualTransferRuns": {
86+
"timeout_millis": 60000,
87+
"retry_codes_name": "non_idempotent",
88+
"retry_params_name": "default",
89+
},
8590
},
8691
}
8792
}

bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/enums.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class TransferState(enum.IntEnum):
4242
PENDING (int): Data transfer is scheduled and is waiting to be picked up by
4343
data transfer backend.
4444
RUNNING (int): Data transfer is in progress.
45-
SUCCEEDED (int): Data transfer completed successsfully.
45+
SUCCEEDED (int): Data transfer completed successfully.
4646
FAILED (int): Data transfer failed.
4747
CANCELLED (int): Data transfer is cancelled.
4848
"""
@@ -119,7 +119,7 @@ class Type(enum.IntEnum):
119119
Will be serialized to json as string.
120120
DOUBLE (int): Double precision floating point parameter.
121121
BOOLEAN (int): Boolean parameter.
122-
RECORD (int): Record parameter.
122+
RECORD (int): Deprecated. This field has no effect.
123123
PLUS_PAGE (int): Page ID for a Google+ Page.
124124
"""
125125

bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/transports/data_transfer_service_grpc_transport.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ def __init__(
7575

7676
@classmethod
7777
def create_channel(
78-
cls, address="bigquerydatatransfer.googleapis.com:443", credentials=None
78+
cls,
79+
address="bigquerydatatransfer.googleapis.com:443",
80+
credentials=None,
81+
**kwargs
7982
):
8083
"""Create and return a gRPC channel object.
8184
@@ -86,12 +89,14 @@ def create_channel(
8689
credentials identify this application to the service. If
8790
none are specified, the client will attempt to ascertain
8891
the credentials from the environment.
92+
kwargs (dict): Keyword arguments, which are passed to the
93+
channel creation.
8994
9095
Returns:
9196
grpc.Channel: A gRPC channel object.
9297
"""
9398
return google.api_core.grpc_helpers.create_channel(
94-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
99+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
95100
)
96101

97102
@property
@@ -205,7 +210,7 @@ def schedule_transfer_runs(self):
205210
Creates transfer runs for a time range [start\_time, end\_time]. For
206211
each date - or whatever granularity the data source supports - in the
207212
range, one transfer run is created. Note that runs are created per UTC
208-
time in the time range.
213+
time in the time range. DEPRECATED: use StartManualTransferRuns instead.
209214
210215
Returns:
211216
Callable: A callable which accepts the appropriate
@@ -283,3 +288,19 @@ def check_valid_creds(self):
283288
deserialized response object.
284289
"""
285290
return self._stubs["data_transfer_service_stub"].CheckValidCreds
291+
292+
@property
293+
def start_manual_transfer_runs(self):
294+
"""Return the gRPC stub for :meth:`DataTransferServiceClient.start_manual_transfer_runs`.
295+
296+
Start manual transfer runs to be executed now with schedule\_time equal
297+
to current time. The transfer runs can be created for a time range where
298+
the run\_time is between start\_time (inclusive) and end\_time
299+
(exclusive), or for a specific run\_time.
300+
301+
Returns:
302+
Callable: A callable which accepts the appropriate
303+
deserialized request object and returns a
304+
deserialized response object.
305+
"""
306+
return self._stubs["data_transfer_service_stub"].StartManualTransferRuns

0 commit comments

Comments
 (0)