Skip to content

Commit c32122f

Browse files
yoshi-automationalexander-fenster
authored andcommitted
feat: make operationsClient and service stub public
1 parent c5a425a commit c32122f

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ const version = require('../../../package.json').version;
4242
*/
4343
export class DataCatalogClient {
4444
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
45-
private _dataCatalogStub: Promise<{[name: string]: Function}>;
4645
private _innerApiCalls: {[name: string]: Function};
4746
private _pathTemplates: {[name: string]: gax.PathTemplate};
4847
private _terminated = false;
4948
auth: gax.GoogleAuth;
49+
dataCatalogStub: Promise<{[name: string]: Function}>;
5050

5151
/**
5252
* Construct an instance of DataCatalogClient.
@@ -191,7 +191,7 @@ export class DataCatalogClient {
191191

192192
// Put together the "service stub" for
193193
// google.cloud.datacatalog.v1beta1.DataCatalog.
194-
this._dataCatalogStub = gaxGrpc.createStub(
194+
this.dataCatalogStub = gaxGrpc.createStub(
195195
opts.fallback
196196
? (protos as protobuf.Root).lookupService(
197197
'google.cloud.datacatalog.v1beta1.DataCatalog'
@@ -231,7 +231,7 @@ export class DataCatalogClient {
231231
];
232232

233233
for (const methodName of dataCatalogStubMethods) {
234-
const innerCallPromise = this._dataCatalogStub.then(
234+
const innerCallPromise = this.dataCatalogStub.then(
235235
stub => (...args: Array<{}>) => {
236236
return stub[methodName].apply(stub, args);
237237
},
@@ -2847,7 +2847,7 @@ export class DataCatalogClient {
28472847
*/
28482848
close(): Promise<void> {
28492849
if (!this._terminated) {
2850-
return this._dataCatalogStub.then(stub => {
2850+
return this.dataCatalogStub.then(stub => {
28512851
this._terminated = true;
28522852
stub.close();
28532853
});

packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ const version = require('../../../package.json').version;
4242
*/
4343
export class PolicyTagManagerClient {
4444
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
45-
private _policyTagManagerStub: Promise<{[name: string]: Function}>;
4645
private _innerApiCalls: {[name: string]: Function};
4746
private _pathTemplates: {[name: string]: gax.PathTemplate};
4847
private _terminated = false;
4948
auth: gax.GoogleAuth;
49+
policyTagManagerStub: Promise<{[name: string]: Function}>;
5050

5151
/**
5252
* Construct an instance of PolicyTagManagerClient.
@@ -182,7 +182,7 @@ export class PolicyTagManagerClient {
182182

183183
// Put together the "service stub" for
184184
// google.cloud.datacatalog.v1beta1.PolicyTagManager.
185-
this._policyTagManagerStub = gaxGrpc.createStub(
185+
this.policyTagManagerStub = gaxGrpc.createStub(
186186
opts.fallback
187187
? (protos as protobuf.Root).lookupService(
188188
'google.cloud.datacatalog.v1beta1.PolicyTagManager'
@@ -211,7 +211,7 @@ export class PolicyTagManagerClient {
211211
];
212212

213213
for (const methodName of policyTagManagerStubMethods) {
214-
const innerCallPromise = this._policyTagManagerStub.then(
214+
const innerCallPromise = this.policyTagManagerStub.then(
215215
stub => (...args: Array<{}>) => {
216216
return stub[methodName].apply(stub, args);
217217
},
@@ -1527,7 +1527,7 @@ export class PolicyTagManagerClient {
15271527
*/
15281528
close(): Promise<void> {
15291529
if (!this._terminated) {
1530-
return this._policyTagManagerStub.then(stub => {
1530+
return this.policyTagManagerStub.then(stub => {
15311531
this._terminated = true;
15321532
stub.close();
15331533
});

packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@ const version = require('../../../package.json').version;
3939
*/
4040
export class PolicyTagManagerSerializationClient {
4141
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
42-
private _policyTagManagerSerializationStub: Promise<{
43-
[name: string]: Function;
44-
}>;
4542
private _innerApiCalls: {[name: string]: Function};
4643
private _pathTemplates: {[name: string]: gax.PathTemplate};
4744
private _terminated = false;
4845
auth: gax.GoogleAuth;
46+
policyTagManagerSerializationStub: Promise<{[name: string]: Function}>;
4947

5048
/**
5149
* Construct an instance of PolicyTagManagerSerializationClient.
@@ -164,7 +162,7 @@ export class PolicyTagManagerSerializationClient {
164162

165163
// Put together the "service stub" for
166164
// google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.
167-
this._policyTagManagerSerializationStub = gaxGrpc.createStub(
165+
this.policyTagManagerSerializationStub = gaxGrpc.createStub(
168166
opts.fallback
169167
? (protos as protobuf.Root).lookupService(
170168
'google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization'
@@ -183,7 +181,7 @@ export class PolicyTagManagerSerializationClient {
183181
];
184182

185183
for (const methodName of policyTagManagerSerializationStubMethods) {
186-
const innerCallPromise = this._policyTagManagerSerializationStub.then(
184+
const innerCallPromise = this.policyTagManagerSerializationStub.then(
187185
stub => (...args: Array<{}>) => {
188186
return stub[methodName].apply(stub, args);
189187
},
@@ -501,7 +499,7 @@ export class PolicyTagManagerSerializationClient {
501499
*/
502500
close(): Promise<void> {
503501
if (!this._terminated) {
504-
return this._policyTagManagerSerializationStub.then(stub => {
502+
return this.policyTagManagerSerializationStub.then(stub => {
505503
this._terminated = true;
506504
stub.close();
507505
});

packages/google-cloud-datacatalog/synth.metadata

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"updateTime": "2019-11-23T12:13:33.611966Z",
2+
"updateTime": "2019-12-11T12:13:54.051593Z",
33
"sources": [
44
{
55
"git": {
66
"name": "googleapis",
77
"remote": "https://github.com/googleapis/googleapis.git",
8-
"sha": "777b580a046c4fa84a35e1d00658b71964120bb0",
9-
"internalRef": "282068850"
8+
"sha": "e47fdd266542386e5e7346697f90476e96dc7ee8",
9+
"internalRef": "284822593"
1010
}
1111
},
1212
{

0 commit comments

Comments
 (0)