Skip to content

Commit 2c8bfdb

Browse files
fix!: correct broken ConversationModelEvaluation resource pattern (#945)
* 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>
1 parent c190059 commit 2c8bfdb

37 files changed

+2691
-1467
lines changed

packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/audio_config.proto

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ option java_multiple_files = true;
2727
option java_outer_classname = "AudioConfigProto";
2828
option java_package = "com.google.cloud.dialogflow.v2";
2929
option objc_class_prefix = "DF";
30+
option (google.api.resource_definition) = {
31+
type: "automl.googleapis.com/Model"
32+
pattern: "projects/{project}/locations/{location}/models/{model}"
33+
};
3034

3135
// Audio encoding of the audio content sent in the conversational query request.
3236
// Refer to the

packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_model.proto

+3-3
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ message ConversationModel {
289289
message ConversationModelEvaluation {
290290
option (google.api.resource) = {
291291
type: "dialogflow.googleapis.com/ConversationModelEvaluation"
292-
pattern: "projects/{project}/conversationModels/{conversation_model}/evaluations/evaluation"
293-
pattern: "projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/evaluation"
292+
pattern: "projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation}"
293+
pattern: "projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation}"
294294
};
295295

296296
// The resource name of the evaluation. Format:
@@ -528,7 +528,7 @@ message CreateConversationModelEvaluationRequest {
528528
string parent = 1 [
529529
(google.api.field_behavior) = REQUIRED,
530530
(google.api.resource_reference) = {
531-
type: "dialogflow.googleapis.com/ConversationModel"
531+
child_type: "dialogflow.googleapis.com/ConversationModelEvaluation"
532532
}
533533
];
534534

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

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-dialogflow/src/v2/agents_client.ts

+83-47
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ export class AgentsClient {
217217
projectConversationModelPathTemplate: new this._gaxModule.PathTemplate(
218218
'projects/{project}/conversationModels/{conversation_model}'
219219
),
220-
projectConversationModelEvaluationsEvaluationPathTemplate:
220+
projectConversationModelEvaluationPathTemplate:
221221
new this._gaxModule.PathTemplate(
222-
'projects/{project}/conversationModels/{conversation_model}/evaluations/evaluation'
222+
'projects/{project}/conversationModels/{conversation_model}/evaluations/{evaluation}'
223223
),
224224
projectConversationParticipantPathTemplate:
225225
new this._gaxModule.PathTemplate(
@@ -286,9 +286,9 @@ export class AgentsClient {
286286
new this._gaxModule.PathTemplate(
287287
'projects/{project}/locations/{location}/conversationModels/{conversation_model}'
288288
),
289-
projectLocationConversationModelEvaluationsEvaluationPathTemplate:
289+
projectLocationConversationModelEvaluationPathTemplate:
290290
new this._gaxModule.PathTemplate(
291-
'projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/evaluation'
291+
'projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation}'
292292
),
293293
projectLocationConversationParticipantPathTemplate:
294294
new this._gaxModule.PathTemplate(
@@ -2567,54 +2567,72 @@ export class AgentsClient {
25672567
}
25682568

25692569
/**
2570-
* Return a fully-qualified projectConversationModelEvaluationsEvaluation resource name string.
2570+
* Return a fully-qualified projectConversationModelEvaluation resource name string.
25712571
*
25722572
* @param {string} project
25732573
* @param {string} conversation_model
2574+
* @param {string} evaluation
25742575
* @returns {string} Resource name string.
25752576
*/
2576-
projectConversationModelEvaluationsEvaluationPath(
2577+
projectConversationModelEvaluationPath(
25772578
project: string,
2578-
conversationModel: string
2579+
conversationModel: string,
2580+
evaluation: string
25792581
) {
2580-
return this.pathTemplates.projectConversationModelEvaluationsEvaluationPathTemplate.render(
2582+
return this.pathTemplates.projectConversationModelEvaluationPathTemplate.render(
25812583
{
25822584
project: project,
25832585
conversation_model: conversationModel,
2586+
evaluation: evaluation,
25842587
}
25852588
);
25862589
}
25872590

25882591
/**
2589-
* Parse the project from ProjectConversationModelEvaluationsEvaluation resource.
2592+
* Parse the project from ProjectConversationModelEvaluation resource.
25902593
*
2591-
* @param {string} projectConversationModelEvaluationsEvaluationName
2592-
* A fully-qualified path representing project_conversation_model_evaluations_evaluation resource.
2594+
* @param {string} projectConversationModelEvaluationName
2595+
* A fully-qualified path representing project_conversation_model_evaluation resource.
25932596
* @returns {string} A string representing the project.
25942597
*/
2595-
matchProjectFromProjectConversationModelEvaluationsEvaluationName(
2596-
projectConversationModelEvaluationsEvaluationName: string
2598+
matchProjectFromProjectConversationModelEvaluationName(
2599+
projectConversationModelEvaluationName: string
25972600
) {
2598-
return this.pathTemplates.projectConversationModelEvaluationsEvaluationPathTemplate.match(
2599-
projectConversationModelEvaluationsEvaluationName
2601+
return this.pathTemplates.projectConversationModelEvaluationPathTemplate.match(
2602+
projectConversationModelEvaluationName
26002603
).project;
26012604
}
26022605

26032606
/**
2604-
* Parse the conversation_model from ProjectConversationModelEvaluationsEvaluation resource.
2607+
* Parse the conversation_model from ProjectConversationModelEvaluation resource.
26052608
*
2606-
* @param {string} projectConversationModelEvaluationsEvaluationName
2607-
* A fully-qualified path representing project_conversation_model_evaluations_evaluation resource.
2609+
* @param {string} projectConversationModelEvaluationName
2610+
* A fully-qualified path representing project_conversation_model_evaluation resource.
26082611
* @returns {string} A string representing the conversation_model.
26092612
*/
2610-
matchConversationModelFromProjectConversationModelEvaluationsEvaluationName(
2611-
projectConversationModelEvaluationsEvaluationName: string
2613+
matchConversationModelFromProjectConversationModelEvaluationName(
2614+
projectConversationModelEvaluationName: string
26122615
) {
2613-
return this.pathTemplates.projectConversationModelEvaluationsEvaluationPathTemplate.match(
2614-
projectConversationModelEvaluationsEvaluationName
2616+
return this.pathTemplates.projectConversationModelEvaluationPathTemplate.match(
2617+
projectConversationModelEvaluationName
26152618
).conversation_model;
26162619
}
26172620

2621+
/**
2622+
* Parse the evaluation from ProjectConversationModelEvaluation resource.
2623+
*
2624+
* @param {string} projectConversationModelEvaluationName
2625+
* A fully-qualified path representing project_conversation_model_evaluation resource.
2626+
* @returns {string} A string representing the evaluation.
2627+
*/
2628+
matchEvaluationFromProjectConversationModelEvaluationName(
2629+
projectConversationModelEvaluationName: string
2630+
) {
2631+
return this.pathTemplates.projectConversationModelEvaluationPathTemplate.match(
2632+
projectConversationModelEvaluationName
2633+
).evaluation;
2634+
}
2635+
26182636
/**
26192637
* Return a fully-qualified projectConversationParticipant resource name string.
26202638
*
@@ -3878,72 +3896,90 @@ export class AgentsClient {
38783896
}
38793897

38803898
/**
3881-
* Return a fully-qualified projectLocationConversationModelEvaluationsEvaluation resource name string.
3899+
* Return a fully-qualified projectLocationConversationModelEvaluation resource name string.
38823900
*
38833901
* @param {string} project
38843902
* @param {string} location
38853903
* @param {string} conversation_model
3904+
* @param {string} evaluation
38863905
* @returns {string} Resource name string.
38873906
*/
3888-
projectLocationConversationModelEvaluationsEvaluationPath(
3907+
projectLocationConversationModelEvaluationPath(
38893908
project: string,
38903909
location: string,
3891-
conversationModel: string
3910+
conversationModel: string,
3911+
evaluation: string
38923912
) {
3893-
return this.pathTemplates.projectLocationConversationModelEvaluationsEvaluationPathTemplate.render(
3913+
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render(
38943914
{
38953915
project: project,
38963916
location: location,
38973917
conversation_model: conversationModel,
3918+
evaluation: evaluation,
38983919
}
38993920
);
39003921
}
39013922

39023923
/**
3903-
* Parse the project from ProjectLocationConversationModelEvaluationsEvaluation resource.
3924+
* Parse the project from ProjectLocationConversationModelEvaluation resource.
39043925
*
3905-
* @param {string} projectLocationConversationModelEvaluationsEvaluationName
3906-
* A fully-qualified path representing project_location_conversation_model_evaluations_evaluation resource.
3926+
* @param {string} projectLocationConversationModelEvaluationName
3927+
* A fully-qualified path representing project_location_conversation_model_evaluation resource.
39073928
* @returns {string} A string representing the project.
39083929
*/
3909-
matchProjectFromProjectLocationConversationModelEvaluationsEvaluationName(
3910-
projectLocationConversationModelEvaluationsEvaluationName: string
3930+
matchProjectFromProjectLocationConversationModelEvaluationName(
3931+
projectLocationConversationModelEvaluationName: string
39113932
) {
3912-
return this.pathTemplates.projectLocationConversationModelEvaluationsEvaluationPathTemplate.match(
3913-
projectLocationConversationModelEvaluationsEvaluationName
3933+
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match(
3934+
projectLocationConversationModelEvaluationName
39143935
).project;
39153936
}
39163937

39173938
/**
3918-
* Parse the location from ProjectLocationConversationModelEvaluationsEvaluation resource.
3939+
* Parse the location from ProjectLocationConversationModelEvaluation resource.
39193940
*
3920-
* @param {string} projectLocationConversationModelEvaluationsEvaluationName
3921-
* A fully-qualified path representing project_location_conversation_model_evaluations_evaluation resource.
3941+
* @param {string} projectLocationConversationModelEvaluationName
3942+
* A fully-qualified path representing project_location_conversation_model_evaluation resource.
39223943
* @returns {string} A string representing the location.
39233944
*/
3924-
matchLocationFromProjectLocationConversationModelEvaluationsEvaluationName(
3925-
projectLocationConversationModelEvaluationsEvaluationName: string
3945+
matchLocationFromProjectLocationConversationModelEvaluationName(
3946+
projectLocationConversationModelEvaluationName: string
39263947
) {
3927-
return this.pathTemplates.projectLocationConversationModelEvaluationsEvaluationPathTemplate.match(
3928-
projectLocationConversationModelEvaluationsEvaluationName
3948+
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match(
3949+
projectLocationConversationModelEvaluationName
39293950
).location;
39303951
}
39313952

39323953
/**
3933-
* Parse the conversation_model from ProjectLocationConversationModelEvaluationsEvaluation resource.
3954+
* Parse the conversation_model from ProjectLocationConversationModelEvaluation resource.
39343955
*
3935-
* @param {string} projectLocationConversationModelEvaluationsEvaluationName
3936-
* A fully-qualified path representing project_location_conversation_model_evaluations_evaluation resource.
3956+
* @param {string} projectLocationConversationModelEvaluationName
3957+
* A fully-qualified path representing project_location_conversation_model_evaluation resource.
39373958
* @returns {string} A string representing the conversation_model.
39383959
*/
3939-
matchConversationModelFromProjectLocationConversationModelEvaluationsEvaluationName(
3940-
projectLocationConversationModelEvaluationsEvaluationName: string
3960+
matchConversationModelFromProjectLocationConversationModelEvaluationName(
3961+
projectLocationConversationModelEvaluationName: string
39413962
) {
3942-
return this.pathTemplates.projectLocationConversationModelEvaluationsEvaluationPathTemplate.match(
3943-
projectLocationConversationModelEvaluationsEvaluationName
3963+
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match(
3964+
projectLocationConversationModelEvaluationName
39443965
).conversation_model;
39453966
}
39463967

3968+
/**
3969+
* Parse the evaluation from ProjectLocationConversationModelEvaluation resource.
3970+
*
3971+
* @param {string} projectLocationConversationModelEvaluationName
3972+
* A fully-qualified path representing project_location_conversation_model_evaluation resource.
3973+
* @returns {string} A string representing the evaluation.
3974+
*/
3975+
matchEvaluationFromProjectLocationConversationModelEvaluationName(
3976+
projectLocationConversationModelEvaluationName: string
3977+
) {
3978+
return this.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match(
3979+
projectLocationConversationModelEvaluationName
3980+
).evaluation;
3981+
}
3982+
39473983
/**
39483984
* Return a fully-qualified projectLocationConversationParticipant resource name string.
39493985
*

0 commit comments

Comments
 (0)