Skip to content

Commit 57567db

Browse files
feat: [Many APIs] add several fields to manage state of database encryption update (#5191)
* feat: add several fields to manage state of database encryption update PiperOrigin-RevId: 619289281 Source-Link: googleapis/googleapis@3a7c334 Source-Link: googleapis/googleapis-gen@6a8c733 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNjaGVkdWxlci8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3JldG1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjZhOGM3MzMwNjJkODMzZDExYzUyNDVlZGE1MGY1MTA4ZTBlNTUzMjQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5LXByaXZhdGVjYS8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5LXB1YmxpY2NhLy5Pd2xCb3QueWFtbCIsImgiOiI2YThjNzMzMDYyZDgzM2QxMWM1MjQ1ZWRhNTBmNTEwOGUwZTU1MzI0In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5Y2VudGVyLy5Pd2xCb3QueWFtbCIsImgiOiI2YThjNzMzMDYyZDgzM2QxMWM1MjQ1ZWRhNTBmNTEwOGUwZTU1MzI0In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlcnZpY2VkaXJlY3RvcnkvLk93bEJvdC55YW1sIiwiaCI6IjZhOGM3MzMwNjJkODMzZDExYzUyNDVlZGE1MGY1MTA4ZTBlNTUzMjQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlcnZpY2VoZWFsdGgvLk93bEJvdC55YW1sIiwiaCI6IjZhOGM3MzMwNjJkODMzZDExYzUyNDVlZGE1MGY1MTA4ZTBlNTUzMjQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNoZWxsLy5Pd2xCb3QueWFtbCIsImgiOiI2YThjNzMzMDYyZDgzM2QxMWM1MjQ1ZWRhNTBmNTEwOGUwZTU1MzI0In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNxbC8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN0b3JhZ2VpbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN1cHBvcnQvLk93bEJvdC55YW1sIiwiaCI6IjZhOGM3MzMwNjJkODMzZDExYzUyNDVlZGE1MGY1MTA4ZTBlNTUzMjQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRhbGVudC8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRhc2tzLy5Pd2xCb3QueWFtbCIsImgiOiI2YThjNzMzMDYyZDgzM2QxMWM1MjQ1ZWRhNTBmNTEwOGUwZTU1MzI0In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRlbGNvYXV0b21hdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRwdS8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRyYW5zbGF0ZS8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLWxpdmVzdHJlYW0vLk93bEJvdC55YW1sIiwiaCI6IjZhOGM3MzMwNjJkODMzZDExYzUyNDVlZGE1MGY1MTA4ZTBlNTUzMjQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXN0aXRjaGVyLy5Pd2xCb3QueWFtbCIsImgiOiI2YThjNzMzMDYyZDgzM2QxMWM1MjQ1ZWRhNTBmNTEwOGUwZTU1MzI0In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b926f13 commit 57567db

184 files changed

Lines changed: 59588 additions & 3836 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-scheduler/protos/protos.d.ts

Lines changed: 770 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-scheduler/protos/protos.js

Lines changed: 2860 additions & 166 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-scheduler/protos/protos.json

Lines changed: 348 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,15 @@ export class CloudSchedulerClient {
123123
'Please set either universe_domain or universeDomain, but not both.'
124124
);
125125
}
126+
const universeDomainEnvVar =
127+
typeof process === 'object' && typeof process.env === 'object'
128+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
129+
: undefined;
126130
this._universeDomain =
127-
opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com';
131+
opts?.universeDomain ??
132+
opts?.universe_domain ??
133+
universeDomainEnvVar ??
134+
'googleapis.com';
128135
this._servicePath = 'cloudscheduler.' + this._universeDomain;
129136
const servicePath =
130137
opts?.servicePath || opts?.apiEndpoint || this._servicePath;
@@ -180,7 +187,7 @@ export class CloudSchedulerClient {
180187

181188
// Determine the client header string.
182189
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
183-
if (typeof process !== 'undefined' && 'versions' in process) {
190+
if (typeof process === 'object' && 'versions' in process) {
184191
clientHeader.push(`gl-node/${process.versions.node}`);
185192
} else {
186193
clientHeader.push(`gl-web/${this._gaxModule.version}`);
@@ -317,7 +324,7 @@ export class CloudSchedulerClient {
317324
*/
318325
static get servicePath() {
319326
if (
320-
typeof process !== undefined &&
327+
typeof process === 'object' &&
321328
typeof process.emitWarning === 'function'
322329
) {
323330
process.emitWarning(
@@ -335,7 +342,7 @@ export class CloudSchedulerClient {
335342
*/
336343
static get apiEndpoint() {
337344
if (
338-
typeof process !== undefined &&
345+
typeof process === 'object' &&
339346
typeof process.emitWarning === 'function'
340347
) {
341348
process.emitWarning(

packages/google-cloud-scheduler/src/v1beta1/cloud_scheduler_client.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,15 @@ export class CloudSchedulerClient {
123123
'Please set either universe_domain or universeDomain, but not both.'
124124
);
125125
}
126+
const universeDomainEnvVar =
127+
typeof process === 'object' && typeof process.env === 'object'
128+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
129+
: undefined;
126130
this._universeDomain =
127-
opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com';
131+
opts?.universeDomain ??
132+
opts?.universe_domain ??
133+
universeDomainEnvVar ??
134+
'googleapis.com';
128135
this._servicePath = 'cloudscheduler.' + this._universeDomain;
129136
const servicePath =
130137
opts?.servicePath || opts?.apiEndpoint || this._servicePath;
@@ -180,7 +187,7 @@ export class CloudSchedulerClient {
180187

181188
// Determine the client header string.
182189
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
183-
if (typeof process !== 'undefined' && 'versions' in process) {
190+
if (typeof process === 'object' && 'versions' in process) {
184191
clientHeader.push(`gl-node/${process.versions.node}`);
185192
} else {
186193
clientHeader.push(`gl-web/${this._gaxModule.version}`);
@@ -317,7 +324,7 @@ export class CloudSchedulerClient {
317324
*/
318325
static get servicePath() {
319326
if (
320-
typeof process !== undefined &&
327+
typeof process === 'object' &&
321328
typeof process.emitWarning === 'function'
322329
) {
323330
process.emitWarning(
@@ -335,7 +342,7 @@ export class CloudSchedulerClient {
335342
*/
336343
static get apiEndpoint() {
337344
if (
338-
typeof process !== undefined &&
345+
typeof process === 'object' &&
339346
typeof process.emitWarning === 'function'
340347
) {
341348
process.emitWarning(

packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1.ts

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ describe('v1.CloudSchedulerClient', () => {
142142
});
143143

144144
if (
145-
typeof process !== 'undefined' &&
145+
typeof process === 'object' &&
146146
typeof process.emitWarning === 'function'
147147
) {
148148
it('throws DeprecationWarning if static servicePath is used', () => {
@@ -178,6 +178,41 @@ describe('v1.CloudSchedulerClient', () => {
178178
const servicePath = client.apiEndpoint;
179179
assert.strictEqual(servicePath, 'cloudscheduler.example.com');
180180
});
181+
182+
if (typeof process === 'object' && 'env' in process) {
183+
describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => {
184+
it('sets apiEndpoint from environment variable', () => {
185+
const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'];
186+
process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com';
187+
const client = new cloudschedulerModule.v1.CloudSchedulerClient();
188+
const servicePath = client.apiEndpoint;
189+
assert.strictEqual(servicePath, 'cloudscheduler.example.com');
190+
if (saved) {
191+
process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved;
192+
} else {
193+
delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'];
194+
}
195+
});
196+
197+
it('value configured in code has priority over environment variable', () => {
198+
const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'];
199+
process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com';
200+
const client = new cloudschedulerModule.v1.CloudSchedulerClient({
201+
universeDomain: 'configured.example.com',
202+
});
203+
const servicePath = client.apiEndpoint;
204+
assert.strictEqual(
205+
servicePath,
206+
'cloudscheduler.configured.example.com'
207+
);
208+
if (saved) {
209+
process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved;
210+
} else {
211+
delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'];
212+
}
213+
});
214+
});
215+
}
181216
it('does not allow setting both universeDomain and universe_domain', () => {
182217
assert.throws(() => {
183218
new cloudschedulerModule.v1.CloudSchedulerClient({
@@ -1322,9 +1357,9 @@ describe('v1.CloudSchedulerClient', () => {
13221357
assert(
13231358
(client.descriptors.page.listJobs.createStream as SinonStub)
13241359
.getCall(0)
1325-
.args[2].otherArgs.headers['x-goog-request-params'].includes(
1326-
expectedHeaderRequestParams
1327-
)
1360+
.args[2].otherArgs.headers[
1361+
'x-goog-request-params'
1362+
].includes(expectedHeaderRequestParams)
13281363
);
13291364
});
13301365

@@ -1370,9 +1405,9 @@ describe('v1.CloudSchedulerClient', () => {
13701405
assert(
13711406
(client.descriptors.page.listJobs.createStream as SinonStub)
13721407
.getCall(0)
1373-
.args[2].otherArgs.headers['x-goog-request-params'].includes(
1374-
expectedHeaderRequestParams
1375-
)
1408+
.args[2].otherArgs.headers[
1409+
'x-goog-request-params'
1410+
].includes(expectedHeaderRequestParams)
13761411
);
13771412
});
13781413

@@ -1412,9 +1447,9 @@ describe('v1.CloudSchedulerClient', () => {
14121447
assert(
14131448
(client.descriptors.page.listJobs.asyncIterate as SinonStub)
14141449
.getCall(0)
1415-
.args[2].otherArgs.headers['x-goog-request-params'].includes(
1416-
expectedHeaderRequestParams
1417-
)
1450+
.args[2].otherArgs.headers[
1451+
'x-goog-request-params'
1452+
].includes(expectedHeaderRequestParams)
14181453
);
14191454
});
14201455

@@ -1453,9 +1488,9 @@ describe('v1.CloudSchedulerClient', () => {
14531488
assert(
14541489
(client.descriptors.page.listJobs.asyncIterate as SinonStub)
14551490
.getCall(0)
1456-
.args[2].otherArgs.headers['x-goog-request-params'].includes(
1457-
expectedHeaderRequestParams
1458-
)
1491+
.args[2].otherArgs.headers[
1492+
'x-goog-request-params'
1493+
].includes(expectedHeaderRequestParams)
14591494
);
14601495
});
14611496
});

packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1beta1.ts

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ describe('v1beta1.CloudSchedulerClient', () => {
142142
});
143143

144144
if (
145-
typeof process !== 'undefined' &&
145+
typeof process === 'object' &&
146146
typeof process.emitWarning === 'function'
147147
) {
148148
it('throws DeprecationWarning if static servicePath is used', () => {
@@ -178,6 +178,42 @@ describe('v1beta1.CloudSchedulerClient', () => {
178178
const servicePath = client.apiEndpoint;
179179
assert.strictEqual(servicePath, 'cloudscheduler.example.com');
180180
});
181+
182+
if (typeof process === 'object' && 'env' in process) {
183+
describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => {
184+
it('sets apiEndpoint from environment variable', () => {
185+
const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'];
186+
process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com';
187+
const client =
188+
new cloudschedulerModule.v1beta1.CloudSchedulerClient();
189+
const servicePath = client.apiEndpoint;
190+
assert.strictEqual(servicePath, 'cloudscheduler.example.com');
191+
if (saved) {
192+
process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved;
193+
} else {
194+
delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'];
195+
}
196+
});
197+
198+
it('value configured in code has priority over environment variable', () => {
199+
const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'];
200+
process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com';
201+
const client = new cloudschedulerModule.v1beta1.CloudSchedulerClient({
202+
universeDomain: 'configured.example.com',
203+
});
204+
const servicePath = client.apiEndpoint;
205+
assert.strictEqual(
206+
servicePath,
207+
'cloudscheduler.configured.example.com'
208+
);
209+
if (saved) {
210+
process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved;
211+
} else {
212+
delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'];
213+
}
214+
});
215+
});
216+
}
181217
it('does not allow setting both universeDomain and universe_domain', () => {
182218
assert.throws(() => {
183219
new cloudschedulerModule.v1beta1.CloudSchedulerClient({
@@ -1325,9 +1361,9 @@ describe('v1beta1.CloudSchedulerClient', () => {
13251361
assert(
13261362
(client.descriptors.page.listJobs.createStream as SinonStub)
13271363
.getCall(0)
1328-
.args[2].otherArgs.headers['x-goog-request-params'].includes(
1329-
expectedHeaderRequestParams
1330-
)
1364+
.args[2].otherArgs.headers[
1365+
'x-goog-request-params'
1366+
].includes(expectedHeaderRequestParams)
13311367
);
13321368
});
13331369

@@ -1376,9 +1412,9 @@ describe('v1beta1.CloudSchedulerClient', () => {
13761412
assert(
13771413
(client.descriptors.page.listJobs.createStream as SinonStub)
13781414
.getCall(0)
1379-
.args[2].otherArgs.headers['x-goog-request-params'].includes(
1380-
expectedHeaderRequestParams
1381-
)
1415+
.args[2].otherArgs.headers[
1416+
'x-goog-request-params'
1417+
].includes(expectedHeaderRequestParams)
13821418
);
13831419
});
13841420

@@ -1418,9 +1454,9 @@ describe('v1beta1.CloudSchedulerClient', () => {
14181454
assert(
14191455
(client.descriptors.page.listJobs.asyncIterate as SinonStub)
14201456
.getCall(0)
1421-
.args[2].otherArgs.headers['x-goog-request-params'].includes(
1422-
expectedHeaderRequestParams
1423-
)
1457+
.args[2].otherArgs.headers[
1458+
'x-goog-request-params'
1459+
].includes(expectedHeaderRequestParams)
14241460
);
14251461
});
14261462

@@ -1459,9 +1495,9 @@ describe('v1beta1.CloudSchedulerClient', () => {
14591495
assert(
14601496
(client.descriptors.page.listJobs.asyncIterate as SinonStub)
14611497
.getCall(0)
1462-
.args[2].otherArgs.headers['x-goog-request-params'].includes(
1463-
expectedHeaderRequestParams
1464-
)
1498+
.args[2].otherArgs.headers[
1499+
'x-goog-request-params'
1500+
].includes(expectedHeaderRequestParams)
14651501
);
14661502
});
14671503
});

packages/google-cloud-secretmanager/src/v1/secret_manager_service_client.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,15 @@ export class SecretManagerServiceClient {
125125
'Please set either universe_domain or universeDomain, but not both.'
126126
);
127127
}
128+
const universeDomainEnvVar =
129+
typeof process === 'object' && typeof process.env === 'object'
130+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
131+
: undefined;
128132
this._universeDomain =
129-
opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com';
133+
opts?.universeDomain ??
134+
opts?.universe_domain ??
135+
universeDomainEnvVar ??
136+
'googleapis.com';
130137
this._servicePath = 'secretmanager.' + this._universeDomain;
131138
const servicePath =
132139
opts?.servicePath || opts?.apiEndpoint || this._servicePath;
@@ -178,7 +185,7 @@ export class SecretManagerServiceClient {
178185

179186
// Determine the client header string.
180187
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
181-
if (typeof process !== 'undefined' && 'versions' in process) {
188+
if (typeof process === 'object' && 'versions' in process) {
182189
clientHeader.push(`gl-node/${process.versions.node}`);
183190
} else {
184191
clientHeader.push(`gl-web/${this._gaxModule.version}`);
@@ -331,7 +338,7 @@ export class SecretManagerServiceClient {
331338
*/
332339
static get servicePath() {
333340
if (
334-
typeof process !== undefined &&
341+
typeof process === 'object' &&
335342
typeof process.emitWarning === 'function'
336343
) {
337344
process.emitWarning(
@@ -349,7 +356,7 @@ export class SecretManagerServiceClient {
349356
*/
350357
static get apiEndpoint() {
351358
if (
352-
typeof process !== undefined &&
359+
typeof process === 'object' &&
353360
typeof process.emitWarning === 'function'
354361
) {
355362
process.emitWarning(

packages/google-cloud-secretmanager/src/v1beta2/secret_manager_service_client.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,15 @@ export class SecretManagerServiceClient {
128128
'Please set either universe_domain or universeDomain, but not both.'
129129
);
130130
}
131+
const universeDomainEnvVar =
132+
typeof process === 'object' && typeof process.env === 'object'
133+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
134+
: undefined;
131135
this._universeDomain =
132-
opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com';
136+
opts?.universeDomain ??
137+
opts?.universe_domain ??
138+
universeDomainEnvVar ??
139+
'googleapis.com';
133140
this._servicePath = 'secretmanager.' + this._universeDomain;
134141
const servicePath =
135142
opts?.servicePath || opts?.apiEndpoint || this._servicePath;
@@ -185,7 +192,7 @@ export class SecretManagerServiceClient {
185192

186193
// Determine the client header string.
187194
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
188-
if (typeof process !== 'undefined' && 'versions' in process) {
195+
if (typeof process === 'object' && 'versions' in process) {
189196
clientHeader.push(`gl-node/${process.versions.node}`);
190197
} else {
191198
clientHeader.push(`gl-web/${this._gaxModule.version}`);
@@ -345,7 +352,7 @@ export class SecretManagerServiceClient {
345352
*/
346353
static get servicePath() {
347354
if (
348-
typeof process !== undefined &&
355+
typeof process === 'object' &&
349356
typeof process.emitWarning === 'function'
350357
) {
351358
process.emitWarning(
@@ -363,7 +370,7 @@ export class SecretManagerServiceClient {
363370
*/
364371
static get apiEndpoint() {
365372
if (
366-
typeof process !== undefined &&
373+
typeof process === 'object' &&
367374
typeof process.emitWarning === 'function'
368375
) {
369376
process.emitWarning(

0 commit comments

Comments
 (0)