Skip to content

Commit

Permalink
docs: Reformat some comments and documentation
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 504029060
  • Loading branch information
Google APIs authored and Copybara-Service committed Jan 23, 2023
1 parent 281dcfc commit 4d9606e
Show file tree
Hide file tree
Showing 18 changed files with 839 additions and 496 deletions.
56 changes: 36 additions & 20 deletions google/cloud/dialogflow/v2beta1/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ service Agents {
//
// - `metadata`: An empty [Struct
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
// - `response`: [ExportAgentResponse][google.cloud.dialogflow.v2beta1.ExportAgentResponse]
// - `response`:
// [ExportAgentResponse][google.cloud.dialogflow.v2beta1.ExportAgentResponse]
rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*}/agent:export"
Expand All @@ -154,11 +155,13 @@ service Agents {
//
// Uploads new intents and entity types without deleting the existing ones.
// Intents and entity types with the same name are replaced with the new
// versions from [ImportAgentRequest][google.cloud.dialogflow.v2beta1.ImportAgentRequest]. After the import, the imported draft
// agent will be trained automatically (unless disabled in agent settings).
// However, once the import is done, training may not be completed yet. Please
// call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it returns in order to train
// explicitly.
// versions from
// [ImportAgentRequest][google.cloud.dialogflow.v2beta1.ImportAgentRequest].
// After the import, the imported draft agent will be trained automatically
// (unless disabled in agent settings). However, once the import is done,
// training may not be completed yet. Please call
// [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait
// for the operation it returns in order to train explicitly.
//
// This method is a [long-running
// operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
Expand Down Expand Up @@ -196,8 +199,9 @@ service Agents {
// entity types in the older version are deleted. After the restore, the
// restored draft agent will be trained automatically (unless disabled in
// agent settings). However, once the restore is done, training may not be
// completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it
// returns in order to train explicitly.
// completed yet. Please call
// [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait
// for the operation it returns in order to train explicitly.
//
// This method is a [long-running
// operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
Expand Down Expand Up @@ -231,7 +235,8 @@ service Agents {

// Gets agent validation result. Agent validation is performed during
// training time and is updated automatically when training is completed.
rpc GetValidationResult(GetValidationResultRequest) returns (ValidationResult) {
rpc GetValidationResult(GetValidationResultRequest)
returns (ValidationResult) {
option (google.api.http) = {
get: "/v2beta1/{parent=projects/*}/agent/validationResult"
additional_bindings {
Expand Down Expand Up @@ -368,7 +373,8 @@ message Agent {
Tier tier = 15;
}

// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2beta1.Agents.GetAgent].
// The request message for
// [Agents.GetAgent][google.cloud.dialogflow.v2beta1.Agents.GetAgent].
message GetAgentRequest {
// Required. The project that the agent to fetch is associated with.
// Format: `projects/<Project ID>` or
Expand All @@ -381,7 +387,8 @@ message GetAgentRequest {
];
}

// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2beta1.Agents.SetAgent].
// The request message for
// [Agents.SetAgent][google.cloud.dialogflow.v2beta1.Agents.SetAgent].
message SetAgentRequest {
// Required. The agent to update.
Agent agent = 1 [(google.api.field_behavior) = REQUIRED];
Expand All @@ -390,7 +397,8 @@ message SetAgentRequest {
google.protobuf.FieldMask update_mask = 2;
}

// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2beta1.Agents.DeleteAgent].
// The request message for
// [Agents.DeleteAgent][google.cloud.dialogflow.v2beta1.Agents.DeleteAgent].
message DeleteAgentRequest {
// Required. The project that the agent to delete is associated with.
// Format: `projects/<Project ID>` or
Expand All @@ -416,7 +424,8 @@ message SubAgent {
string environment = 2;
}

// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents].
// The request message for
// [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents].
message SearchAgentsRequest {
// Required. The project to list agents from.
// Format: `projects/<Project ID or '-'>` or
Expand All @@ -436,7 +445,8 @@ message SearchAgentsRequest {
string page_token = 3;
}

// The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents].
// The response message for
// [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents].
message SearchAgentsResponse {
// The list of agents. There will be a maximum number of items returned based
// on the page_size field in the request.
Expand All @@ -447,7 +457,8 @@ message SearchAgentsResponse {
string next_page_token = 2;
}

// The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent].
// The request message for
// [Agents.TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent].
message TrainAgentRequest {
// Required. The project that the agent to train is associated with.
// Format: `projects/<Project ID>` or
Expand All @@ -460,7 +471,8 @@ message TrainAgentRequest {
];
}

// The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent].
// The request message for
// [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent].
message ExportAgentRequest {
// Required. The project that the agent to export is associated with.
// Format: `projects/<Project ID>` or
Expand All @@ -486,7 +498,8 @@ message ExportAgentRequest {
string agent_uri = 2;
}

// The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent].
// The response message for
// [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent].
message ExportAgentResponse {
// The exported agent.
oneof agent {
Expand All @@ -499,7 +512,8 @@ message ExportAgentResponse {
}
}

// The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent].
// The request message for
// [Agents.ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent].
message ImportAgentRequest {
// Required. The project that the agent to import is associated with.
// Format: `projects/<Project ID>` or
Expand Down Expand Up @@ -528,7 +542,8 @@ message ImportAgentRequest {
}
}

// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2beta1.Agents.RestoreAgent].
// The request message for
// [Agents.RestoreAgent][google.cloud.dialogflow.v2beta1.Agents.RestoreAgent].
message RestoreAgentRequest {
// Required. The project that the agent to restore is associated with.
// Format: `projects/<Project ID>` or
Expand Down Expand Up @@ -557,7 +572,8 @@ message RestoreAgentRequest {
}
}

// The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2beta1.Agents.GetValidationResult].
// The request message for
// [Agents.GetValidationResult][google.cloud.dialogflow.v2beta1.Agents.GetValidationResult].
message GetValidationResultRequest {
// Required. The project that the agent is associated with.
// Format: `projects/<Project ID>` or
Expand Down
52 changes: 31 additions & 21 deletions google/cloud/dialogflow/v2beta1/answer_record.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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 @@ -53,7 +54,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 @@ -98,9 +100,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 @@ -111,14 +116,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 @@ -133,7 +139,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 @@ -255,39 +262,40 @@ 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. Filters to restrict results to specific answer records.
//
// For more information about filtering, see
// [API Filtering](https://aip.dev/160).
string filter = 2 [
deprecated = true,
(google.api.field_behavior) = OPTIONAL
];
string filter = 2 [deprecated = true, (google.api.field_behavior) = OPTIONAL];

// 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 @@ -301,7 +309,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 @@ -315,7 +324,8 @@ 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];
Expand Down
4 changes: 4 additions & 0 deletions google/cloud/dialogflow/v2beta1/audio_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ option (google.api.resource_definition) = {
type: "automl.googleapis.com/Model"
pattern: "projects/{project}/locations/{location}/models/{model}"
};
option (google.api.resource_definition) = {
type: "speech.googleapis.com/PhraseSet"
pattern: "projects/{project}/locations/{location}/phraseSets/{phrase_set}"
};

// Audio encoding of the audio content sent in the conversational query request.
// Refer to the
Expand Down
30 changes: 20 additions & 10 deletions google/cloud/dialogflow/v2beta1/context.proto
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ service Contexts {
}

// Deletes all active contexts in the specified session.
rpc DeleteAllContexts(DeleteAllContextsRequest) returns (google.protobuf.Empty) {
rpc DeleteAllContexts(DeleteAllContextsRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts"
additional_bindings {
Expand Down Expand Up @@ -227,7 +228,8 @@ message Context {
google.protobuf.Struct parameters = 3;
}

// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts].
// The request message for
// [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts].
message ListContextsRequest {
// Required. The session to list all contexts from. Supported formats:
// - `projects/<Project ID>/agent/sessions/<Session ID>,
Expand Down Expand Up @@ -257,7 +259,8 @@ message ListContextsRequest {
string page_token = 3;
}

// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts].
// The response message for
// [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts].
message ListContextsResponse {
// The list of contexts. There will be a maximum number of items
// returned based on the page_size field in the request.
Expand All @@ -268,7 +271,8 @@ message ListContextsResponse {
string next_page_token = 2;
}

// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2beta1.Contexts.GetContext].
// The request message for
// [Contexts.GetContext][google.cloud.dialogflow.v2beta1.Contexts.GetContext].
message GetContextRequest {
// Required. The name of the context. Supported formats:
// - `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
Expand All @@ -292,7 +296,8 @@ message GetContextRequest {
];
}

// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2beta1.Contexts.CreateContext].
// The request message for
// [Contexts.CreateContext][google.cloud.dialogflow.v2beta1.Contexts.CreateContext].
message CreateContextRequest {
// Required. The session to create a context for. Supported formats:
// - `projects/<Project ID>/agent/sessions/<Session ID>,
Expand All @@ -318,16 +323,19 @@ message CreateContextRequest {
Context context = 2 [(google.api.field_behavior) = REQUIRED];
}

// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext].
// The request message for
// [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext].
message UpdateContextRequest {
// Required. The context to update.
Context context = 1 [(google.api.field_behavior) = REQUIRED];

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

// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2beta1.Contexts.DeleteContext].
// The request message for
// [Contexts.DeleteContext][google.cloud.dialogflow.v2beta1.Contexts.DeleteContext].
message DeleteContextRequest {
// Required. The name of the context to delete. Supported formats:
// - `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context
Expand All @@ -351,9 +359,11 @@ message DeleteContextRequest {
];
}

// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts].
// The request message for
// [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts].
message DeleteAllContextsRequest {
// Required. The name of the session to delete all contexts from. Supported formats:
// Required. The name of the session to delete all contexts from. Supported
// formats:
// - `projects/<Project ID>/agent/sessions/<Session ID>,
// - `projects/<Project ID>/locations/<Location ID>/agent/sessions/<Session
// ID>`,
Expand Down

0 comments on commit 4d9606e

Please sign in to comment.