From 963d118c81a0c38117e9145b491984100871c1d0 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Mon, 21 Oct 2019 15:33:10 -0700 Subject: [PATCH] add comments for class (#64) --- .../src/$version/$service_client.ts.njk | 27 +++++++++++++++++++ .../keymanagementservice_client.ts.baseline | 27 +++++++++++++++++++ .../src/v1beta1/echo_client.ts.baseline | 27 +++++++++++++++++++ 3 files changed, 81 insertions(+) diff --git a/templates/typescript_gapic/src/$version/$service_client.ts.njk b/templates/typescript_gapic/src/$version/$service_client.ts.njk index 1f947805a..c39465e99 100644 --- a/templates/typescript_gapic/src/$version/$service_client.ts.njk +++ b/templates/typescript_gapic/src/$version/$service_client.ts.njk @@ -50,6 +50,33 @@ export interface PaginationResponse< } {% endif %} export class {{ service.name }}Client { + /** + * Construct an instance of {{ service.name }}Client. + * + * @@param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @@param {object} [options.credentials] - Credentials object. + * @@param {string} [options.credentials.client_email] + * @@param {string} [options.credentials.private_key] + * @@param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @@param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @@param {number} [options.port] - The port on which to connect to + * the remote host. + * @@param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @@param {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @@param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; auth: gax.GoogleAuth; diff --git a/typescript/test/testdata/keymanager/src/v1/keymanagementservice_client.ts.baseline b/typescript/test/testdata/keymanager/src/v1/keymanagementservice_client.ts.baseline index c77333b34..ce8c6e9c7 100644 --- a/typescript/test/testdata/keymanager/src/v1/keymanagementservice_client.ts.baseline +++ b/typescript/test/testdata/keymanager/src/v1/keymanagementservice_client.ts.baseline @@ -63,6 +63,33 @@ export interface PaginationResponse< } export class KeyManagementServiceClient { + /** + * Construct an instance of KeyManagementServiceClient. + * + * @@param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @@param {object} [options.credentials] - Credentials object. + * @@param {string} [options.credentials.client_email] + * @@param {string} [options.credentials.private_key] + * @@param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @@param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @@param {number} [options.port] - The port on which to connect to + * the remote host. + * @@param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @@param {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @@param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; auth: gax.GoogleAuth; diff --git a/typescript/test/testdata/showcase/src/v1beta1/echo_client.ts.baseline b/typescript/test/testdata/showcase/src/v1beta1/echo_client.ts.baseline index 60b0a6ed3..cf470a5c6 100644 --- a/typescript/test/testdata/showcase/src/v1beta1/echo_client.ts.baseline +++ b/typescript/test/testdata/showcase/src/v1beta1/echo_client.ts.baseline @@ -66,6 +66,33 @@ export interface PaginationResponse< } export class EchoClient { + /** + * Construct an instance of EchoClient. + * + * @@param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @@param {object} [options.credentials] - Credentials object. + * @@param {string} [options.credentials.client_email] + * @@param {string} [options.credentials.private_key] + * @@param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @@param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @@param {number} [options.port] - The port on which to connect to + * the remote host. + * @@param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @@param {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @@param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; auth: gax.GoogleAuth;