From ef939f7a94b521903ff2ab628142b3dc114e4bc5 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Wed, 5 Jun 2019 07:23:52 -0700 Subject: [PATCH] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- ...tcha_enterprise_service_v1_beta1_client.js | 14 +++++++++- synth.metadata | 10 +++---- test/gapic-v1beta1.js | 27 +++++++++++++++++++ 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.js b/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.js index 0847d07..eef872a 100644 --- a/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.js +++ b/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.js @@ -55,14 +55,18 @@ class RecaptchaEnterpriseServiceV1Beta1Client { * API remote host. */ constructor(opts) { + opts = 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 ); @@ -155,6 +159,14 @@ class RecaptchaEnterpriseServiceV1Beta1Client { return 'recaptchaenterprise.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'recaptchaenterprise.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/synth.metadata b/synth.metadata index 98c84a4..2626e65 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-05-21T11:22:01.138953Z", + "updateTime": "2019-06-05T14:23:52.798433Z", "sources": [ { "generator": { "name": "artman", - "version": "0.20.0", - "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec" + "version": "0.23.1", + "dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160", - "internalRef": "249058354" + "sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b", + "internalRef": "251635729" } }, { diff --git a/test/gapic-v1beta1.js b/test/gapic-v1beta1.js index dfc9d3e..7985dd7 100644 --- a/test/gapic-v1beta1.js +++ b/test/gapic-v1beta1.js @@ -23,6 +23,33 @@ const error = new Error(); error.code = FAKE_STATUS_CODE; describe('RecaptchaEnterpriseServiceV1Beta1Client', () => { + it('has servicePath', () => { + const servicePath = + recaptchaenterpriseModule.v1beta1.RecaptchaEnterpriseServiceV1Beta1Client + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + recaptchaenterpriseModule.v1beta1.RecaptchaEnterpriseServiceV1Beta1Client + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + recaptchaenterpriseModule.v1beta1.RecaptchaEnterpriseServiceV1Beta1Client + .port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new recaptchaenterpriseModule.v1beta1.RecaptchaEnterpriseServiceV1Beta1Client(); + assert(client); + }); + describe('createAssessment', () => { it('invokes createAssessment without error', done => { const client = new recaptchaenterpriseModule.v1beta1.RecaptchaEnterpriseServiceV1Beta1Client(