File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "require" : {
3- "google/cloud-bigquerydatatransfer" : " ^1 .0"
3+ "google/cloud-bigquerydatatransfer" : " ^2 .0"
44 }
55}
Original file line number Diff line number Diff line change 2020require __DIR__ . '/vendor/autoload.php ' ;
2121
2222# Imports the Google Cloud client library
23- use Google \Cloud \BigQuery \DataTransfer \V1 \DataTransferServiceClient ;
23+ use Google \Cloud \BigQuery \DataTransfer \V1 \Client \DataTransferServiceClient ;
24+ use Google \Cloud \BigQuery \DataTransfer \V1 \ListDataSourcesRequest ;
2425
2526# Instantiates a client
2627$ bqdtsClient = new DataTransferServiceClient ();
3132
3233try {
3334 echo 'Supported Data Sources: ' , PHP_EOL ;
34- $ pagedResponse = $ bqdtsClient ->listDataSources ($ parent );
35+ $ listDataSourcesRequest = (new ListDataSourcesRequest ())
36+ ->setParent ($ parent );
37+ $ pagedResponse = $ bqdtsClient ->listDataSources ($ listDataSourcesRequest );
3538 foreach ($ pagedResponse ->iterateAllElements () as $ dataSource ) {
3639 echo 'Data source: ' , $ dataSource ->getDisplayName (), PHP_EOL ;
3740 echo 'ID: ' , $ dataSource ->getDataSourceId (), PHP_EOL ;
You can’t perform that action at this time.
0 commit comments