From 071296cf26c4b47a8c90d1bf2539a667d4ceb49a Mon Sep 17 00:00:00 2001 From: xiaozhenliugg Date: Fri, 20 Mar 2020 13:35:24 -0700 Subject: [PATCH 1/2] add quote to subresponse_field --- .../typescript_gapic/src/$version/$service_client.ts.njk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/typescript_gapic/src/$version/$service_client.ts.njk b/templates/typescript_gapic/src/$version/$service_client.ts.njk index ac98763f0..c9dee5415 100644 --- a/templates/typescript_gapic/src/$version/$service_client.ts.njk +++ b/templates/typescript_gapic/src/$version/$service_client.ts.njk @@ -234,7 +234,11 @@ export class {{ service.name }}Client { '{{ field }}' {%- endfor -%} ], +{%- if method.bundleConfig.batchDescriptor.subresponse_field === 'null' %} {{- method.bundleConfig.batchDescriptor.subresponse_field }}, +{%- else %} + '{{- method.bundleConfig.batchDescriptor.subresponse_field }}', +{%- endif %} gax.createByteLengthFunction( // tslint:disable-next-line no-any protoFilesRoot.lookupType('{{ method.bundleConfig.repeatedField }}') as any From 9da4e3b7a19075dd64fde0ee7ee8cd2424f6158a Mon Sep 17 00:00:00 2001 From: xiaozhenliugg Date: Fri, 20 Mar 2020 15:31:44 -0700 Subject: [PATCH 2/2] feedback --- baselines/logging/src/v2/logging_service_v2_client.ts.baseline | 3 ++- templates/typescript_gapic/src/$version/$service_client.ts.njk | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline index 5ba88cbd3..cc44146d2 100644 --- a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline @@ -230,7 +230,8 @@ export class LoggingServiceV2Client { this._descriptors.batching = { WriteLogEntries: new this._gaxModule.BundleDescriptor( 'entries', - ['log_name','resource','labels'],null, + ['log_name','resource','labels'], + null, gax.createByteLengthFunction( // tslint:disable-next-line no-any protoFilesRoot.lookupType('google.logging.v2.LogEntry') as any diff --git a/templates/typescript_gapic/src/$version/$service_client.ts.njk b/templates/typescript_gapic/src/$version/$service_client.ts.njk index c9dee5415..8644039bf 100644 --- a/templates/typescript_gapic/src/$version/$service_client.ts.njk +++ b/templates/typescript_gapic/src/$version/$service_client.ts.njk @@ -235,7 +235,7 @@ export class {{ service.name }}Client { {%- endfor -%} ], {%- if method.bundleConfig.batchDescriptor.subresponse_field === 'null' %} - {{- method.bundleConfig.batchDescriptor.subresponse_field }}, + null, {%- else %} '{{- method.bundleConfig.batchDescriptor.subresponse_field }}', {%- endif %}