File tree 3 files changed +41
-6
lines changed
packages/google-cloud-bigquery-datatransfer
3 files changed +41
-6
lines changed Original file line number Diff line number Diff line change @@ -58,14 +58,18 @@ class DataTransferServiceClient {
58
58
* API remote host.
59
59
*/
60
60
constructor ( opts ) {
61
+ opts = opts || { } ;
61
62
this . _descriptors = { } ;
62
63
64
+ const servicePath =
65
+ opts . servicePath || opts . apiEndpoint || this . constructor . servicePath ;
66
+
63
67
// Ensure that options include the service address and port.
64
68
opts = Object . assign (
65
69
{
66
70
clientConfig : { } ,
67
71
port : this . constructor . port ,
68
- servicePath : this . constructor . servicePath ,
72
+ servicePath,
69
73
} ,
70
74
opts
71
75
) ;
@@ -200,6 +204,14 @@ class DataTransferServiceClient {
200
204
return 'bigquerydatatransfer.googleapis.com' ;
201
205
}
202
206
207
+ /**
208
+ * The DNS address for this API service - same as servicePath(),
209
+ * exists for compatibility reasons.
210
+ */
211
+ static get apiEndpoint ( ) {
212
+ return 'bigquerydatatransfer.googleapis.com' ;
213
+ }
214
+
203
215
/**
204
216
* The port for this API service.
205
217
*/
Original file line number Diff line number Diff line change 1
1
{
2
- "updateTime": "2019-05-21T11:08:45.880007Z ",
2
+ "updateTime": "2019-06-05T14:13:40.674076Z ",
3
3
"sources": [
4
4
{
5
5
"generator": {
6
6
"name": "artman",
7
- "version": "0.20.0 ",
8
- "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec "
7
+ "version": "0.23.1 ",
8
+ "dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0 "
9
9
}
10
10
},
11
11
{
12
12
"git": {
13
13
"name": "googleapis",
14
14
"remote": "https://github.com/googleapis/googleapis.git",
15
- "sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160 ",
16
- "internalRef": "249058354 "
15
+ "sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b ",
16
+ "internalRef": "251635729 "
17
17
}
18
18
},
19
19
{
Original file line number Diff line number Diff line change @@ -23,6 +23,29 @@ const error = new Error();
23
23
error . code = FAKE_STATUS_CODE ;
24
24
25
25
describe ( 'DataTransferServiceClient' , ( ) => {
26
+ it ( 'has servicePath' , ( ) => {
27
+ const servicePath =
28
+ bigqueryDataTransferModule . v1 . DataTransferServiceClient . servicePath ;
29
+ assert ( servicePath ) ;
30
+ } ) ;
31
+
32
+ it ( 'has apiEndpoint' , ( ) => {
33
+ const apiEndpoint =
34
+ bigqueryDataTransferModule . v1 . DataTransferServiceClient . apiEndpoint ;
35
+ assert ( apiEndpoint ) ;
36
+ } ) ;
37
+
38
+ it ( 'has port' , ( ) => {
39
+ const port = bigqueryDataTransferModule . v1 . DataTransferServiceClient . port ;
40
+ assert ( port ) ;
41
+ assert ( typeof port === 'number' ) ;
42
+ } ) ;
43
+
44
+ it ( 'should create a client with no options' , ( ) => {
45
+ const client = new bigqueryDataTransferModule . v1 . DataTransferServiceClient ( ) ;
46
+ assert ( client ) ;
47
+ } ) ;
48
+
26
49
describe ( 'getDataSource' , ( ) => {
27
50
it ( 'invokes getDataSource without error' , done => {
28
51
const client = new bigqueryDataTransferModule . v1 . DataTransferServiceClient (
You can’t perform that action at this time.
0 commit comments