Skip to content

Commit

Permalink
fix: remove name conflict for APIs that have servicePath (#1531)
Browse files Browse the repository at this point in the history
* fix: remove name conflict for APIs that have servicePath

* fix: use correct name in the generated tests
  • Loading branch information
alexander-fenster authored Feb 6, 2024
1 parent d0094d3 commit 9312781
Show file tree
Hide file tree
Showing 148 changed files with 427 additions and 1,500 deletions.
12 changes: 2 additions & 10 deletions baselines/asset-esm/esm/src/v1/asset_service_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export class AssetServiceClient {

/**
* The DNS address for this API service.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath() {
Expand All @@ -311,7 +311,7 @@ export class AssetServiceClient {
/**
* The DNS address for this API service - same as servicePath,
* exists for compatibility reasons.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint() {
Expand All @@ -325,14 +325,6 @@ export class AssetServiceClient {
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
get servicePath() {
return this._servicePath;
}

/**
* The DNS address for this API service - same as servicePath().
* @returns {string} The DNS address for this service.
*/
get apiEndpoint() {
return this._servicePath;
}
Expand Down
16 changes: 5 additions & 11 deletions baselines/asset-esm/esm/test/gapic_asset_service_v1.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,12 @@ function stubLongRunningCallWithCallback<ResponseType>(response?: ResponseType,

describe('v1.AssetServiceClient', () => {
describe('Common methods', () => {
it('has servicePath', () => {
const client = new assetserviceModule.v1.AssetServiceClient();
const servicePath = client.servicePath;
assert.strictEqual(servicePath, 'cloudasset.googleapis.com');
});

it('has apiEndpoint', () => {
const client = new assetserviceModule.v1.AssetServiceClient();
const apiEndpoint = client.apiEndpoint;
assert.strictEqual(apiEndpoint, 'cloudasset.googleapis.com');
});

it('has universeDomain', () => {
const client = new assetserviceModule.v1.AssetServiceClient();
const universeDomain = client.universeDomain;
Expand All @@ -114,15 +108,15 @@ describe('v1.AssetServiceClient', () => {
stub.restore();
});
}
it('sets servicePath according to universe domain camelCase', () => {
it('sets apiEndpoint according to universe domain camelCase', () => {
const client = new assetserviceModule.v1.AssetServiceClient({universeDomain: 'example.com'});
const servicePath = client.servicePath;
const servicePath = client.apiEndpoint;
assert.strictEqual(servicePath, 'cloudasset.example.com');
});

it('sets servicePath according to universe domain snakeCase', () => {
it('sets apiEndpoint according to universe domain snakeCase', () => {
const client = new assetserviceModule.v1.AssetServiceClient({universe_domain: 'example.com'});
const servicePath = client.servicePath;
const servicePath = client.apiEndpoint;
assert.strictEqual(servicePath, 'cloudasset.example.com');
});
it('does not allow setting both universeDomain and universe_domain', () => {
Expand Down
15 changes: 3 additions & 12 deletions baselines/asset/src/v1/asset_service_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export class AssetServiceClient {

/**
* The DNS address for this API service.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath() {
Expand All @@ -293,9 +293,8 @@ export class AssetServiceClient {
}

/**
* The DNS address for this API service - same as servicePath,
* exists for compatibility reasons.
* @deprecated
* The DNS address for this API service - same as servicePath.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint() {
Expand All @@ -309,14 +308,6 @@ export class AssetServiceClient {
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
get servicePath() {
return this._servicePath;
}

/**
* The DNS address for this API service - same as servicePath().
* @returns {string} The DNS address for this service.
*/
get apiEndpoint() {
return this._servicePath;
}
Expand Down
16 changes: 5 additions & 11 deletions baselines/asset/test/gapic_asset_service_v1.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,12 @@ function stubLongRunningCallWithCallback<ResponseType>(response?: ResponseType,

describe('v1.AssetServiceClient', () => {
describe('Common methods', () => {
it('has servicePath', () => {
const client = new assetserviceModule.v1.AssetServiceClient();
const servicePath = client.servicePath;
assert.strictEqual(servicePath, 'cloudasset.googleapis.com');
});

it('has apiEndpoint', () => {
const client = new assetserviceModule.v1.AssetServiceClient();
const apiEndpoint = client.apiEndpoint;
assert.strictEqual(apiEndpoint, 'cloudasset.googleapis.com');
});

it('has universeDomain', () => {
const client = new assetserviceModule.v1.AssetServiceClient();
const universeDomain = client.universeDomain;
Expand All @@ -105,15 +99,15 @@ describe('v1.AssetServiceClient', () => {
stub.restore();
});
}
it('sets servicePath according to universe domain camelCase', () => {
it('sets apiEndpoint according to universe domain camelCase', () => {
const client = new assetserviceModule.v1.AssetServiceClient({universeDomain: 'example.com'});
const servicePath = client.servicePath;
const servicePath = client.apiEndpoint;
assert.strictEqual(servicePath, 'cloudasset.example.com');
});

it('sets servicePath according to universe domain snakeCase', () => {
it('sets apiEndpoint according to universe domain snakeCase', () => {
const client = new assetserviceModule.v1.AssetServiceClient({universe_domain: 'example.com'});
const servicePath = client.servicePath;
const servicePath = client.apiEndpoint;
assert.strictEqual(servicePath, 'cloudasset.example.com');
});
it('does not allow setting both universeDomain and universe_domain', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export class BigQueryStorageClient {

/**
* The DNS address for this API service.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath() {
Expand All @@ -297,7 +297,7 @@ export class BigQueryStorageClient {
/**
* The DNS address for this API service - same as servicePath,
* exists for compatibility reasons.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint() {
Expand All @@ -311,14 +311,6 @@ export class BigQueryStorageClient {
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
get servicePath() {
return this._servicePath;
}

/**
* The DNS address for this API service - same as servicePath().
* @returns {string} The DNS address for this service.
*/
get apiEndpoint() {
return this._servicePath;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,12 @@ function stubServerStreamingCall<ResponseType>(response?: ResponseType, error?:

describe('v1beta1.BigQueryStorageClient', () => {
describe('Common methods', () => {
it('has servicePath', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient();
const servicePath = client.servicePath;
assert.strictEqual(servicePath, 'bigquerystorage.googleapis.com');
});

it('has apiEndpoint', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient();
const apiEndpoint = client.apiEndpoint;
assert.strictEqual(apiEndpoint, 'bigquerystorage.googleapis.com');
});

it('has universeDomain', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient();
const universeDomain = client.universeDomain;
Expand All @@ -112,15 +106,15 @@ describe('v1beta1.BigQueryStorageClient', () => {
stub.restore();
});
}
it('sets servicePath according to universe domain camelCase', () => {
it('sets apiEndpoint according to universe domain camelCase', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient({universeDomain: 'example.com'});
const servicePath = client.servicePath;
const servicePath = client.apiEndpoint;
assert.strictEqual(servicePath, 'bigquerystorage.example.com');
});

it('sets servicePath according to universe domain snakeCase', () => {
it('sets apiEndpoint according to universe domain snakeCase', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient({universe_domain: 'example.com'});
const servicePath = client.servicePath;
const servicePath = client.apiEndpoint;
assert.strictEqual(servicePath, 'bigquerystorage.example.com');
});
it('does not allow setting both universeDomain and universe_domain', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class BigQueryStorageClient {

/**
* The DNS address for this API service.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath() {
Expand All @@ -279,9 +279,8 @@ export class BigQueryStorageClient {
}

/**
* The DNS address for this API service - same as servicePath,
* exists for compatibility reasons.
* @deprecated
* The DNS address for this API service - same as servicePath.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint() {
Expand All @@ -295,14 +294,6 @@ export class BigQueryStorageClient {
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
get servicePath() {
return this._servicePath;
}

/**
* The DNS address for this API service - same as servicePath().
* @returns {string} The DNS address for this service.
*/
get apiEndpoint() {
return this._servicePath;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,12 @@ function stubServerStreamingCall<ResponseType>(response?: ResponseType, error?:

describe('v1beta1.BigQueryStorageClient', () => {
describe('Common methods', () => {
it('has servicePath', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient();
const servicePath = client.servicePath;
assert.strictEqual(servicePath, 'bigquerystorage.googleapis.com');
});

it('has apiEndpoint', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient();
const apiEndpoint = client.apiEndpoint;
assert.strictEqual(apiEndpoint, 'bigquerystorage.googleapis.com');
});

it('has universeDomain', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient();
const universeDomain = client.universeDomain;
Expand All @@ -103,15 +97,15 @@ describe('v1beta1.BigQueryStorageClient', () => {
stub.restore();
});
}
it('sets servicePath according to universe domain camelCase', () => {
it('sets apiEndpoint according to universe domain camelCase', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient({universeDomain: 'example.com'});
const servicePath = client.servicePath;
const servicePath = client.apiEndpoint;
assert.strictEqual(servicePath, 'bigquerystorage.example.com');
});

it('sets servicePath according to universe domain snakeCase', () => {
it('sets apiEndpoint according to universe domain snakeCase', () => {
const client = new bigquerystorageModule.v1beta1.BigQueryStorageClient({universe_domain: 'example.com'});
const servicePath = client.servicePath;
const servicePath = client.apiEndpoint;
assert.strictEqual(servicePath, 'bigquerystorage.example.com');
});
it('does not allow setting both universeDomain and universe_domain', () => {
Expand Down
12 changes: 2 additions & 10 deletions baselines/compute-esm/esm/src/v1/addresses_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class AddressesClient {

/**
* The DNS address for this API service.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath() {
Expand All @@ -285,7 +285,7 @@ export class AddressesClient {
/**
* The DNS address for this API service - same as servicePath,
* exists for compatibility reasons.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint() {
Expand All @@ -299,14 +299,6 @@ export class AddressesClient {
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
get servicePath() {
return this._servicePath;
}

/**
* The DNS address for this API service - same as servicePath().
* @returns {string} The DNS address for this service.
*/
get apiEndpoint() {
return this._servicePath;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class RegionOperationsClient {

/**
* The DNS address for this API service.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath() {
Expand All @@ -271,7 +271,7 @@ export class RegionOperationsClient {
/**
* The DNS address for this API service - same as servicePath,
* exists for compatibility reasons.
* @deprecated
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint() {
Expand All @@ -285,14 +285,6 @@ export class RegionOperationsClient {
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
get servicePath() {
return this._servicePath;
}

/**
* The DNS address for this API service - same as servicePath().
* @returns {string} The DNS address for this service.
*/
get apiEndpoint() {
return this._servicePath;
}
Expand Down
Loading

0 comments on commit 9312781

Please sign in to comment.