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 1
1
{
2
2
"require" : {
3
- "google/cloud-bigquerydatatransfer" : " ^1 .0"
3
+ "google/cloud-bigquerydatatransfer" : " ^2 .0"
4
4
}
5
5
}
Original file line number Diff line number Diff line change 20
20
require __DIR__ . '/vendor/autoload.php ' ;
21
21
22
22
# 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 ;
24
25
25
26
# Instantiates a client
26
27
$ bqdtsClient = new DataTransferServiceClient ();
31
32
32
33
try {
33
34
echo 'Supported Data Sources: ' , PHP_EOL ;
34
- $ pagedResponse = $ bqdtsClient ->listDataSources ($ parent );
35
+ $ listDataSourcesRequest = (new ListDataSourcesRequest ())
36
+ ->setParent ($ parent );
37
+ $ pagedResponse = $ bqdtsClient ->listDataSources ($ listDataSourcesRequest );
35
38
foreach ($ pagedResponse ->iterateAllElements () as $ dataSource ) {
36
39
echo 'Data source: ' , $ dataSource ->getDisplayName (), PHP_EOL ;
37
40
echo 'ID: ' , $ dataSource ->getDataSourceId (), PHP_EOL ;
You can’t perform that action at this time.
0 commit comments