Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: duplicate resource name #333

Merged
merged 15 commits into from
Mar 17, 2020
41 changes: 27 additions & 14 deletions baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class EchoClient {
userPathTemplate: new this._gaxModule.PathTemplate(
'users/{user_id}'
),
userIdBlurbIdPathTemplate: new this._gaxModule.PathTemplate(
userIdBlurbIdBlurbPathTemplate: new this._gaxModule.PathTemplate(
xiaozhenliu-gg5 marked this conversation as resolved.
Show resolved Hide resolved
'user/{user_id}/profile/blurbs/{blurb_id}'
),
};
Expand Down Expand Up @@ -893,39 +893,52 @@ export class EchoClient {
}

/**
* Return a fully-qualified userIdBlurbId resource name string.
* Return a fully-qualified userIdBlurbIdBlurb resource name string.
*
* @param {string} user_id
* @param {string} blurb_id
* @param {string} blurb
* @returns {string} Resource name string.
*/
userIdBlurbIdPath(userId:string,blurbId:string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.render({
userIdBlurbIdBlurbPath(userId:string,blurbId:string,blurb:string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.render({
user_id: userId,
blurb_id: blurbId,
blurb: blurb,
});
}

/**
* Parse the user_id from UserIdBlurbId resource.
* Parse the user_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the user_id.
*/
matchUserIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).user_id;
matchUserIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).user_id;
}

/**
* Parse the blurb_id from UserIdBlurbId resource.
* Parse the blurb_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb_id.
*/
matchBlurbIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).blurb_id;
matchBlurbIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb_id;
}

/**
* Parse the blurb from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb.
*/
matchBlurbFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class IdentityClient {
userPathTemplate: new this._gaxModule.PathTemplate(
'users/{user_id}'
),
userIdBlurbIdPathTemplate: new this._gaxModule.PathTemplate(
userIdBlurbIdBlurbPathTemplate: new this._gaxModule.PathTemplate(
'user/{user_id}/profile/blurbs/{blurb_id}'
),
};
Expand Down Expand Up @@ -838,39 +838,52 @@ export class IdentityClient {
}

/**
* Return a fully-qualified userIdBlurbId resource name string.
* Return a fully-qualified userIdBlurbIdBlurb resource name string.
*
* @param {string} user_id
* @param {string} blurb_id
* @param {string} blurb
* @returns {string} Resource name string.
*/
userIdBlurbIdPath(userId:string,blurbId:string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.render({
userIdBlurbIdBlurbPath(userId:string,blurbId:string,blurb:string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.render({
user_id: userId,
blurb_id: blurbId,
blurb: blurb,
});
}

/**
* Parse the user_id from UserIdBlurbId resource.
* Parse the user_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the user_id.
*/
matchUserIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).user_id;
matchUserIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).user_id;
}

/**
* Parse the blurb_id from UserIdBlurbId resource.
* Parse the blurb_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb_id.
*/
matchBlurbIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).blurb_id;
matchBlurbIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb_id;
}

/**
* Parse the blurb from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb.
*/
matchBlurbFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class MessagingClient {
userPathTemplate: new this._gaxModule.PathTemplate(
'users/{user_id}'
),
userIdBlurbIdPathTemplate: new this._gaxModule.PathTemplate(
userIdBlurbIdBlurbPathTemplate: new this._gaxModule.PathTemplate(
'user/{user_id}/profile/blurbs/{blurb_id}'
),
};
Expand Down Expand Up @@ -1423,39 +1423,52 @@ export class MessagingClient {
}

/**
* Return a fully-qualified userIdBlurbId resource name string.
* Return a fully-qualified userIdBlurbIdBlurb resource name string.
*
* @param {string} user_id
* @param {string} blurb_id
* @param {string} blurb
* @returns {string} Resource name string.
*/
userIdBlurbIdPath(userId:string,blurbId:string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.render({
userIdBlurbIdBlurbPath(userId:string,blurbId:string,blurb:string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.render({
user_id: userId,
blurb_id: blurbId,
blurb: blurb,
});
}

/**
* Parse the user_id from UserIdBlurbId resource.
* Parse the user_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the user_id.
*/
matchUserIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).user_id;
matchUserIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).user_id;
}

/**
* Parse the blurb_id from UserIdBlurbId resource.
* Parse the blurb_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb_id.
*/
matchBlurbIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).blurb_id;
matchBlurbIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb_id;
}

/**
* Parse the blurb from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb.
*/
matchBlurbFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class TestingClient {
userPathTemplate: new this._gaxModule.PathTemplate(
'users/{user_id}'
),
userIdBlurbIdPathTemplate: new this._gaxModule.PathTemplate(
userIdBlurbIdBlurbPathTemplate: new this._gaxModule.PathTemplate(
'user/{user_id}/profile/blurbs/{blurb_id}'
),
};
Expand Down Expand Up @@ -1095,39 +1095,52 @@ export class TestingClient {
}

/**
* Return a fully-qualified userIdBlurbId resource name string.
* Return a fully-qualified userIdBlurbIdBlurb resource name string.
*
* @param {string} user_id
* @param {string} blurb_id
* @param {string} blurb
* @returns {string} Resource name string.
*/
userIdBlurbIdPath(userId:string,blurbId:string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.render({
userIdBlurbIdBlurbPath(userId:string,blurbId:string,blurb:string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.render({
user_id: userId,
blurb_id: blurbId,
blurb: blurb,
});
}

/**
* Parse the user_id from UserIdBlurbId resource.
* Parse the user_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the user_id.
*/
matchUserIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).user_id;
matchUserIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).user_id;
}

/**
* Parse the blurb_id from UserIdBlurbId resource.
* Parse the blurb_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb_id.
*/
matchBlurbIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).blurb_id;
matchBlurbIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb_id;
}

/**
* Parse the blurb from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb.
*/
matchBlurbFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb;
}

/**
Expand Down
41 changes: 27 additions & 14 deletions baselines/showcase/src/v1beta1/echo_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class EchoClient {
userPathTemplate: new this._gaxModule.PathTemplate(
'users/{user_id}'
),
userIdBlurbIdPathTemplate: new this._gaxModule.PathTemplate(
userIdBlurbIdBlurbPathTemplate: new this._gaxModule.PathTemplate(
'user/{user_id}/profile/blurbs/{blurb_id}'
),
};
Expand Down Expand Up @@ -893,39 +893,52 @@ export class EchoClient {
}

/**
* Return a fully-qualified userIdBlurbId resource name string.
* Return a fully-qualified userIdBlurbIdBlurb resource name string.
*
* @param {string} user_id
* @param {string} blurb_id
* @param {string} blurb
* @returns {string} Resource name string.
*/
userIdBlurbIdPath(userId:string,blurbId:string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.render({
userIdBlurbIdBlurbPath(userId:string,blurbId:string,blurb:string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.render({
user_id: userId,
blurb_id: blurbId,
blurb: blurb,
});
}

/**
* Parse the user_id from UserIdBlurbId resource.
* Parse the user_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the user_id.
*/
matchUserIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).user_id;
matchUserIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).user_id;
}

/**
* Parse the blurb_id from UserIdBlurbId resource.
* Parse the blurb_id from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdName
* A fully-qualified path representing user_id_blurb_id resource.
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb_id.
*/
matchBlurbIdFromUserIdBlurbIdName(userIdBlurbIdName: string) {
return this._pathTemplates.userIdBlurbIdPathTemplate.match(userIdBlurbIdName).blurb_id;
matchBlurbIdFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb_id;
}

/**
* Parse the blurb from UserIdBlurbIdBlurb resource.
*
* @param {string} userIdBlurbIdBlurbName
* A fully-qualified path representing user_id_blurb_id_blurb resource.
* @returns {string} A string representing the blurb.
*/
matchBlurbFromUserIdBlurbIdBlurbName(userIdBlurbIdBlurbName: string) {
return this._pathTemplates.userIdBlurbIdBlurbPathTemplate.match(userIdBlurbIdBlurbName).blurb;
}

/**
Expand Down
Loading