Skip to content

Commit

Permalink
fix!: Remove resource_reference from UpdateAnswerRecord.
Browse files Browse the repository at this point in the history
Committer: @sheimi
PiperOrigin-RevId: 363947872
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 19, 2021
1 parent c80d148 commit 5da78db
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 45 deletions.
53 changes: 31 additions & 22 deletions google/cloud/dialogflow/v2/answer_record.proto
Expand Up @@ -33,7 +33,8 @@ option java_outer_classname = "AnswerRecordsProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";

// Service for managing [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord].
// Service for managing
// [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord].
service AnswerRecords {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
Expand All @@ -42,7 +43,8 @@ service AnswerRecords {

// Returns the list of all answer records in the specified project in reverse
// chronological order.
rpc ListAnswerRecords(ListAnswerRecordsRequest) returns (ListAnswerRecordsResponse) {
rpc ListAnswerRecords(ListAnswerRecordsRequest)
returns (ListAnswerRecordsResponse) {
option (google.api.http) = {
get: "/v2/{parent=projects/*}/answerRecords"
additional_bindings {
Expand Down Expand Up @@ -87,9 +89,11 @@ service AnswerRecords {
// A typical workflow for customers provide feedback to an answer is:
//
// 1. For human agent assistant, customers get suggestion via ListSuggestions
// API. Together with the answers, [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] are returned to the
// customers.
// 2. The customer uses the [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the
// API. Together with the answers,
// [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] are
// returned to the customers.
// 2. The customer uses the
// [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the
// [UpdateAnswerRecord][] method to send feedback about a specific answer
// that they believe is wrong.
message AnswerRecord {
Expand All @@ -105,18 +109,20 @@ message AnswerRecord {
string name = 1;

// Required. The AnswerFeedback for this record. You can set this with
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] in order to give us feedback about
// this answer.
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord]
// in order to give us feedback about this answer.
AnswerFeedback answer_feedback = 2 [(google.api.field_behavior) = REQUIRED];

// The record for this answer.
oneof record {
// Output only. The record for human agent assistant.
AgentAssistantRecord agent_assistant_record = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
AgentAssistantRecord agent_assistant_record = 4
[(google.api.field_behavior) = OUTPUT_ONLY];
}
}

// Request message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
// Request message for
// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
message ListAnswerRecordsRequest {
// Required. The project to list all answer records for in reverse
// chronological order. Format: `projects/<Project ID>/locations/<Location
Expand Down Expand Up @@ -148,7 +154,8 @@ message ListAnswerRecordsRequest {
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
// Response message for
// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
message ListAnswerRecordsResponse {
// The list of answer records.
repeated AnswerRecord answer_records = 1;
Expand All @@ -162,18 +169,15 @@ message ListAnswerRecordsResponse {
string next_page_token = 2;
}

// Request message for [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord].
// Request message for
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord].
message UpdateAnswerRecordRequest {
// Required. Answer record to update.
AnswerRecord answer_record = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/AnswerRecord"
}
];
AnswerRecord answer_record = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The mask to control which fields get updated.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
google.protobuf.FieldMask update_mask = 2
[(google.api.field_behavior) = REQUIRED];
}

// Represents feedback the customer has about the quality & correctness of a
Expand Down Expand Up @@ -275,21 +279,26 @@ message AgentAssistantFeedback {
// days of the purchase date."
// * Ground truth: "No return or exchange is allowed."
// * [document_correctness]: INCORRECT
DocumentCorrectness document_correctness = 2 [(google.api.field_behavior) = OPTIONAL];
DocumentCorrectness document_correctness = 2
[(google.api.field_behavior) = OPTIONAL];

// Optional. Whether or not the suggested document is efficient. For example,
// if the document is poorly written, hard to understand, hard to use or
// too long to find useful information, [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] is
// too long to find useful information,
// [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency]
// is
// [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT].
DocumentEfficiency document_efficiency = 3 [(google.api.field_behavior) = OPTIONAL];
DocumentEfficiency document_efficiency = 3
[(google.api.field_behavior) = OPTIONAL];
}

// Represents a record of a human agent assist answer.
message AgentAssistantRecord {
// Output only. The agent assist answer.
oneof answer {
// Output only. The article suggestion answer.
ArticleAnswer article_suggestion_answer = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
ArticleAnswer article_suggestion_answer = 5
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The FAQ answer.
FaqAnswer faq_answer = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
Expand Down
54 changes: 31 additions & 23 deletions google/cloud/dialogflow/v2beta1/answer_record.proto
Expand Up @@ -33,7 +33,8 @@ option java_outer_classname = "AnswerRecordsProto";
option java_package = "com.google.cloud.dialogflow.v2beta1";
option objc_class_prefix = "DF";

// Service for managing [AnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecord].
// Service for managing
// [AnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecord].
service AnswerRecords {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
Expand All @@ -54,7 +55,8 @@ service AnswerRecords {

// Returns the list of all answer records in the specified project in reverse
// chronological order.
rpc ListAnswerRecords(ListAnswerRecordsRequest) returns (ListAnswerRecordsResponse) {
rpc ListAnswerRecords(ListAnswerRecordsRequest)
returns (ListAnswerRecordsResponse) {
option (google.api.http) = {
get: "/v2beta1/{parent=projects/*}/answerRecords"
additional_bindings {
Expand Down Expand Up @@ -99,9 +101,12 @@ service AnswerRecords {
// A typical workflow for customers provide feedback to an answer is:
//
// 1. For human agent assistant, customers get suggestion via ListSuggestions
// API. Together with the answers, [AnswerRecord.name][google.cloud.dialogflow.v2beta1.AnswerRecord.name] are returned to the
// customers.
// 2. The customer uses the [AnswerRecord.name][google.cloud.dialogflow.v2beta1.AnswerRecord.name] to call the
// API. Together with the answers,
// [AnswerRecord.name][google.cloud.dialogflow.v2beta1.AnswerRecord.name] are
// returned to the customers.
// 2. The customer uses the
// [AnswerRecord.name][google.cloud.dialogflow.v2beta1.AnswerRecord.name] to
// call the
// [UpdateAnswerRecord][] method to send feedback about a specific answer
// that they believe is wrong.
message AnswerRecord {
Expand All @@ -112,14 +117,15 @@ message AnswerRecord {
};

// The unique identifier of this answer record.
// Required for [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord] method.
// Format: `projects/<Project ID>/locations/<Location
// Required for
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord]
// method. Format: `projects/<Project ID>/locations/<Location
// ID>/answerRecords/<Answer Record ID>`.
string name = 1;

// Optional. The AnswerFeedback for this record. You can set this with
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord] in order to give us feedback about
// this answer.
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord]
// in order to give us feedback about this answer.
AnswerFeedback answer_feedback = 3;

// Output only. The record for this answer.
Expand All @@ -134,7 +140,8 @@ message AgentAssistantRecord {
// Output only. The agent assistant answer.
oneof answer {
// Output only. The article suggestion answer.
ArticleAnswer article_suggestion_answer = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
ArticleAnswer article_suggestion_answer = 5
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The FAQ answer.
FaqAnswer faq_answer = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
Expand Down Expand Up @@ -256,30 +263,34 @@ message AgentAssistantFeedback {

// Optional. Whether or not the suggested document is efficient. For example,
// if the document is poorly written, hard to understand, hard to use or
// too long to find useful information, [document_efficiency][google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.document_efficiency] is
// too long to find useful information,
// [document_efficiency][google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.document_efficiency]
// is
// [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT].
DocumentEfficiency document_efficiency = 3;

// Feedback for conversation summarization.
SummarizationFeedback summarization_feedback = 4;
}

// Request message for [AnswerRecords.GetAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecord].
// Request message for
// [AnswerRecords.GetAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecord].
message GetAnswerRecordRequest {
// Required. The name of the answer record to retrieve.
// Format: `projects/<Project ID>/locations/<Location
// ID>/answerRecords/<Answer Record Id>`.
string name = 1;
}

// Request message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecords].
// Request message for
// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecords].
message ListAnswerRecordsRequest {
// Required. The project to list all answer records for in reverse
// chronological order. Format: `projects/<Project ID>/locations/<Location
// ID>`.
string parent = 1 [(google.api.resource_reference) = {
child_type: "dialogflow.googleapis.com/AnswerRecord"
}];
child_type: "dialogflow.googleapis.com/AnswerRecord"
}];

// Optional. The maximum number of records to return in a single page.
// The server may return fewer records than this. If unspecified, we use 10.
Expand All @@ -293,7 +304,8 @@ message ListAnswerRecordsRequest {
string page_token = 4;
}

// Response message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecords].
// Response message for
// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecords].
message ListAnswerRecordsResponse {
// The list of answer records.
repeated AnswerRecord answer_records = 1;
Expand All @@ -307,15 +319,11 @@ message ListAnswerRecordsResponse {
string next_page_token = 2;
}

// Request message for [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord].
// Request message for
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord].
message UpdateAnswerRecordRequest {
// Required. Answer record to update.
AnswerRecord answer_record = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/AnswerRecord"
}
];
AnswerRecord answer_record = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The mask to control which fields get updated.
google.protobuf.FieldMask update_mask = 2;
Expand Down

0 comments on commit 5da78db

Please sign in to comment.