Skip to content

Commit

Permalink
fix!: correct broken ConversationModelEvaluation resource pattern (#945)
Browse files Browse the repository at this point in the history
* fix!: correct broken ConversationModelEvaluation resource pattern

PiperOrigin-RevId: 442646533

Source-Link: googleapis/googleapis@b62c562

Source-Link: googleapis/googleapis-gen@f5c157c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjVjMTU3YzY4MTE1ODQ3ZDc4ZWI4NDEyNzM0Y2I4MmU3ZDU1MTViNCJ9

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Apr 26, 2022
1 parent c190059 commit 2c8bfdb
Show file tree
Hide file tree
Showing 37 changed files with 2,691 additions and 1,467 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ option java_multiple_files = true;
option java_outer_classname = "AudioConfigProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";
option (google.api.resource_definition) = {
type: "automl.googleapis.com/Model"
pattern: "projects/{project}/locations/{location}/models/{model}"
};

// Audio encoding of the audio content sent in the conversational query request.
// Refer to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ message ConversationModel {
message ConversationModelEvaluation {
option (google.api.resource) = {
type: "dialogflow.googleapis.com/ConversationModelEvaluation"
pattern: "projects/{project}/conversationModels/{conversation_model}/evaluations/evaluation"
pattern: "projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/evaluation"
pattern: "projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation}"
pattern: "projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation}"
};

// The resource name of the evaluation. Format:
Expand Down Expand Up @@ -528,7 +528,7 @@ message CreateConversationModelEvaluationRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/ConversationModel"
child_type: "dialogflow.googleapis.com/ConversationModelEvaluation"
}
];

Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-dialogflow/protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

130 changes: 83 additions & 47 deletions packages/google-cloud-dialogflow/src/v2/agents_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ export class AgentsClient {
projectConversationModelPathTemplate: new this._gaxModule.PathTemplate(
'projects/{project}/conversationModels/{conversation_model}'
),
projectConversationModelEvaluationsEvaluationPathTemplate:
projectConversationModelEvaluationPathTemplate:
new this._gaxModule.PathTemplate(
'projects/{project}/conversationModels/{conversation_model}/evaluations/evaluation'
'projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation}'
),
projectConversationParticipantPathTemplate:
new this._gaxModule.PathTemplate(
Expand Down Expand Up @@ -286,9 +286,9 @@ export class AgentsClient {
new this._gaxModule.PathTemplate(
'projects/{project}/locations/{location}/conversationModels/{conversation_model}'
),
projectLocationConversationModelEvaluationsEvaluationPathTemplate:
projectLocationConversationModelEvaluationPathTemplate:
new this._gaxModule.PathTemplate(
'projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/evaluation'
'projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation}'
),
projectLocationConversationParticipantPathTemplate:
new this._gaxModule.PathTemplate(
Expand Down Expand Up @@ -2567,54 +2567,72 @@ export class AgentsClient {
}

/**
* Return a fully-qualified projectConversationModelEvaluationsEvaluation resource name string.
* Return a fully-qualified projectConversationModelEvaluation resource name string.
*
* @param {string} project
* @param {string} conversation_model
* @param {string} evaluation
* @returns {string} Resource name string.
*/
projectConversationModelEvaluationsEvaluationPath(
projectConversationModelEvaluationPath(
project: string,
conversationModel: string
conversationModel: string,
evaluation: string
) {
return this.pathTemplates.projectConversationModelEvaluationsEvaluationPathTemplate.render(
return this.pathTemplates.projectConversationModelEvaluationPathTemplate.render(
{
project: project,
conversation_model: conversationModel,
evaluation: evaluation,
}
);
}

/**
* Parse the project from ProjectConversationModelEvaluationsEvaluation resource.
* Parse the project from ProjectConversationModelEvaluation resource.
*
* @param {string} projectConversationModelEvaluationsEvaluationName
* A fully-qualified path representing project_conversation_model_evaluations_evaluation resource.
* @param {string} projectConversationModelEvaluationName
* A fully-qualified path representing project_conversation_model_evaluation resource.
* @returns {string} A string representing the project.
*/
matchProjectFromProjectConversationModelEvaluationsEvaluationName(
projectConversationModelEvaluationsEvaluationName: string
matchProjectFromProjectConversationModelEvaluationName(
projectConversationModelEvaluationName: string
) {
return this.pathTemplates.projectConversationModelEvaluationsEvaluationPathTemplate.match(
projectConversationModelEvaluationsEvaluationName
return this.pathTemplates.projectConversationModelEvaluationPathTemplate.match(
projectConversationModelEvaluationName
).project;
}

/**
* Parse the conversation_model from ProjectConversationModelEvaluationsEvaluation resource.
* Parse the conversation_model from ProjectConversationModelEvaluation resource.
*
* @param {string} projectConversationModelEvaluationsEvaluationName
* A fully-qualified path representing project_conversation_model_evaluations_evaluation resource.
* @param {string} projectConversationModelEvaluationName
* A fully-qualified path representing project_conversation_model_evaluation resource.
* @returns {string} A string representing the conversation_model.
*/
matchConversationModelFromProjectConversationModelEvaluationsEvaluationName(
projectConversationModelEvaluationsEvaluationName: string
matchConversationModelFromProjectConversationModelEvaluationName(
projectConversationModelEvaluationName: string
) {
return this.pathTemplates.projectConversationModelEvaluationsEvaluationPathTemplate.match(
projectConversationModelEvaluationsEvaluationName
return this.pathTemplates.projectConversationModelEvaluationPathTemplate.match(
projectConversationModelEvaluationName
).conversation_model;
}

/**
* Parse the evaluation from ProjectConversationModelEvaluation resource.
*
* @param {string} projectConversationModelEvaluationName
* A fully-qualified path representing project_conversation_model_evaluation resource.
* @returns {string} A string representing the evaluation.
*/
matchEvaluationFromProjectConversationModelEvaluationName(
projectConversationModelEvaluationName: string
) {
return this.pathTemplates.projectConversationModelEvaluationPathTemplate.match(
projectConversationModelEvaluationName
).evaluation;
}

/**
* Return a fully-qualified projectConversationParticipant resource name string.
*
Expand Down Expand Up @@ -3878,72 +3896,90 @@ export class AgentsClient {
}

/**
* Return a fully-qualified projectLocationConversationModelEvaluationsEvaluation resource name string.
* Return a fully-qualified projectLocationConversationModelEvaluation resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} conversation_model
* @param {string} evaluation
* @returns {string} Resource name string.
*/
projectLocationConversationModelEvaluationsEvaluationPath(
projectLocationConversationModelEvaluationPath(
project: string,
location: string,
conversationModel: string
conversationModel: string,
evaluation: string
) {
return this.pathTemplates.projectLocationConversationModelEvaluationsEvaluationPathTemplate.render(
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render(
{
project: project,
location: location,
conversation_model: conversationModel,
evaluation: evaluation,
}
);
}

/**
* Parse the project from ProjectLocationConversationModelEvaluationsEvaluation resource.
* Parse the project from ProjectLocationConversationModelEvaluation resource.
*
* @param {string} projectLocationConversationModelEvaluationsEvaluationName
* A fully-qualified path representing project_location_conversation_model_evaluations_evaluation resource.
* @param {string} projectLocationConversationModelEvaluationName
* A fully-qualified path representing project_location_conversation_model_evaluation resource.
* @returns {string} A string representing the project.
*/
matchProjectFromProjectLocationConversationModelEvaluationsEvaluationName(
projectLocationConversationModelEvaluationsEvaluationName: string
matchProjectFromProjectLocationConversationModelEvaluationName(
projectLocationConversationModelEvaluationName: string
) {
return this.pathTemplates.projectLocationConversationModelEvaluationsEvaluationPathTemplate.match(
projectLocationConversationModelEvaluationsEvaluationName
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match(
projectLocationConversationModelEvaluationName
).project;
}

/**
* Parse the location from ProjectLocationConversationModelEvaluationsEvaluation resource.
* Parse the location from ProjectLocationConversationModelEvaluation resource.
*
* @param {string} projectLocationConversationModelEvaluationsEvaluationName
* A fully-qualified path representing project_location_conversation_model_evaluations_evaluation resource.
* @param {string} projectLocationConversationModelEvaluationName
* A fully-qualified path representing project_location_conversation_model_evaluation resource.
* @returns {string} A string representing the location.
*/
matchLocationFromProjectLocationConversationModelEvaluationsEvaluationName(
projectLocationConversationModelEvaluationsEvaluationName: string
matchLocationFromProjectLocationConversationModelEvaluationName(
projectLocationConversationModelEvaluationName: string
) {
return this.pathTemplates.projectLocationConversationModelEvaluationsEvaluationPathTemplate.match(
projectLocationConversationModelEvaluationsEvaluationName
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match(
projectLocationConversationModelEvaluationName
).location;
}

/**
* Parse the conversation_model from ProjectLocationConversationModelEvaluationsEvaluation resource.
* Parse the conversation_model from ProjectLocationConversationModelEvaluation resource.
*
* @param {string} projectLocationConversationModelEvaluationsEvaluationName
* A fully-qualified path representing project_location_conversation_model_evaluations_evaluation resource.
* @param {string} projectLocationConversationModelEvaluationName
* A fully-qualified path representing project_location_conversation_model_evaluation resource.
* @returns {string} A string representing the conversation_model.
*/
matchConversationModelFromProjectLocationConversationModelEvaluationsEvaluationName(
projectLocationConversationModelEvaluationsEvaluationName: string
matchConversationModelFromProjectLocationConversationModelEvaluationName(
projectLocationConversationModelEvaluationName: string
) {
return this.pathTemplates.projectLocationConversationModelEvaluationsEvaluationPathTemplate.match(
projectLocationConversationModelEvaluationsEvaluationName
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match(
projectLocationConversationModelEvaluationName
).conversation_model;
}

/**
* Parse the evaluation from ProjectLocationConversationModelEvaluation resource.
*
* @param {string} projectLocationConversationModelEvaluationName
* A fully-qualified path representing project_location_conversation_model_evaluation resource.
* @returns {string} A string representing the evaluation.
*/
matchEvaluationFromProjectLocationConversationModelEvaluationName(
projectLocationConversationModelEvaluationName: string
) {
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match(
projectLocationConversationModelEvaluationName
).evaluation;
}

/**
* Return a fully-qualified projectLocationConversationParticipant resource name string.
*
Expand Down
Loading

0 comments on commit 2c8bfdb

Please sign in to comment.