Skip to content

Commit

Permalink
Synchronize new proto/yaml changes.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 253023065
  • Loading branch information
Google APIs authored and copybara-github committed Jun 13, 2019
1 parent 78dc641 commit ad63761
Show file tree
Hide file tree
Showing 9 changed files with 244 additions and 72 deletions.
86 changes: 81 additions & 5 deletions google/cloud/dialogflow/v2beta1/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
import "google/api/client.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
Expand All @@ -44,29 +45,49 @@ option objc_class_prefix = "DF";
// You can create an agent using both Dialogflow Standard Edition and
// Dialogflow Enterprise Edition. For details, see
// [Dialogflow
// Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
// Editions](https://cloud.google.com/dialogflow/docs/editions).
//
// You can save your agent for backup or versioning by exporting the agent by
// using the [ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent] method. You can import a saved
// agent by using the [ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent] method.
//
// Dialogflow provides several
// [prebuilt
// agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-prebuilt)
// agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt)
// for common conversation scenarios such as determining a date and time,
// converting currency, and so on.
//
// For more information about agents, see the
// [Dialogflow
// documentation](https://cloud.google.com/dialogflow-enterprise/docs/agents-overview).
// documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
service Agents {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/dialogflow";

// Retrieves the specified agent.
rpc GetAgent(GetAgentRequest) returns (Agent) {
option (google.api.http) = {
get: "/v2beta1/{parent=projects/*}/agent"
};
}

// Creates/updates the specified agent.
rpc SetAgent(SetAgentRequest) returns (Agent) {
option (google.api.http) = {
post: "/v2beta1/{agent.parent=projects/*}/agent"
body: "agent"
};
}

// Deletes the specified agent.
rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v2beta1/{parent=projects/*}/agent"
};
}

// Returns the list of agents.
//
// Since there is at most one conversational agent per project, this method is
Expand Down Expand Up @@ -148,6 +169,36 @@ message Agent {
MATCH_MODE_ML_ONLY = 2;
}

// API version for the agent.
enum ApiVersion {
// Not specified.
API_VERSION_UNSPECIFIED = 0;

// Legacy V1 API.
API_VERSION_V1 = 1;

// V2 API.
API_VERSION_V2 = 2;

// V2beta1 API.
API_VERSION_V2_BETA_1 = 3;
}

// Represents the agent tier.
enum Tier {
// Not specified. This value should never be used.
TIER_UNSPECIFIED = 0;

// Standard tier.
TIER_STANDARD = 1;

// Enterprise tier (Essentials).
TIER_ENTERPRISE = 2;

// Enterprise tier (Plus).
TIER_ENTERPRISE_PLUS = 3;
}

// Required. The project of this agent.
// Format: `projects/<Project ID>`.
string parent = 1;
Expand All @@ -157,7 +208,7 @@ message Agent {

// Required. The default language of the agent as a language tag. See
// [Language
// Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
// Support](https://cloud.google.com/dialogflow/docs/reference/language)
// for a list of the currently supported language codes. This field cannot be
// set by the `Update` method.
string default_language_code = 3;
Expand All @@ -178,7 +229,7 @@ message Agent {
// Optional. The URI of the agent's avatar.
// Avatars are used throughout the Dialogflow console and in the self-hosted
// [Web
// Demo](https://cloud.google.com/dialogflow-enterprise/docs/integrations/web-demo)
// Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo)
// integration.
string avatar_uri = 7;

Expand All @@ -196,6 +247,15 @@ message Agent {
// values range from 0.0 (completely uncertain) to 1.0 (completely certain).
// If set to 0.0, the default of 0.3 is used.
float classification_threshold = 10;

// Optional. API version displayed in Dialogflow console. If not specified,
// V2 API is assumed. Clients are free to query different service endpoints
// for different API versions. However, bots connectors and webhook calls will
// follow the specified API version.
ApiVersion api_version = 14;

// Optional. The agent tier. If not specified, TIER_STANDARD is assumed.
Tier tier = 15;
}

// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2beta1.Agents.GetAgent].
Expand All @@ -205,6 +265,22 @@ message GetAgentRequest {
string parent = 1;
}

// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2beta1.Agents.SetAgent].
message SetAgentRequest {
// Required. The agent to update.
Agent agent = 1;

// Optional. The mask to control which fields get updated.
google.protobuf.FieldMask update_mask = 2;
}

// 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>`.
string parent = 1;
}

// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents].
message SearchAgentsRequest {
// Required. The project to list agents from.
Expand Down
106 changes: 69 additions & 37 deletions google/cloud/dialogflow/v2beta1/audio_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ syntax = "proto3";

package google.cloud.dialogflow.v2beta1;

import "google/protobuf/duration.proto";
import "google/api/annotations.proto";

option cc_enable_arenas = true;
Expand Down Expand Up @@ -76,6 +77,31 @@ enum AudioEncoding {
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
}

// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
string word = 3;

// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
google.protobuf.Duration start_offset = 1;

// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
google.protobuf.Duration end_offset = 2;

// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
float confidence = 4;
}

// Variant of the specified [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
//
// See the [Cloud Speech
Expand All @@ -92,7 +118,7 @@ enum SpeechModelVariant {
// model][InputAudioConfig.model] that the caller is eligible for.
//
// Please see the [Dialogflow
// docs](https://cloud.google.com/dialogflow-enterprise/docs/data-logging) for
// docs](https://cloud.google.com/dialogflow/docs/data-logging) for
// how to make your project eligible for enhanced models.
USE_BEST_AVAILABLE = 1;

Expand All @@ -114,7 +140,7 @@ enum SpeechModelVariant {
//
// * If the API caller isn't eligible for enhanced models, Dialogflow returns
// an error. Please see the [Dialogflow
// docs](https://cloud.google.com/dialogflow-enterprise/docs/data-logging)
// docs](https://cloud.google.com/dialogflow/docs/data-logging)
// for how to make your project eligible.
USE_ENHANCED = 3;
}
Expand All @@ -133,15 +159,21 @@ message InputAudioConfig {

// Required. The language of the supplied audio. Dialogflow does not do
// translations. See [Language
// Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
// Support](https://cloud.google.com/dialogflow/docs/reference/language)
// for a list of the currently supported language codes. Note that queries in
// the same session do not necessarily need to specify the same language.
string language_code = 3;

// Optional. The collection of phrase hints which are used to boost accuracy
// of speech recognition.
// Refer to
// [Cloud Speech API
// Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
// [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech
// words, e.g. start and end time offsets. If false or unspecified, Speech
// doesn't return any word-level information.
bool enable_word_info = 13;

// Optional. A list of strings containing words and phrases that the speech
// recognizer should recognize with higher likelihood.
//
// See [the Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
// for more details.
repeated string phrase_hints = 4;
Expand All @@ -163,6 +195,20 @@ message InputAudioConfig {
SpeechModelVariant model_variant = 10;
}

// Description of which voice to use for speech synthesis.
message VoiceSelectionParams {
// Optional. The name of the voice. If not set, the service will choose a
// voice based on the other parameters such as language_code and gender.
string name = 1;

// Optional. The preferred gender of the voice. If not set, the service will
// choose a voice based on the other parameters such as language_code and
// name. Note that this is only a preference, not requirement. If a
// voice of the appropriate gender is not available, the synthesizer should
// substitute a voice with a different gender rather than failing the request.
SsmlVoiceGender ssml_gender = 2;
}

// Gender of the voice as described in
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
enum SsmlVoiceGender {
Expand All @@ -180,20 +226,6 @@ enum SsmlVoiceGender {
SSML_VOICE_GENDER_NEUTRAL = 3;
}

// Description of which voice to use for speech synthesis.
message VoiceSelectionParams {
// Optional. The name of the voice. If not set, the service will choose a
// voice based on the other parameters such as language_code and gender.
string name = 1;

// Optional. The preferred gender of the voice. If not set, the service will
// choose a voice based on the other parameters such as language_code and
// name. Note that this is only a preference, not requirement. If a
// voice of the appropriate gender is not available, the synthesizer should
// substitute a voice with a different gender rather than failing the request.
SsmlVoiceGender ssml_gender = 2;
}

// Configuration of how speech should be synthesized.
message SynthesizeSpeechConfig {
// Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
Expand Down Expand Up @@ -226,6 +258,22 @@ message SynthesizeSpeechConfig {
VoiceSelectionParams voice = 4;
}

// Instructs the speech synthesizer how to generate the output audio content.
message OutputAudioConfig {
// Required. Audio encoding of the synthesized audio content.
OutputAudioEncoding audio_encoding = 1;

// Optional. 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.
SynthesizeSpeechConfig synthesize_speech_config = 3;
}

// Audio encoding of the output audio format in Text-To-Speech.
enum OutputAudioEncoding {
// Not specified.
Expand All @@ -244,19 +292,3 @@ enum OutputAudioEncoding {
// than MP3 while using approximately the same bitrate.
OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3;
}

// Instructs the speech synthesizer how to generate the output audio content.
message OutputAudioConfig {
// Required. Audio encoding of the synthesized audio content.
OutputAudioEncoding audio_encoding = 1;

// Optional. 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.
SynthesizeSpeechConfig synthesize_speech_config = 3;
}
10 changes: 8 additions & 2 deletions google/cloud/dialogflow/v2beta1/context.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
import "google/api/client.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
Expand All @@ -47,8 +48,13 @@ option objc_class_prefix = "DF";
//
// For more information about contexts, see the
// [Dialogflow
// documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview).
// documentation](https://cloud.google.com/dialogflow/docs/contexts-overview).
service Contexts {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/dialogflow";

// Returns the list of all contexts in the specified session.
rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -138,7 +144,7 @@ message Context {

// Optional. The collection of parameters associated with this context.
// Refer to [this
// doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
// doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
// for syntax.
google.protobuf.Struct parameters = 3;
}
Expand Down
6 changes: 6 additions & 0 deletions google/cloud/dialogflow/v2beta1/document.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/rpc/status.proto";
import "google/api/client.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
Expand All @@ -33,6 +34,11 @@ option objc_class_prefix = "DF";

// Manages documents of a knowledge base.
service Documents {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/dialogflow";

// Returns the list of all documents of the knowledge base.
//
// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
Expand Down
Loading

0 comments on commit ad63761

Please sign in to comment.