Skip to content

Commit

Permalink
build: adds resource.proto
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored Feb 5, 2020
1 parent 84aa666 commit adf7466
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 582 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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
Expand Down Expand Up @@ -66,14 +72,21 @@ 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:
// `projects/<Project ID>/agent/sessions/<Session ID>`. It's up to the API
// 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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ option java_multiple_files = true;
option java_outer_classname = "SessionProto";
option java_package = "com.google.cloud.dialogflow.v2beta1";
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.v2beta1.Sessions.DetectIntent] (or
Expand Down Expand Up @@ -79,6 +84,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:
Expand Down
11 changes: 8 additions & 3 deletions packages/google-cloud-dialogflow/protos/protos.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"java_multiple_files": true,
"java_outer_classname": "SessionProto",
"java_package": "com.google.cloud.dialogflow.v2",
"objc_class_prefix": "DF"
"objc_class_prefix": "DF",
"(google.api.resource_definition).type": "dialogflow.googleapis.com/Session",
"(google.api.resource_definition).pattern": "projects/{project}/agent/sessions/{session}"
},
"nested": {
"Agents": {
Expand Down Expand Up @@ -2778,7 +2780,8 @@
"type": "string",
"id": 1,
"options": {
"(google.api.field_behavior)": "REQUIRED"
"(google.api.field_behavior)": "REQUIRED",
"(google.api.resource_reference).type": "dialogflow.googleapis.com/Session"
}
},
"queryParams": {
Expand Down Expand Up @@ -3178,7 +3181,9 @@
"java_multiple_files": true,
"java_outer_classname": "SessionProto",
"java_package": "com.google.cloud.dialogflow.v2beta1",
"objc_class_prefix": "DF"
"objc_class_prefix": "DF",
"(google.api.resource_definition).type": "dialogflow.googleapis.com/Session",
"(google.api.resource_definition).pattern": "projects/{project}/agent/sessions/{session}"
},
"nested": {
"Agents": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
// to be loaded as the JS file.

/**
* ============================================================================
* Requests and responses for custom methods.
* The request to detect user's intent.
*
* @property {string} session
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
// to be loaded as the JS file.

/**
* ============================================================================
* Requests and responses for custom methods.
* The request to detect user's intent.
*
* @property {string} session
Expand Down
Loading

0 comments on commit adf7466

Please sign in to comment.