Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
fix: make request optional in all cases (#467)
Browse files Browse the repository at this point in the history
Committer: @miraleung
PiperOrigin-RevId: 380641501
  • Loading branch information
gcf-owl-bot[bot] authored Jun 25, 2021
1 parent 301a621 commit 30a0585
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker:
image: gcr.io/repo-automation-bots/owlbot-nodejs:latest
digest: sha256:c9c7828c165b1985579098978877935ee52dda2b1b538087514fd24fa2443e7a
digest: sha256:805e2e389eafefa5ed484c30b83a7a875e6b1c7ee125d812e8b01ecc531c3fac
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
- run: rm -rf node_modules
- run: npm install
- run: npm test
env:
MOCHA_THROW_DEPRECATION: false
windows:
runs-on: windows-latest
steps:
Expand All @@ -33,6 +35,8 @@ jobs:
node-version: 14
- run: npm install
- run: npm test
env:
MOCHA_THROW_DEPRECATION: false
lint:
runs-on: ubuntu-latest
steps:
Expand Down
62 changes: 34 additions & 28 deletions src/v1/data_transfer_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class DataTransferServiceClient {
// -- Service calls --
// -------------------
getDataSource(
request: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -405,7 +405,7 @@ export class DataTransferServiceClient {
* const [response] = await client.getDataSource(request);
*/
getDataSource(
request: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -451,7 +451,7 @@ export class DataTransferServiceClient {
return this.innerApiCalls.getDataSource(request, options, callback);
}
createTransferConfig(
request: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -536,7 +536,7 @@ export class DataTransferServiceClient {
* const [response] = await client.createTransferConfig(request);
*/
createTransferConfig(
request: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -582,7 +582,7 @@ export class DataTransferServiceClient {
return this.innerApiCalls.createTransferConfig(request, options, callback);
}
updateTransferConfig(
request: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -666,7 +666,7 @@ export class DataTransferServiceClient {
* const [response] = await client.updateTransferConfig(request);
*/
updateTransferConfig(
request: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -712,7 +712,7 @@ export class DataTransferServiceClient {
return this.innerApiCalls.updateTransferConfig(request, options, callback);
}
deleteTransferConfig(
request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -766,7 +766,7 @@ export class DataTransferServiceClient {
* const [response] = await client.deleteTransferConfig(request);
*/
deleteTransferConfig(
request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -812,7 +812,7 @@ export class DataTransferServiceClient {
return this.innerApiCalls.deleteTransferConfig(request, options, callback);
}
getTransferConfig(
request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -865,7 +865,7 @@ export class DataTransferServiceClient {
* const [response] = await client.getTransferConfig(request);
*/
getTransferConfig(
request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -911,7 +911,7 @@ export class DataTransferServiceClient {
return this.innerApiCalls.getTransferConfig(request, options, callback);
}
scheduleTransferRuns(
request: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -972,9 +972,10 @@ export class DataTransferServiceClient {
* for more details and examples.
* @example
* const [response] = await client.scheduleTransferRuns(request);
* @deprecated ScheduleTransferRuns is deprecated and may be removed in a future version.
*/
scheduleTransferRuns(
request: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -1017,10 +1018,15 @@ export class DataTransferServiceClient {
parent: request.parent || '',
});
this.initialize();
gax.warn(
'DEP$DataTransferService-$ScheduleTransferRuns',
'ScheduleTransferRuns is deprecated and may be removed in a future version.',
'DeprecationWarning'
);
return this.innerApiCalls.scheduleTransferRuns(request, options, callback);
}
startManualTransferRuns(
request: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -1081,7 +1087,7 @@ export class DataTransferServiceClient {
* const [response] = await client.startManualTransferRuns(request);
*/
startManualTransferRuns(
request: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -1131,7 +1137,7 @@ export class DataTransferServiceClient {
);
}
getTransferRun(
request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -1184,7 +1190,7 @@ export class DataTransferServiceClient {
* const [response] = await client.getTransferRun(request);
*/
getTransferRun(
request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -1230,7 +1236,7 @@ export class DataTransferServiceClient {
return this.innerApiCalls.getTransferRun(request, options, callback);
}
deleteTransferRun(
request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -1283,7 +1289,7 @@ export class DataTransferServiceClient {
* const [response] = await client.deleteTransferRun(request);
*/
deleteTransferRun(
request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -1329,7 +1335,7 @@ export class DataTransferServiceClient {
return this.innerApiCalls.deleteTransferRun(request, options, callback);
}
checkValidCreds(
request: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -1387,7 +1393,7 @@ export class DataTransferServiceClient {
* const [response] = await client.checkValidCreds(request);
*/
checkValidCreds(
request: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest,
optionsOrCallback?:
| CallOptions
| Callback<
Expand Down Expand Up @@ -1434,7 +1440,7 @@ export class DataTransferServiceClient {
}

listDataSources(
request: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -1496,7 +1502,7 @@ export class DataTransferServiceClient {
* for more details and examples.
*/
listDataSources(
request: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest,
optionsOrCallback?:
| CallOptions
| PaginationCallback<
Expand Down Expand Up @@ -1644,7 +1650,7 @@ export class DataTransferServiceClient {
) as AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.IDataSource>;
}
listTransferConfigs(
request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -1707,7 +1713,7 @@ export class DataTransferServiceClient {
* for more details and examples.
*/
listTransferConfigs(
request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest,
optionsOrCallback?:
| CallOptions
| PaginationCallback<
Expand Down Expand Up @@ -1859,7 +1865,7 @@ export class DataTransferServiceClient {
) as AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig>;
}
listTransferRuns(
request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -1925,7 +1931,7 @@ export class DataTransferServiceClient {
* for more details and examples.
*/
listTransferRuns(
request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest,
optionsOrCallback?:
| CallOptions
| PaginationCallback<
Expand Down Expand Up @@ -2083,7 +2089,7 @@ export class DataTransferServiceClient {
) as AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.ITransferRun>;
}
listTransferLogs(
request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest,
options?: CallOptions
): Promise<
[
Expand Down Expand Up @@ -2147,7 +2153,7 @@ export class DataTransferServiceClient {
* for more details and examples.
*/
listTransferLogs(
request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest,
request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest,
optionsOrCallback?:
| CallOptions
| PaginationCallback<
Expand Down

0 comments on commit 30a0585

Please sign in to comment.