Dialogflow weekly v2/v2beta1 library update:

- updates to mega agent api
  - adding field mask override control for output audio config
Important updates are also posted at:
https://cloud.google.com/dialogflow/docs/release-notes

PiperOrigin-RevId: 297187629
This commit is contained in:
Google APIs 2020-02-25 13:21:44 -08:00 committed by Copybara-Service
parent 0b1876b35e
commit 80b2d25f8d
12 changed files with 71 additions and 47 deletions

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
@ -323,6 +322,18 @@ message DeleteAgentRequest {
string parent = 1;
}
// Contains basic configuration for a sub-agent.
message SubAgent {
// Required. The project of this agent.
// Format: `projects/<Project ID>`.
string project = 1;
// Optional. The unique identifier (`environment name` in dialogflow console)
// of this sub-agent environment. Assumes draft environment if `environment`
// is not set.
string environment = 2;
}
// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents].
message SearchAgentsRequest {
// Required. The project to list agents from.
@ -420,12 +431,12 @@ message RestoreAgentRequest {
message GetValidationResultRequest {
// Required. The project that the agent is associated with.
// Format: `projects/<Project ID>`.
string parent = 1;
string parent = 1 [(google.api.field_behavior) = REQUIRED];
// Optional. The language for which you want a validation result. If not
// specified, the agent's default language is used. [Many
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
// are supported. Note: languages must be enabled in the agent before they can
// be used.
string language_code = 3;
string language_code = 3 [(google.api.field_behavior) = OPTIONAL];
}

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
@ -20,6 +19,7 @@ package google.cloud.dialogflow.v2beta1;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/field_mask.proto";
import "google/api/annotations.proto";
option cc_enable_arenas = true;
@ -339,15 +339,15 @@ enum OutputAudioEncoding {
// text-to-speech settings applied to the agent.
message OutputAudioConfig {
// Required. Audio encoding of the synthesized audio content.
OutputAudioEncoding audio_encoding = 1;
OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED];
// Optional. The synthesis sample rate (in hertz) for this audio. If not
// The synthesis sample rate (in hertz) for this audio. If not
// provided, then the synthesizer will use the default sample rate based on
// the audio encoding. If this is different from the voice's natural sample
// rate, then the synthesizer will honor this request by converting to the
// desired sample rate (which might result in worse audio quality).
int32 sample_rate_hertz = 2;
// Optional. Configuration of how speech should be synthesized.
// Configuration of how speech should be synthesized.
SynthesizeSpeechConfig synthesize_speech_config = 3;
}

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
@ -26,6 +25,7 @@ import "google/cloud/dialogflow/v2beta1/context.proto";
import "google/cloud/dialogflow/v2beta1/intent.proto";
import "google/cloud/dialogflow/v2beta1/session_entity_type.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
import "google/rpc/status.proto";
import "google/type/latlng.proto";
@ -101,7 +101,7 @@ message DetectIntentRequest {
type: "dialogflow.googleapis.com/Session"
}];
// Optional. The parameters of this query.
// The parameters of this query.
QueryParameters query_params = 2;
// Required. The input specification. It can be set to:
@ -114,12 +114,20 @@ message DetectIntentRequest {
// 3. an event that specifies which intent to trigger.
QueryInput query_input = 3;
// Optional. Instructs the speech synthesizer how to generate the output
// Instructs the speech synthesizer how to generate the output
// audio. If this field is not set and agent-level speech synthesizer is not
// configured, no output audio is generated.
OutputAudioConfig output_audio_config = 4;
// Optional. The natural language speech audio to be processed. This field
// Mask for [output_audio_config][google.cloud.dialogflow.v2beta1.DetectIntentRequest.output_audio_config] indicating which settings in this
// request-level config should override speech synthesizer settings defined at
// agent-level.
//
// If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2beta1.DetectIntentRequest.output_audio_config] replaces the agent-level
// config in its entirety.
google.protobuf.FieldMask output_audio_config_mask = 7;
// The natural language speech audio to be processed. This field
// should be populated iff `query_input` is set to an input audio config.
// A single request can contain up to 1 minute of speech audio data.
bytes input_audio = 5;
@ -162,44 +170,50 @@ message DetectIntentResponse {
// Represents the parameters of the conversational query.
message QueryParameters {
// Optional. The time zone of this conversational query from the
// The time zone of this conversational query from the
// [time zone database](https://www.iana.org/time-zones), e.g.,
// America/New_York, Europe/Paris. If not provided, the time zone specified in
// agent settings is used.
string time_zone = 1;
// Optional. The geo location of this conversational query.
// The geo location of this conversational query.
google.type.LatLng geo_location = 2;
// Optional. The collection of contexts to be activated before this query is
// The collection of contexts to be activated before this query is
// executed.
repeated Context contexts = 3;
// Optional. Specifies whether to delete all contexts in the current session
// Specifies whether to delete all contexts in the current session
// before the new ones are activated.
bool reset_contexts = 4;
// Optional. Additional session entity types to replace or extend developer
// Additional session entity types to replace or extend developer
// entity types with. The entity synonyms apply to all languages and persist
// for the session of this query.
repeated SessionEntityType session_entity_types = 5;
// Optional. This field can be used to pass custom data into the webhook
// This field can be used to pass custom data into the webhook
// associated with the agent. Arbitrary JSON objects are supported.
google.protobuf.Struct payload = 6;
// Optional. KnowledgeBases to get alternative results from. If not set, the
// KnowledgeBases to get alternative results from. If not set, the
// KnowledgeBases enabled in the agent (through UI) will be used.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
repeated string knowledge_base_names = 12;
// Optional. Configures the type of sentiment analysis to perform. If not
// Configures the type of sentiment analysis to perform. If not
// provided, sentiment analysis is not performed.
// Note: Sentiment Analysis is only currently available for Enterprise Edition
// agents.
SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10;
// Optional. This field can be used to pass HTTP headers for a webhook
// For mega agent query, directly specify which sub agents to query.
// If any specified sub agent is not linked to the mega agent, an error will
// be returned. If empty, Dialogflow will decide which sub agents to query.
// If specified for a non-mega-agent query, will be silently ignored.
repeated SubAgent sub_agents = 13;
// This field can be used to pass HTTP headers for a webhook
// call. These headers will be sent to webhook alone with the headers that
// have been configured through Dialogflow web console. The headers defined
// within this field will overwrite the headers configured through Dialogflow
@ -431,7 +445,7 @@ message StreamingDetectIntentRequest {
// `User ID` must not exceed 36 characters.
string session = 1;
// Optional. The parameters of this query.
// The parameters of this query.
QueryParameters query_params = 2;
// Required. The input specification. It can be set to:
@ -445,7 +459,7 @@ message StreamingDetectIntentRequest {
QueryInput query_input = 3;
// DEPRECATED. Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2beta1.InputAudioConfig.single_utterance] instead.
// Optional. If `false` (default), recognition does not cease until the
// If `false` (default), recognition does not cease until the
// client closes the stream.
// If `true`, the recognizer will detect a single spoken utterance in input
// audio. Recognition ceases when it detects the audio's voice has
@ -455,12 +469,20 @@ message StreamingDetectIntentRequest {
// This setting is ignored when `query_input` is a piece of text or an event.
bool single_utterance = 4;
// Optional. Instructs the speech synthesizer how to generate the output
// Instructs the speech synthesizer how to generate the output
// audio. If this field is not set and agent-level speech synthesizer is not
// configured, no output audio is generated.
OutputAudioConfig output_audio_config = 5;
// Optional. The input audio content to be recognized. Must be sent if
// Mask for [output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this
// request-level config should override speech synthesizer settings defined at
// agent-level.
//
// If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level
// config in its entirety.
google.protobuf.FieldMask output_audio_config_mask = 7;
// The input audio content to be recognized. Must be sent if
// `query_input` was set to a streaming input audio config. The complete audio
// over all streaming messages must not exceed 1 minute.
bytes input_audio = 6;
@ -635,7 +657,7 @@ message EventInput {
// Required. The unique identifier of the event.
string name = 1;
// Optional. The collection of parameters associated with the event.
// The collection of parameters associated with the event.
google.protobuf.Struct parameters = 2;
// Required. The language of this query. See [Language
@ -647,7 +669,7 @@ message EventInput {
// Configures the types of sentiment analysis to perform.
message SentimentAnalysisRequestConfig {
// Optional. Instructs the service to perform sentiment analysis on
// Instructs the service to perform sentiment analysis on
// `query_text`. If not provided, sentiment analysis is not performed on
// `query_text`.
bool analyze_query_text_sentiment = 1;

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";

View File

@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";