From 2ee4c5fe7dea4f24677c4ea1dc8a8de6bf1d36b8 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 4 Jun 2019 12:30:55 -0700 Subject: [PATCH] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- src/v1/datastore_client.js | 13 ++++++++++++- synth.metadata | 10 +++++----- test/gapic-v1.js | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/v1/datastore_client.js b/src/v1/datastore_client.js index eb7d9cd42..cf13ffb9c 100644 --- a/src/v1/datastore_client.js +++ b/src/v1/datastore_client.js @@ -62,12 +62,15 @@ class DatastoreClient { constructor(opts) { this._descriptors = {}; + const servicePath = + opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; + // Ensure that options include the service address and port. opts = Object.assign( { clientConfig: {}, port: this.constructor.port, - servicePath: this.constructor.servicePath, + servicePath, }, opts ); @@ -154,6 +157,14 @@ class DatastoreClient { return 'datastore.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'datastore.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/synth.metadata b/synth.metadata index f06804db8..a3ea73a3c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-05-22T11:11:48.365770Z", + "updateTime": "2019-06-04T19:30:55.849433Z", "sources": [ { "generator": { "name": "artman", - "version": "0.20.0", - "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec" + "version": "0.23.0", + "dockerImage": "googleapis/artman@sha256:846102ebf7ea2239162deea69f64940443b4147f7c2e68d64b332416f74211ba" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6ea045ad2ed95863557b9856760fa8760d8daee0", - "internalRef": "249345152" + "sha": "0026f4b890ed9e2388fb0573c0727defa6f5b82e", + "internalRef": "251265049" } }, { diff --git a/test/gapic-v1.js b/test/gapic-v1.js index b82802e74..f1df1c551 100644 --- a/test/gapic-v1.js +++ b/test/gapic-v1.js @@ -23,6 +23,22 @@ const error = new Error(); error.code = FAKE_STATUS_CODE; describe('DatastoreClient', () => { + it('has servicePath', () => { + const servicePath = datastoreModule.v1.DatastoreClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = datastoreModule.v1.DatastoreClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = datastoreModule.v1.DatastoreClient.port; + assert(port); + assert(typeof port === 'number'); + }); + describe('lookup', () => { it('invokes lookup without error', done => { const client = new datastoreModule.v1.DatastoreClient({