Add file-level `Session` resource definition
PiperOrigin-RevId: 293080182
This commit is contained in:
parent
f6a1a6b417
commit
69d9945330
|
|
@ -20,6 +20,7 @@ package google.cloud.dialogflow.v2;
|
|||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/cloud/dialogflow/v2/audio_config.proto";
|
||||
import "google/cloud/dialogflow/v2/context.proto";
|
||||
import "google/cloud/dialogflow/v2/intent.proto";
|
||||
|
|
@ -36,6 +37,11 @@ option java_multiple_files = true;
|
|||
option java_outer_classname = "SessionProto";
|
||||
option java_package = "com.google.cloud.dialogflow.v2";
|
||||
option objc_class_prefix = "DF";
|
||||
option (google.api.resource_definition) = {
|
||||
type: "dialogflow.googleapis.com/Session"
|
||||
pattern: "projects/{project}/locations/{location}/agent/sessions/{session}"
|
||||
pattern: "projects/{project}/agent/sessions/{session}"
|
||||
};
|
||||
|
||||
// A session represents an interaction with a user. You retrieve user input
|
||||
// and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
|
||||
|
|
@ -66,6 +72,8 @@ service Sessions {
|
|||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Requests and responses for custom methods.
|
||||
// The request to detect user's intent.
|
||||
message DetectIntentRequest {
|
||||
// Required. The name of the session this query is sent to. Format:
|
||||
|
|
@ -73,7 +81,12 @@ message DetectIntentRequest {
|
|||
// caller to choose an appropriate session ID. It can be a random number or
|
||||
// some type of user identifier (preferably hashed). The length of the session
|
||||
// ID must not exceed 36 bytes.
|
||||
string session = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
string session = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
type: "dialogflow.googleapis.com/Session"
|
||||
}
|
||||
];
|
||||
|
||||
// Optional. The parameters of this query.
|
||||
QueryParameters query_params = 2 [(google.api.field_behavior) = OPTIONAL];
|
||||
|
|
|
|||
Loading…
Reference in New Issue