Skip to content

Commit

Permalink
fix: fix validation result docs
Browse files Browse the repository at this point in the history
feat: add language code to streaming recognition result
feat: add time zone and security settings to conversation profile
docs: update agent docs
docs: update entity type docs
docs: update intent docs

PiperOrigin-RevId: 388737553
  • Loading branch information
Google APIs authored and Copybara-Service committed Aug 4, 2021
1 parent 8dfb215 commit 09e5b17
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 21 deletions.
26 changes: 13 additions & 13 deletions google/cloud/dialogflow/v2beta1/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ service Agents {
}

// Creates/updates the specified agent.
//
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc SetAgent(SetAgentRequest) returns (Agent) {
option (google.api.http) = {
post: "/v2beta1/{agent.parent=projects/*}/agent"
Expand Down Expand Up @@ -94,8 +98,9 @@ service Agents {

// Trains the specified agent.
//
//
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*}/agent:train"
Expand All @@ -113,9 +118,6 @@ service Agents {
}

// Exports the specified agent to a ZIP file.
//
//
// Operation <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 @@ -142,10 +144,9 @@ service Agents {
// call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it returns in order to train
// explicitly.
//
//
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
// An operation which tracks when importing is complete. It only tracks
// when the draft agent is updated not when it is done training.
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*}/agent:import"
Expand All @@ -170,10 +171,9 @@ service Agents {
// completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it
// returns in order to train explicitly.
//
//
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
// An operation which tracks when restoring is complete. It only tracks
// when the draft agent is updated not when it is done training.
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*}/agent:restore"
Expand Down
14 changes: 14 additions & 0 deletions google/cloud/dialogflow/v2beta1/conversation_profile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,21 @@ message ConversationProfile {
// Language code for the conversation profile. If not specified, the language
// is en-US. Language at ConversationProfile should be set for all non en-us
// languages.
// This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
// language tag. Example: "en-US".
string language_code = 10;

// The time zone of this conversational profile from the
// [time zone database](https://www.iana.org/time-zones), e.g.,
// America/New_York, Europe/Paris. Defaults to America/New_York.
string time_zone = 14;

// Name of the CX SecuritySettings reference for the agent.
// Format: `projects/<Project ID>/locations/<Location
// ID>/securitySettings/<Security Settings ID>`.
string security_settings = 13 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/CXSecuritySettings"
}];
}

// Defines the Automated Agent to connect to a conversation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@
{
"service": "google.cloud.dialogflow.v2beta1.AgentModeling",
"method": "CreateConversationGraph"
},
{
"service": "google.cloud.dialogflow.v2beta1.SessionHistory",
"method": "SearchSessionConversations"
}
],
"timeout": "180s",
Expand Down
34 changes: 29 additions & 5 deletions google/cloud/dialogflow/v2beta1/entity_type.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ service EntityTypes {
}

// Creates an entity type in the specified agent.
//
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc CreateEntityType(CreateEntityTypeRequest) returns (EntityType) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*/agent}/entityTypes"
Expand All @@ -78,6 +82,10 @@ service EntityTypes {
}

// Updates the specified entity type.
//
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) {
option (google.api.http) = {
patch: "/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}"
Expand All @@ -93,6 +101,10 @@ service EntityTypes {
}

// Deletes the specified entity type.
//
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v2beta1/{name=projects/*/agent/entityTypes/*}"
Expand All @@ -104,7 +116,10 @@ service EntityTypes {
}

// Updates/Creates multiple entity types in the specified agent.
// Operation <response: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse]>
//
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate"
Expand All @@ -121,7 +136,10 @@ service EntityTypes {
}

// Deletes entity types in the specified agent.
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
//
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete"
Expand All @@ -140,7 +158,9 @@ service EntityTypes {

// Creates multiple new entities in the specified entity type.
//
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate"
Expand All @@ -162,7 +182,9 @@ service EntityTypes {
// method does not affect entities in the entity type that aren't explicitly
// specified in the request.
//
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate"
Expand All @@ -182,7 +204,9 @@ service EntityTypes {

// Deletes entities in the specified entity type.
//
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete"
Expand Down
7 changes: 6 additions & 1 deletion google/cloud/dialogflow/v2beta1/environment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ message Environment {
// - `projects/<Project ID>/agent/versions/<Version ID>`
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
// ID>`
string agent_version = 3 [(google.api.field_behavior) = OPTIONAL];
string agent_version = 3 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Version"
}
];

// Output only. The state of this environment. This field is read-only, i.e., it cannot be
// set by create and update methods.
Expand Down
20 changes: 18 additions & 2 deletions google/cloud/dialogflow/v2beta1/intent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ service Intents {
}

// Creates an intent in the specified agent.
//
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc CreateIntent(CreateIntentRequest) returns (Intent) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*/agent}/intents"
Expand All @@ -88,6 +92,10 @@ service Intents {
}

// Updates the specified intent.
//
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc UpdateIntent(UpdateIntentRequest) returns (Intent) {
option (google.api.http) = {
patch: "/v2beta1/{intent.name=projects/*/agent/intents/*}"
Expand All @@ -104,6 +112,10 @@ service Intents {
}

// Deletes the specified intent and its direct or indirect followup intents.
//
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v2beta1/{name=projects/*/agent/intents/*}"
Expand All @@ -116,7 +128,9 @@ service Intents {

// Updates/Creates multiple intents in the specified agent.
//
// Operation <response: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse]>
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc BatchUpdateIntents(BatchUpdateIntentsRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*/agent}/intents:batchUpdate"
Expand All @@ -136,7 +150,9 @@ service Intents {

// Deletes intents in the specified agent.
//
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
// Note: You should always train an agent prior to sending it queries. See the
// [training
// documentation](https://cloud.google.com/dialogflow/es/docs/training).
rpc BatchDeleteIntents(BatchDeleteIntentsRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta1/{parent=projects/*/agent}/intents:batchDelete"
Expand Down
3 changes: 3 additions & 0 deletions google/cloud/dialogflow/v2beta1/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,9 @@ message StreamingRecognitionResult {
// beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`.
google.protobuf.Duration speech_end_offset = 8;

// Detected language code for the transcript.
string language_code = 10;

// DTMF digits. Populated if and only if `message_type` = `DTMF_DIGITS`.
TelephonyDtmfEvents dtmf_digits = 5;
}
Expand Down

0 comments on commit 09e5b17

Please sign in to comment.