diff --git a/google/cloud/dialogflow_v2/proto/agent.proto b/google/cloud/dialogflow_v2/proto/agent.proto deleted file mode 100644 index 72ff1b336..000000000 --- a/google/cloud/dialogflow_v2/proto/agent.proto +++ /dev/null @@ -1,493 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/validation_result.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "AgentProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [Agents][google.cloud.dialogflow.v2.Agent]. -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: "/v2/{parent=projects/*}/agent" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/agent" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Creates/updates the specified agent. - rpc SetAgent(SetAgentRequest) returns (Agent) { - option (google.api.http) = { - post: "/v2/{agent.parent=projects/*}/agent" - body: "agent" - additional_bindings { - post: "/v2/{agent.parent=projects/*/locations/*}/agent" - body: "agent" - } - }; - option (google.api.method_signature) = "agent"; - } - - // Deletes the specified agent. - rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{parent=projects/*}/agent" - additional_bindings { - delete: "/v2/{parent=projects/*/locations/*}/agent" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Returns the list of agents. - // - // Since there is at most one conversational agent per project, this method is - // useful primarily for listing all agents across projects the caller has - // access to. One can achieve that with a wildcard project collection id "-". - // Refer to [List - // Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - rpc SearchAgents(SearchAgentsRequest) returns (SearchAgentsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*}/agent:search" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/agent:search" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Trains the specified agent. - // - // Operation - rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/agent:train" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/agent:train" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Exports the specified agent to a ZIP file. - // - // Operation - rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/agent:export" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/agent:export" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.dialogflow.v2.ExportAgentResponse" - metadata_type: "google.protobuf.Struct" - }; - } - - // Imports the specified agent from a ZIP file. - // - // Uploads new intents and entity types without deleting the existing ones. - // Intents and entity types with the same name are replaced with the new - // versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft - // agent will be trained automatically (unless disabled in agent settings). - // However, once the import is done, training may not be completed yet. Please - // call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train - // explicitly. - // - // Operation - // An operation which tracks when importing is complete. It only tracks - // when the draft agent is updated not when it is done training. - rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/agent:import" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/agent:import" - body: "*" - } - }; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Restores the specified agent from a ZIP file. - // - // Replaces the current agent version with a new one. All the intents and - // entity types in the older version are deleted. After the restore, the - // restored draft agent will be trained automatically (unless disabled in - // agent settings). However, once the restore is done, training may not be - // completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it - // returns in order to train explicitly. - // - // Operation - // An operation which tracks when restoring is complete. It only tracks - // when the draft agent is updated not when it is done training. - rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/agent:restore" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/agent:restore" - body: "*" - } - }; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Gets agent validation result. Agent validation is performed during - // training time and is updated automatically when training is completed. - rpc GetValidationResult(GetValidationResultRequest) returns (ValidationResult) { - option (google.api.http) = { - get: "/v2/{parent=projects/*}/agent/validationResult" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/agent/validationResult" - } - }; - } -} - -// A Dialogflow agent is a virtual agent that handles conversations with your -// end-users. It is a natural language understanding module that understands the -// nuances of human language. Dialogflow translates end-user text or audio -// during a conversation to structured data that your apps and services can -// understand. You design and build a Dialogflow agent to handle the types of -// conversations required for your system. -// -// For more information about agents, see the -// [Agent guide](https://cloud.google.com/dialogflow/docs/agents-overview). -message Agent { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Agent" - pattern: "projects/{project}/agent" - }; - - // Match mode determines how intents are detected from user queries. - enum MatchMode { - // Not specified. - MATCH_MODE_UNSPECIFIED = 0; - - // Best for agents with a small number of examples in intents and/or wide - // use of templates syntax and composite entities. - MATCH_MODE_HYBRID = 1; - - // Can be used for agents with a large number of examples in intents, - // especially the ones using @sys.any or very large custom entities. - 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/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The name of this agent. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The default language of the agent as a language tag. See - // [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 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The list of all languages supported by this agent (except for the - // `default_language_code`). - repeated string supported_language_codes = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The time zone of this agent from the - // [time zone database](https://www.iana.org/time-zones), e.g., - // America/New_York, Europe/Paris. - string time_zone = 5 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The description of this agent. - // The maximum length is 500 characters. If exceeded, the request is rejected. - string description = 6 [(google.api.field_behavior) = OPTIONAL]; - - // 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/docs/integrations/web-demo) - // integration. - string avatar_uri = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Determines whether this agent should log conversation queries. - bool enable_logging = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Determines how intents are detected from user queries. - MatchMode match_mode = 9 [ - deprecated = true, - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. To filter out false positive results and still get variety in - // matched natural language inputs for your agent, you can tune the machine - // learning classification threshold. If the returned score value is less than - // the threshold value, then a fallback intent will be triggered or, if there - // are no fallback intents defined, no intent will be triggered. The score - // 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 [(google.api.field_behavior) = OPTIONAL]; - - // 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 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The agent tier. If not specified, TIER_STANDARD is assumed. - Tier tier = 15 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent]. -message GetAgentRequest { - // Required. The project that the agent to fetch is associated with. - // Format: `projects/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; -} - -// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent]. -message SetAgentRequest { - // Required. The agent to update. - Agent agent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent]. -message DeleteAgentRequest { - // Required. The project that the agent to delete is associated with. - // Format: `projects/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; -} - -// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. -message SearchAgentsRequest { - // Required. The project to list agents from. - // Format: `projects/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. -message SearchAgentsResponse { - // The list of agents. There will be a maximum number of items returned based - // on the page_size field in the request. - repeated Agent agents = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent]. -message TrainAgentRequest { - // Required. The project that the agent to train is associated with. - // Format: `projects/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; -} - -// The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. -message ExportAgentRequest { - // Required. The project that the agent to export is associated with. - // Format: `projects/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) - // URI to export the agent to. - // The format of this URI must be `gs:///`. - // If left unspecified, the serialized agent is returned inline. - string agent_uri = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. -message ExportAgentResponse { - // The exported agent. - oneof agent { - // The URI to a file containing the exported agent. This field is populated - // only if `agent_uri` is specified in `ExportAgentRequest`. - string agent_uri = 1; - - // Zip compressed raw byte content for agent. - bytes agent_content = 2; - } -} - -// The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent]. -message ImportAgentRequest { - // Required. The project that the agent to import is associated with. - // Format: `projects/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // Required. The agent to import. - oneof agent { - // The URI to a Google Cloud Storage file containing the agent to import. - // Note: The URI must start with "gs://". - string agent_uri = 2; - - // Zip compressed raw byte content for agent. - bytes agent_content = 3; - } -} - -// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent]. -message RestoreAgentRequest { - // Required. The project that the agent to restore is associated with. - // Format: `projects/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // Required. The agent to restore. - oneof agent { - // The URI to a Google Cloud Storage file containing the agent to restore. - // Note: The URI must start with "gs://". - string agent_uri = 2; - - // Zip compressed raw byte content for agent. - bytes agent_content = 3; - } -} - -// The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult]. -message GetValidationResultRequest { - // Required. The project that the agent is associated with. - // Format: `projects/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // 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 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/google/cloud/dialogflow_v2/proto/answer_record.proto b/google/cloud/dialogflow_v2/proto/answer_record.proto deleted file mode 100644 index 3fb729107..000000000 --- a/google/cloud/dialogflow_v2/proto/answer_record.proto +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/participant.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "AnswerRecordsProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing -// [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord]. -service AnswerRecords { - 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 answer records in the specified project in reverse - // chronological order. - rpc ListAnswerRecords(ListAnswerRecordsRequest) - returns (ListAnswerRecordsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*}/answerRecords" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/answerRecords" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Updates the specified answer record. - rpc UpdateAnswerRecord(UpdateAnswerRecordRequest) returns (AnswerRecord) { - option (google.api.http) = { - patch: "/v2/{answer_record.name=projects/*/answerRecords/*}" - body: "answer_record" - additional_bindings { - patch: "/v2/{answer_record.name=projects/*/locations/*/answerRecords/*}" - body: "answer_record" - } - }; - option (google.api.method_signature) = "answer_record,update_mask"; - } -} - -// Answer records are records to manage answer history and feedbacks for -// Dialogflow. -// -// Currently, answer record includes: -// -// - human agent assistant article suggestion -// - human agent assistant faq article -// -// It doesn't include: -// -// - `DetectIntent` intent matching -// - `DetectIntent` knowledge -// -// Answer records are not related to the conversation history in the -// Dialogflow Console. A Record is generated even when the end-user disables -// conversation history in the console. Records are created when there's a human -// agent assistant suggestion generated. -// -// A typical workflow for customers provide feedback to an answer is: -// -// 1. For human agent assistant, customers get suggestion via ListSuggestions -// API. Together with the answers, -// [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] are -// returned to the customers. -// 2. The customer uses the -// [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the -// [UpdateAnswerRecord][] method to send feedback about a specific answer -// that they believe is wrong. -message AnswerRecord { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/AnswerRecord" - pattern: "projects/{project}/answerRecords/{answer_record}" - pattern: "projects/{project}/locations/{location}/answerRecords/{answer_record}" - }; - - // The unique identifier of this answer record. - // Format: `projects//locations//answerRecords/`. - string name = 1; - - // Required. The AnswerFeedback for this record. You can set this with - // [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] - // in order to give us feedback about this answer. - AnswerFeedback answer_feedback = 2 [(google.api.field_behavior) = REQUIRED]; - - // The record for this answer. - oneof record { - // Output only. The record for human agent assistant. - AgentAssistantRecord agent_assistant_record = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } -} - -// Request message for -// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords]. -message ListAnswerRecordsRequest { - // Required. The project to list all answer records for in reverse - // chronological order. Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/AnswerRecord" - } - ]; - - // Required. Filters to restrict results to specific answer records. - // Filter on answer record type. Currently predicates on `type` is supported, - // valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`. - // - // For more information about filtering, see - // [API Filtering](https://aip.dev/160). - string filter = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The maximum number of records to return in a single page. - // The server may return fewer records than this. If unspecified, we use 10. - // The maximum is 100. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The - // [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] - // value returned from a previous list request used to continue listing on - // the next page. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords]. -message ListAnswerRecordsResponse { - // The list of answer records. - repeated AnswerRecord answer_records = 1; - - // A token to retrieve next page of results. Or empty if there are no more - // results. - // Pass this value in the - // [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] - // field in the subsequent call to `ListAnswerRecords` method to retrieve the - // next page of results. - string next_page_token = 2; -} - -// Request message for -// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord]. -message UpdateAnswerRecordRequest { - // Required. Answer record to update. - AnswerRecord answer_record = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Represents feedback the customer has about the quality & correctness of a -// certain answer in a conversation. -message AnswerFeedback { - // The correctness level of an answer. - enum CorrectnessLevel { - // Correctness level unspecified. - CORRECTNESS_LEVEL_UNSPECIFIED = 0; - - // Answer is totally wrong. - NOT_CORRECT = 1; - - // Answer is partially correct. - PARTIALLY_CORRECT = 2; - - // Answer is fully correct. - FULLY_CORRECT = 3; - } - - // The correctness level of the specific answer. - CorrectnessLevel correctness_level = 1; - - // Normally, detail feedback is provided when answer is not fully correct. - oneof detail_feedback { - // Detail feedback of agent assist suggestions. - AgentAssistantFeedback agent_assistant_detail_feedback = 2; - } - - // Indicates whether the answer/item was clicked by the human agent - // or not. Default to false. - bool clicked = 3; - - // Time when the answer/item was clicked. - google.protobuf.Timestamp click_time = 5; - - // Indicates whether the answer/item was displayed to the human - // agent in the agent desktop UI. Default to false. - bool displayed = 4; - - // Time when the answer/item was displayed. - google.protobuf.Timestamp display_time = 6; -} - -// Detail feedback of Agent Assist result. -message AgentAssistantFeedback { - // Relevance of an answer. - enum AnswerRelevance { - // Answer relevance unspecified. - ANSWER_RELEVANCE_UNSPECIFIED = 0; - - // Answer is irrelevant to query. - IRRELEVANT = 1; - - // Answer is relevant to query. - RELEVANT = 2; - } - - // Correctness of document. - enum DocumentCorrectness { - // Document correctness unspecified. - DOCUMENT_CORRECTNESS_UNSPECIFIED = 0; - - // Information in document is incorrect. - INCORRECT = 1; - - // Information in document is correct. - CORRECT = 2; - } - - // Efficiency of document. - enum DocumentEfficiency { - // Document efficiency unspecified. - DOCUMENT_EFFICIENCY_UNSPECIFIED = 0; - - // Document is inefficient. - INEFFICIENT = 1; - - // Document is efficient. - EFFICIENT = 2; - } - - // Optional. Whether or not the suggested answer is relevant. - // - // For example: - // - // * Query: "Can I change my mailing address?" - // * Suggested document says: "Items must be returned/exchanged within 60 - // days of the purchase date." - // * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] - AnswerRelevance answer_relevance = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether or not the information in the document is correct. - // - // For example: - // - // * Query: "Can I return the package in 2 days once received?" - // * Suggested document says: "Items must be returned/exchanged within 60 - // days of the purchase date." - // * Ground truth: "No return or exchange is allowed." - // * [document_correctness]: INCORRECT - DocumentCorrectness document_correctness = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether or not the suggested document is efficient. For example, - // if the document is poorly written, hard to understand, hard to use or - // too long to find useful information, - // [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] - // is - // [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. - DocumentEfficiency document_efficiency = 3 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Represents a record of a human agent assist answer. -message AgentAssistantRecord { - // Output only. The agent assist answer. - oneof answer { - // Output only. The article suggestion answer. - ArticleAnswer article_suggestion_answer = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The FAQ answer. - FaqAnswer faq_answer = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - } -} diff --git a/google/cloud/dialogflow_v2/proto/audio_config.proto b/google/cloud/dialogflow_v2/proto/audio_config.proto deleted file mode 100644 index 53803f513..000000000 --- a/google/cloud/dialogflow_v2/proto/audio_config.proto +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "AudioConfigProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Hints for the speech recognizer to help with recognition in a specific -// conversation state. -message SpeechContext { - // Optional. A list of strings containing words and phrases that the speech - // recognizer should recognize with higher likelihood. - // - // This list can be used to: - // - // * improve accuracy for words and phrases you expect the user to say, - // e.g. typical commands for your Dialogflow agent - // * add additional words to the speech recognizer vocabulary - // * ... - // - // See the [Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/quotas) for usage - // limits. - repeated string phrases = 1; - - // Optional. Boost for this context compared to other contexts: - // - // * If the boost is positive, Dialogflow will increase the probability that - // the phrases in this context are recognized over similar sounding phrases. - // * If the boost is unspecified or non-positive, Dialogflow will not apply - // any boost. - // - // Dialogflow recommends that you use boosts in the range (0, 20] and that you - // find a value that fits your use case with binary search. - float boost = 2; -} - -// Audio encoding of the audio content sent in the conversational query request. -// Refer to the -// [Cloud Speech API -// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more -// details. -enum AudioEncoding { - // Not specified. - AUDIO_ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - AUDIO_ENCODING_LINEAR_16 = 1; - - // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio - // Codec) is the recommended encoding because it is lossless (therefore - // recognition is not compromised) and requires only about half the - // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and - // 24-bit samples, however, not all fields in `STREAMINFO` are supported. - AUDIO_ENCODING_FLAC = 2; - - // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - AUDIO_ENCODING_MULAW = 3; - - // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - AUDIO_ENCODING_AMR = 4; - - // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_AMR_WB = 5; - - // Opus encoded audio frames in Ogg container - // ([OggOpus](https://wiki.xiph.org/OggOpus)). - // `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_OGG_OPUS = 6; - - // Although the use of lossy encodings is not recommended, if a very low - // bitrate encoding is required, `OGG_OPUS` is highly preferred over - // Speex encoding. The [Speex](https://speex.org/) encoding supported by - // Dialogflow API has a header byte in each block, as in MIME type - // `audio/x-speex-with-header-byte`. - // It is a variant of the RTP Speex encoding defined in - // [RFC 5574](https://tools.ietf.org/html/rfc5574). - // The stream is a sequence of blocks, one block per RTP packet. Each block - // starts with a byte containing the length of the block, in bytes, followed - // by one or more frames of Speex data, padded to an integral number of - // bytes (octets) as specified in RFC 5574. In other words, each RTP header - // is replaced with a single byte containing the block length. Only Speex - // wideband is supported. `sample_rate_hertz` must be 16000. - 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.v2.InputAudioConfig.model] to use. -// -// See the [Cloud Speech -// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) -// for which models have different variants. For example, the "phone_call" model -// has both a standard and an enhanced variant. When you use an enhanced model, -// you will generally receive higher quality results than for a standard model. -enum SpeechModelVariant { - // No model variant specified. In this case Dialogflow defaults to - // USE_BEST_AVAILABLE. - SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; - - // Use the best available variant of the [Speech - // model][InputAudioConfig.model] that the caller is eligible for. - // - // Please see the [Dialogflow - // docs](https://cloud.google.com/dialogflow/docs/data-logging) for - // how to make your project eligible for enhanced models. - USE_BEST_AVAILABLE = 1; - - // Use standard model variant even if an enhanced model is available. See the - // [Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) - // for details about enhanced models. - USE_STANDARD = 2; - - // Use an enhanced model variant: - // - // * If an enhanced variant does not exist for the given - // [model][google.cloud.dialogflow.v2.InputAudioConfig.model] and request language, Dialogflow falls - // back to the standard variant. - // - // The [Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) - // describes which models have enhanced variants. - // - // * If the API caller isn't eligible for enhanced models, Dialogflow returns - // an error. Please see the [Dialogflow - // docs](https://cloud.google.com/dialogflow/docs/data-logging) - // for how to make your project eligible. - USE_ENHANCED = 3; -} - -// Instructs the speech recognizer how to process the audio content. -message InputAudioConfig { - // Required. Audio encoding of the audio content to process. - AudioEncoding audio_encoding = 1; - - // Required. Sample rate (in Hertz) of the audio content sent in the query. - // Refer to - // [Cloud Speech API - // documentation](https://cloud.google.com/speech-to-text/docs/basics) for - // more details. - int32 sample_rate_hertz = 2; - - // Required. The language of the supplied audio. Dialogflow does not do - // translations. See [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; - - // If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in - // [StreamingRecognitionResult][google.cloud.dialogflow.v2.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; - - // 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. - // - // This field is deprecated. Please use [speech_contexts]() instead. If you - // specify both [phrase_hints]() and [speech_contexts](), Dialogflow will - // treat the [phrase_hints]() as a single additional [SpeechContext](). - repeated string phrase_hints = 4 [deprecated = true]; - - // Context information to assist speech recognition. - // - // See [the Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - // for more details. - repeated SpeechContext speech_contexts = 11; - - // Which Speech model to select for the given request. Select the - // model best suited to your domain to get best results. If a model is not - // explicitly specified, then we auto-select a model based on the parameters - // in the InputAudioConfig. - // If enhanced speech model is enabled for the agent and an enhanced - // version of the specified model for the language does not exist, then the - // speech is recognized using the standard version of the specified model. - // Refer to - // [Cloud Speech API - // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - // for more details. - string model = 7; - - // Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. - SpeechModelVariant model_variant = 10; - - // 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 - // stopped or paused. In this case, once a detected intent is received, the - // client should close the stream and start a new request with a new stream as - // needed. - // Note: This setting is relevant only for streaming methods. - // Note: When specified, InputAudioConfig.single_utterance takes precedence - // over StreamingDetectIntentRequest.single_utterance. - bool single_utterance = 8; - - // Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and - // [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. - // If `false` and recognition doesn't return any result, trigger - // `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. - bool disable_no_speech_recognized_event = 14; -} - -// 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 - // [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_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][google.cloud.dialogflow.v2.VoiceSelectionParams.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 - // native speed supported by the specific voice. 2.0 is twice as fast, and - // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any - // other values < 0.25 or > 4.0 will return an error. - double speaking_rate = 1; - - // Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 - // semitones from the original pitch. -20 means decrease 20 semitones from the - // original pitch. - double pitch = 2; - - // Optional. Volume gain (in dB) of the normal native volume supported by the - // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of - // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) - // will play at approximately half the amplitude of the normal native signal - // amplitude. A value of +6.0 (dB) will play at approximately twice the - // amplitude of the normal native signal amplitude. We strongly recommend not - // to exceed +10 (dB) as there's usually no effective increase in loudness for - // any value greater than that. - double volume_gain_db = 3; - - // Optional. An identifier which selects 'audio effects' profiles that are - // applied on (post synthesized) text to speech. Effects are applied on top of - // each other in the order they are given. - repeated string effects_profile_id = 5; - - // Optional. The desired voice of the synthesized audio. - VoiceSelectionParams voice = 4; -} - -// Gender of the voice as described in -// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). -enum SsmlVoiceGender { - // An unspecified gender, which means that the client doesn't care which - // gender the selected voice will have. - SSML_VOICE_GENDER_UNSPECIFIED = 0; - - // A male voice. - SSML_VOICE_GENDER_MALE = 1; - - // A female voice. - SSML_VOICE_GENDER_FEMALE = 2; - - // A gender-neutral voice. - SSML_VOICE_GENDER_NEUTRAL = 3; -} - -// Instructs the speech synthesizer on how to generate the output audio content. -// If this audio config is supplied in a request, it overrides all existing -// text-to-speech settings applied to the agent. -message OutputAudioConfig { - // Required. Audio encoding of the synthesized audio content. - OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; - - // 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; - - // Configuration of how speech should be synthesized. - SynthesizeSpeechConfig synthesize_speech_config = 3; -} - -// Configures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile]. -message SpeechToTextConfig { - // Optional. The speech model used in speech to text. - // `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - // `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] and - // [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request. - SpeechModelVariant speech_model_variant = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// Audio encoding of the output audio format in Text-To-Speech. -enum OutputAudioEncoding { - // Not specified. - OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - // Audio content returned as LINEAR16 also contains a WAV header. - OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; - - // MP3 audio at 32kbps. - OUTPUT_AUDIO_ENCODING_MP3 = 2; - - // MP3 audio at 64kbps. - OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; - - // Opus encoded audio wrapped in an ogg container. The result will be a - // file which can be played natively on Android, and in browsers (at least - // Chrome and Firefox). The quality of the encoding is considerably higher - // than MP3 while using approximately the same bitrate. - OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; - - // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - OUTPUT_AUDIO_ENCODING_MULAW = 5; -} diff --git a/google/cloud/dialogflow_v2/proto/context.proto b/google/cloud/dialogflow_v2/proto/context.proto deleted file mode 100644 index d6a622e12..000000000 --- a/google/cloud/dialogflow_v2/proto/context.proto +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ContextProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [Contexts][google.cloud.dialogflow.v2.Context]. -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) = { - get: "/v2/{parent=projects/*/agent/sessions/*}/contexts" - additional_bindings { - get: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" - } - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts" - } - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified context. - rpc GetContext(GetContextRequest) returns (Context) { - option (google.api.http) = { - get: "/v2/{name=projects/*/agent/sessions/*/contexts/*}" - additional_bindings { - get: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a context. - // - // If the specified context already exists, overrides the context. - rpc CreateContext(CreateContextRequest) returns (Context) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent/sessions/*}/contexts" - body: "context" - additional_bindings { - post: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" - body: "context" - } - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts" - body: "context" - } - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" - body: "context" - } - }; - option (google.api.method_signature) = "parent,context"; - } - - // Updates the specified context. - rpc UpdateContext(UpdateContextRequest) returns (Context) { - option (google.api.http) = { - patch: "/v2/{context.name=projects/*/agent/sessions/*/contexts/*}" - body: "context" - additional_bindings { - patch: "/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" - body: "context" - } - additional_bindings { - patch: "/v2/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}" - body: "context" - } - additional_bindings { - patch: "/v2/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" - body: "context" - } - }; - option (google.api.method_signature) = "context,update_mask"; - } - - // Deletes the specified context. - rpc DeleteContext(DeleteContextRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/agent/sessions/*/contexts/*}" - additional_bindings { - delete: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/agent/sessions/*/contexts/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Deletes all active contexts in the specified session. - rpc DeleteAllContexts(DeleteAllContextsRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{parent=projects/*/agent/sessions/*}/contexts" - additional_bindings { - delete: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" - } - additional_bindings { - delete: "/v2/{parent=projects/*/locations/*/agent/sessions/*}/contexts" - } - additional_bindings { - delete: "/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" - } - }; - option (google.api.method_signature) = "parent"; - } -} - -// Dialogflow contexts are similar to natural language context. If a person says -// to you "they are orange", you need context in order to understand what "they" -// is referring to. Similarly, for Dialogflow to handle an end-user expression -// like that, it needs to be provided with context in order to correctly match -// an intent. -// -// Using contexts, you can control the flow of a conversation. You can configure -// contexts for an intent by setting input and output contexts, which are -// identified by string names. When an intent is matched, any configured output -// contexts for that intent become active. While any contexts are active, -// Dialogflow is more likely to match intents that are configured with input -// contexts that correspond to the currently active contexts. -// -// For more information about context, see the -// [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). -message Context { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Context" - pattern: "projects/{project}/agent/sessions/{session}/contexts/{context}" - pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}" - }; - - // Required. The unique identifier of the context. Format: - // `projects//agent/sessions//contexts/`, - // or `projects//agent/environments//users//sessions//contexts/`. - // - // The `Context ID` is always converted to lowercase, may only contain - // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. - // - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - // - // The following context names are reserved for internal use by Dialogflow. - // You should not use these contexts or create contexts with these names: - // - // * `__system_counters__` - // * `*_id_dialog_context` - // * `*_dialog_params_size` - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The number of conversational query requests after which the - // context expires. The default is `0`. If set to `0`, the context expires - // immediately. Contexts expire automatically after 20 minutes if there - // are no matching queries. - int32 lifespan_count = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of parameters associated with this context. - // - // Depending on your protocol or client library language, this is a - // map, associative array, symbol table, dictionary, or JSON object - // composed of a collection of (MapKey, MapValue) pairs: - // - // - MapKey type: string - // - MapKey value: parameter name - // - MapValue type: - // - If parameter's entity type is a composite entity: map - // - Else: depending on parameter value type, could be one of string, - // number, boolean, null, list or map - // - MapValue value: - // - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - // - Else: parameter value - google.protobuf.Struct parameters = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. -message ListContextsRequest { - // Required. The session to list all contexts from. - // Format: `projects//agent/sessions/` or - // `projects//agent/environments//users//sessions/`. - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Context" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. -message ListContextsResponse { - // The list of contexts. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated Context contexts = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext]. -message GetContextRequest { - // Required. The name of the context. Format: - // `projects//agent/sessions//contexts/` - // or `projects//agent/environments//users//sessions//contexts/`. - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Context" - } - ]; -} - -// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext]. -message CreateContextRequest { - // Required. The session to create a context for. - // Format: `projects//agent/sessions/` or - // `projects//agent/environments//users//sessions/`. - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Context" - } - ]; - - // Required. The context to create. - Context context = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext]. -message UpdateContextRequest { - // Required. The context to update. - Context context = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext]. -message DeleteContextRequest { - // Required. The name of the context to delete. Format: - // `projects//agent/sessions//contexts/` - // or `projects//agent/environments//users//sessions//contexts/`. - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Context" - } - ]; -} - -// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts]. -message DeleteAllContextsRequest { - // Required. The name of the session to delete all contexts from. Format: - // `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. - // If `Environment ID` is not specified we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Context" - } - ]; -} diff --git a/google/cloud/dialogflow_v2/proto/conversation.proto b/google/cloud/dialogflow_v2/proto/conversation.proto deleted file mode 100644 index 17e062550..000000000 --- a/google/cloud/dialogflow_v2/proto/conversation.proto +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/participant.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ConversationProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [Conversations][google.cloud.dialogflow.v2.Conversation]. -service Conversations { - 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"; - - // Creates a new conversation. Conversations are auto-completed after 24 - // hours. - // - // Conversation Lifecycle: - // There are two stages during a conversation: Automated Agent Stage and - // Assist Stage. - // - // For Automated Agent Stage, there will be a dialogflow agent responding to - // user queries. - // - // For Assist Stage, there's no dialogflow agent responding to user queries. - // But we will provide suggestions which are generated from conversation. - // - // If [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] is configured for a dialogflow - // agent, conversation will start from `Automated Agent Stage`, otherwise, it - // will start from `Assist Stage`. And during `Automated Agent Stage`, once an - // [Intent][google.cloud.dialogflow.v2.Intent] with [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] is triggered, conversation - // will transfer to Assist Stage. - rpc CreateConversation(CreateConversationRequest) returns (Conversation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/conversations" - body: "conversation" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/conversations" - body: "conversation" - } - }; - option (google.api.method_signature) = "parent,conversation"; - } - - // Returns the list of all conversations in the specified project. - rpc ListConversations(ListConversationsRequest) returns (ListConversationsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*}/conversations" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/conversations" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specific conversation. - rpc GetConversation(GetConversationRequest) returns (Conversation) { - option (google.api.http) = { - get: "/v2/{name=projects/*/conversations/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/conversations/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Completes the specified conversation. Finished conversations are purged - // from the database after 30 days. - rpc CompleteConversation(CompleteConversationRequest) returns (Conversation) { - option (google.api.http) = { - post: "/v2/{name=projects/*/conversations/*}:complete" - body: "*" - additional_bindings { - post: "/v2/{name=projects/*/locations/*/conversations/*}:complete" - body: "*" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists messages that belong to a given conversation. - // `messages` are ordered by `create_time` in descending order. To fetch - // updates without duplication, send request with filter - // `create_time_epoch_microseconds > - // [first item's create_time of previous request]` and empty page_token. - rpc ListMessages(ListMessagesRequest) returns (ListMessagesResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/conversations/*}/messages" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/conversations/*}/messages" - } - }; - option (google.api.method_signature) = "parent"; - } -} - -// Represents a conversation. -// A conversation is an interaction between an agent, including live agents -// and Dialogflow agents, and a support customer. Conversations can -// include phone calls and text-based chat sessions. -message Conversation { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Conversation" - pattern: "projects/{project}/conversations/{conversation}" - pattern: "projects/{project}/locations/{location}/conversations/{conversation}" - }; - - // Enumeration of the completion status of the conversation. - enum LifecycleState { - // Unknown. - LIFECYCLE_STATE_UNSPECIFIED = 0; - - // Conversation is currently open for media analysis. - IN_PROGRESS = 1; - - // Conversation has been completed. - COMPLETED = 2; - } - - // Enumeration of the different conversation stages a conversation can be in. - // Reference: - // https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages - enum ConversationStage { - // Unknown. Should never be used after a conversation is successfully - // created. - CONVERSATION_STAGE_UNSPECIFIED = 0; - - // The conversation should return virtual agent responses into the - // conversation. - VIRTUAL_AGENT_STAGE = 1; - - // The conversation should not provide responses, just listen and provide - // suggestions. - HUMAN_ASSIST_STAGE = 2; - } - - // Output only. The unique identifier of this conversation. - // Format: `projects//locations//conversations/`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the Conversation. - LifecycleState lifecycle_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The Conversation Profile to be used to configure this - // Conversation. This field cannot be updated. - // Format: `projects//locations//conversationProfiles/`. - string conversation_profile = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; - - // Output only. It will not be empty if the conversation is to be connected over - // telephony. - ConversationPhoneNumber phone_number = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the conversation was started. - google.protobuf.Timestamp start_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the conversation was finished. - google.protobuf.Timestamp end_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The stage of a conversation. It indicates whether the virtual agent or a - // human agent is handling the conversation. - // - // If the conversation is created with the conversation profile that has - // Dialogflow config set, defaults to - // [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; Otherwise, defaults to - // [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - // - // If the conversation is created with the conversation profile that has - // Dialogflow config set but explicitly sets conversation_stage to - // [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], it skips - // [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] stage and directly goes to - // [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - ConversationStage conversation_stage = 7; -} - -// The request message for [Conversations.CreateConversation][google.cloud.dialogflow.v2.Conversations.CreateConversation]. -message CreateConversationRequest { - // Required. Resource identifier of the project creating the conversation. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Conversation" - } - ]; - - // Required. The conversation to create. - Conversation conversation = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Identifier of the conversation. Generally it's auto generated by Google. - // Only set it if you cannot wait for the response to return a - // auto-generated one to you. - // - // The conversation ID must be compliant with the regression fomula - // "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. - // If the field is provided, the caller is resposible for - // 1. the uniqueness of the ID, otherwise the request will be rejected. - // 2. the consistency for whether to use custom ID or not under a project to - // better ensure uniqueness. - string conversation_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Conversations.ListConversations][google.cloud.dialogflow.v2.Conversations.ListConversations]. -message ListConversationsRequest { - // Required. The project from which to list all conversation. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Conversation" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // A filter expression that filters conversations listed in the response. In - // general, the expression must specify the field name, a comparison operator, - // and the value to use for filtering: - //
    - //
  • The value must be a string, a number, or a boolean.
  • - //
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • - //
  • To filter on multiple expressions, separate the - // expressions with `AND` or `OR` (omitting both implies `AND`).
  • - //
  • For clarity, expressions can be enclosed in parentheses.
  • - //
- // Only `lifecycle_state` can be filtered on in this way. For example, - // the following expression only returns `COMPLETED` conversations: - // - // `lifecycle_state = "COMPLETED"` - // - // For more information about filtering, see - // [API Filtering](https://aip.dev/160). - string filter = 4; -} - -// The response message for [Conversations.ListConversations][google.cloud.dialogflow.v2.Conversations.ListConversations]. -message ListConversationsResponse { - // The list of conversations. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated Conversation conversations = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [Conversations.GetConversation][google.cloud.dialogflow.v2.Conversations.GetConversation]. -message GetConversationRequest { - // Required. The name of the conversation. Format: - // `projects//locations//conversations/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Conversation" - } - ]; -} - -// The request message for [Conversations.CompleteConversation][google.cloud.dialogflow.v2.Conversations.CompleteConversation]. -message CompleteConversationRequest { - // Required. Resource identifier of the conversation to close. - // Format: `projects//locations//conversations/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Conversation" - } - ]; -} - -// The request message for [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages]. -message ListMessagesRequest { - // Required. The name of the conversation to list messages for. - // Format: `projects//locations//conversations/` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Message" - } - ]; - - // Optional. Filter on message fields. Currently predicates on `create_time` - // and `create_time_epoch_microseconds` are supported. `create_time` only - // support milliseconds accuracy. E.g., - // `create_time_epoch_microseconds > 1551790877964485` or - // `create_time > 2017-01-15T01:30:15.01Z`. - // - // For more information about filtering, see - // [API Filtering](https://aip.dev/160). - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages]. -message ListMessagesResponse { - // The list of messages. There will be a maximum number of items - // returned based on the page_size field in the request. - // `messages` is sorted by `create_time` in descending order. - repeated Message messages = 1; - - // Token to retrieve the next page of results, or empty if there are - // no more results in the list. - string next_page_token = 2; -} - -// Represents a phone number for telephony integration. It allows for connecting -// a particular conversation over telephony. -message ConversationPhoneNumber { - // Output only. The phone number to connect to this conversation. - string phone_number = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/google/cloud/dialogflow_v2/proto/conversation_event.proto b/google/cloud/dialogflow_v2/proto/conversation_event.proto deleted file mode 100644 index 61cfd75f6..000000000 --- a/google/cloud/dialogflow_v2/proto/conversation_event.proto +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2; - -import "google/cloud/dialogflow/v2/participant.proto"; -import "google/rpc/status.proto"; -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ConversationEventProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Represents a notification sent to Pub/Sub subscribers for conversation -// lifecycle events. -message ConversationEvent { - // Enumeration of the types of events available. - enum Type { - // Type not set. - TYPE_UNSPECIFIED = 0; - - // A new conversation has been opened. This is fired when a telephone call - // is answered, or a conversation is created via the API. - CONVERSATION_STARTED = 1; - - // An existing conversation has closed. This is fired when a telephone call - // is terminated, or a conversation is closed via the API. - CONVERSATION_FINISHED = 2; - - // An existing conversation has received notification from Dialogflow that - // human intervention is required. - HUMAN_INTERVENTION_NEEDED = 3; - - // An existing conversation has received a new message, either from API or - // telephony. It is configured in - // [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2.ConversationProfile.new_message_event_notification_config] - NEW_MESSAGE = 5; - - // Unrecoverable error during a telephone call. - // - // In general non-recoverable errors only occur if something was - // misconfigured in the ConversationProfile corresponding to the call. After - // a non-recoverable error, Dialogflow may stop responding. - // - // We don't fire this event: - // - // * in an API call because we can directly return the error, or, - // * when we can recover from an error. - UNRECOVERABLE_ERROR = 4; - } - - // The unique identifier of the conversation this notification - // refers to. - // Format: `projects//conversations/`. - string conversation = 1; - - // The type of the event that this notification refers to. - Type type = 2; - - // More detailed information about an error. Only set for type - // UNRECOVERABLE_ERROR_IN_PHONE_CALL. - google.rpc.Status error_status = 3; - - // Payload of conversation event. - oneof payload { - // Payload of NEW_MESSAGE event. - Message new_message_payload = 4; - } -} diff --git a/google/cloud/dialogflow_v2/proto/conversation_profile.proto b/google/cloud/dialogflow_v2/proto/conversation_profile.proto deleted file mode 100644 index 8194ae224..000000000 --- a/google/cloud/dialogflow_v2/proto/conversation_profile.proto +++ /dev/null @@ -1,574 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/participant.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ConversationProfileProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [ConversationProfiles][google.cloud.dialogflow.v2.ConversationProfile]. -service ConversationProfiles { - 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 conversation profiles in the specified project. - rpc ListConversationProfiles(ListConversationProfilesRequest) returns (ListConversationProfilesResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*}/conversationProfiles" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/conversationProfiles" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified conversation profile. - rpc GetConversationProfile(GetConversationProfileRequest) returns (ConversationProfile) { - option (google.api.http) = { - get: "/v2/{name=projects/*/conversationProfiles/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/conversationProfiles/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a conversation profile in the specified project. - // - // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] - // aren't populated in the response. You can retrieve them via - // [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] API. - rpc CreateConversationProfile(CreateConversationProfileRequest) returns (ConversationProfile) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/conversationProfiles" - body: "conversation_profile" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/conversationProfiles" - body: "conversation_profile" - } - }; - option (google.api.method_signature) = "parent,conversation_profile"; - } - - // Updates the specified conversation profile. - // - // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] - // aren't populated in the response. You can retrieve them via - // [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] API. - rpc UpdateConversationProfile(UpdateConversationProfileRequest) returns (ConversationProfile) { - option (google.api.http) = { - patch: "/v2/{conversation_profile.name=projects/*/conversationProfiles/*}" - body: "conversation_profile" - additional_bindings { - patch: "/v2/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}" - body: "conversation_profile" - } - }; - option (google.api.method_signature) = "conversation_profile,update_mask"; - } - - // Deletes the specified conversation profile. - rpc DeleteConversationProfile(DeleteConversationProfileRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/conversationProfiles/*}" - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/conversationProfiles/*}" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// Defines the services to connect to incoming Dialogflow conversations. -message ConversationProfile { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/ConversationProfile" - pattern: "projects/{project}/conversationProfiles/{conversation_profile}" - pattern: "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}" - }; - - // Optional. The unique identifier of this conversation profile. - // Format: `projects//locations//conversationProfiles/`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Human readable name for this profile. Max length 1024 bytes. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Create time of the conversation profile. - google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Update time of the conversation profile. - google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Configuration for an automated agent to use with this profile. - AutomatedAgentConfig automated_agent_config = 3; - - // Configuration for agent assistance to use with this profile. - HumanAgentAssistantConfig human_agent_assistant_config = 4; - - // Configuration for connecting to a live agent. - HumanAgentHandoffConfig human_agent_handoff_config = 5; - - // Configuration for publishing conversation lifecycle events. - NotificationConfig notification_config = 6; - - // Configuration for logging conversation lifecycle events. - LoggingConfig logging_config = 7; - - // Configuration for publishing new message events. Event will be sent in - // format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] - NotificationConfig new_message_event_notification_config = 8; - - // Settings for speech transcription. - SpeechToTextConfig stt_config = 9; - - // Language which represents the conversationProfile. - // If unspecified, the default language code en-us applies. Users need to - // create a ConversationProfile for each language they want to support. - string language_code = 10; -} - -// The request message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles]. -message ListConversationProfilesRequest { - // Required. The project to list all conversation profiles from. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; - - // The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// The response message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles]. -message ListConversationProfilesResponse { - // The list of project conversation profiles. There is a maximum number - // of items returned based on the page_size field in the request. - repeated ConversationProfile conversation_profiles = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile]. -message GetConversationProfileRequest { - // Required. The resource name of the conversation profile. - // Format: `projects//locations//conversationProfiles/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; -} - -// The request message for [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfile]. -message CreateConversationProfileRequest { - // Required. The project to create a conversation profile for. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; - - // Required. The conversation profile to create. - ConversationProfile conversation_profile = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfile]. -message UpdateConversationProfileRequest { - // Required. The conversation profile to update. - ConversationProfile conversation_profile = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The mask to control which fields to update. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfile]. -// -// This operation fails if the conversation profile is still referenced from -// a phone number. -message DeleteConversationProfileRequest { - // Required. The name of the conversation profile to delete. - // Format: `projects//locations//conversationProfiles/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; -} - -// Defines the Automated Agent to connect to a conversation. -message AutomatedAgentConfig { - // Required. ID of the Dialogflow agent environment to use. - // - // This project needs to either be the same project as the conversation or you - // need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API - // Service Agent` role in this project. - // - // Format: `projects//locations//agent/environments/`. If environment is not - // specified, the default `draft` environment is used. Refer to - // [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) - // for more details. - string agent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Agent" - } - ]; -} - -// Defines the Human Agent Assist to connect to a conversation. -message HumanAgentAssistantConfig { - // Settings of suggestion trigger. - message SuggestionTriggerSettings { - // Do not trigger if last utterance is small talk. - bool no_smalltalk = 1; - - // Only trigger suggestion if participant role of last utterance is - // END_USER. - bool only_end_user = 2; - } - - // Config for suggestion features. - message SuggestionFeatureConfig { - // The suggestion feature. - SuggestionFeature suggestion_feature = 5; - - // Automatically iterates all participants and tries to compile - // suggestions. - // - // Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. - bool enable_event_based_suggestion = 3; - - // Settings of suggestion trigger. - // - // Currently, only ARTICLE_SUGGESTION and FAQ will use this field. - SuggestionTriggerSettings suggestion_trigger_settings = 10; - - // Configs of query. - SuggestionQueryConfig query_config = 6; - - // Configs of custom conversation model. - ConversationModelConfig conversation_model_config = 7; - } - - // Detail human agent assistant config. - message SuggestionConfig { - // Configuration of different suggestion features. One feature can have only - // one config. - repeated SuggestionFeatureConfig feature_configs = 2; - - // If `group_suggestion_responses` is false, and there are multiple - // `feature_configs` in `event based suggestion` or - // StreamingAnalyzeContent, we will try to deliver suggestions to customers - // as soon as we get new suggestion. Different type of suggestions based on - // the same context will be in separate Pub/Sub event or - // `StreamingAnalyzeContentResponse`. - // - // If `group_suggestion_responses` set to true. All the suggestions to the - // same participant based on the same context will be grouped into a single - // Pub/Sub event or StreamingAnalyzeContentResponse. - bool group_suggestion_responses = 3; - } - - // Config for suggestion query. - message SuggestionQueryConfig { - // Knowledge base source settings. - // - // Supported features: ARTICLE_SUGGESTION, FAQ. - message KnowledgeBaseQuerySource { - // Required. Knowledge bases to query. Format: - // `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge - // bases are supported. - repeated string knowledge_bases = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; - } - - // Document source settings. - // - // Supported features: SMART_REPLY, SMART_COMPOSE. - message DocumentQuerySource { - // Required. Knowledge documents to query from. Format: - // `projects//locations//knowledgeBases//documents/`. - // Currently, at most 5 documents are supported. - repeated string documents = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Document" - } - ]; - } - - // Dialogflow source setting. - // - // Supported feature: DIALOGFLOW_ASSIST. - message DialogflowQuerySource { - // Required. The name of a Dialogflow virtual agent used for end user side intent - // detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in - // the same Dialogflow project. - string agent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Agent" - } - ]; - } - - // Settings that determine how to filter recent conversation context when - // generating suggestions. - message ContextFilterSettings { - // If set to true, the last message from virtual agent (hand off message) - // and the message before it (trigger message of hand off) are dropped. - bool drop_handoff_messages = 1; - - // If set to true, all messages from virtual agent are dropped. - bool drop_virtual_agent_messages = 2; - - // If set to true, all messages from ivr stage are dropped. - bool drop_ivr_messages = 3; - } - - // Source of query. - oneof query_source { - // Query from knowledgebase. It is used by: - // ARTICLE_SUGGESTION, FAQ. - KnowledgeBaseQuerySource knowledge_base_query_source = 1; - - // Query from knowledge base document. It is used by: - // SMART_REPLY, SMART_COMPOSE. - DocumentQuerySource document_query_source = 2; - - // Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. - DialogflowQuerySource dialogflow_query_source = 3; - } - - // Maximum number of results to return. Currently, if unset, defaults to 10. - // And the max number is 20. - int32 max_results = 4; - - // Confidence threshold of query result. - // - // Agent Assist gives each suggestion a score in the range [0.0, 1.0], based - // on the relevance between the suggestion and the current conversation - // context. A score of 0.0 has no relevance, while a score of 1.0 has high - // relevance. Only suggestions with a score greater than or equal to the - // value of this field are included in the results. - // - // For a baseline model (the default), the recommended value is in the range - // [0.05, 0.1]. - // - // For a custom model, there is no recommended value. Tune this value by - // starting from a very low value and slowly increasing until you have - // desired results. - // - // If this field is not set, it defaults to 0.0, which means that all - // suggestions are returned. - // - // Supported features: ARTICLE_SUGGESTION. - float confidence_threshold = 5; - - // Determines how recent conversation context is filtered when generating - // suggestions. If unspecified, no messages will be dropped. - ContextFilterSettings context_filter_settings = 7; - } - - // Custom conversation models used in agent assist feature. - // - // Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY. - message ConversationModelConfig { - // Required. Conversation model resource name. Format: `projects//conversationModels/`. - string model = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - } - - // Configuration for analyses to run on each conversation message. - message MessageAnalysisConfig { - // Enable entity extraction in conversation messages on [agent assist - // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - // If unspecified, defaults to false. - bool enable_entity_extraction = 2; - - // Enable sentiment analysis in conversation messages on [agent assist - // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - // If unspecified, defaults to false. Sentiment analysis inspects user input - // and identifies the prevailing subjective opinion, especially to determine - // a user's attitude as positive, negative, or neutral: - // https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - // For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in - // [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. - // For [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] method, result will be in - // [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] - // For [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] method, result will be in - // [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] - // If Pub/Sub notification is configured, result will be in - // [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload]. - bool enable_sentiment_analysis = 3; - } - - // Pub/Sub topic on which to publish new agent assistant events. - NotificationConfig notification_config = 2; - - // Configuration for agent assistance of human agent participant. - SuggestionConfig human_agent_suggestion_config = 3; - - // Configuration for agent assistance of end user participant. - SuggestionConfig end_user_suggestion_config = 4; - - // Configuration for message analysis. - MessageAnalysisConfig message_analysis_config = 5; -} - -// Defines the hand off to a live agent, typically on which external agent -// service provider to connect to a conversation. -message HumanAgentHandoffConfig { - // Configuration specific to LivePerson (https://www.liveperson.com). - message LivePersonConfig { - // Required. Account number of the LivePerson account to connect. This is - // the account number you input at the login page. - string account_number = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Configuration specific to Salesforce Live Agent. - message SalesforceLiveAgentConfig { - // Required. The organization ID of the Salesforce account. - string organization_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Live Agent deployment ID. - string deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Live Agent chat button ID. - string button_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Domain of the Live Agent endpoint for this agent. You can find - // the endpoint URL in the `Live Agent settings` page. For example if URL - // has the form https://d.la4-c2-phx.salesforceliveagent.com/..., - // you should fill in d.la4-c2-phx.salesforceliveagent.com. - string endpoint_domain = 4 [(google.api.field_behavior) = REQUIRED]; - } - - // Required. Specifies which agent service to connect for human agent handoff. - oneof agent_service { - // Uses LivePerson (https://www.liveperson.com). - LivePersonConfig live_person_config = 1; - - // Uses Salesforce Live Agent. - SalesforceLiveAgentConfig salesforce_live_agent_config = 2; - } -} - -// Defines notification behavior. -message NotificationConfig { - // Format of cloud pub/sub message. - enum MessageFormat { - // If it is unspeified, PROTO will be used. - MESSAGE_FORMAT_UNSPECIFIED = 0; - - // Pubsub message will be serialized proto. - PROTO = 1; - - // Pubsub message will be json. - JSON = 2; - } - - // Name of the Pub/Sub topic to publish conversation - // events like - // [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] as - // serialized [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - // - // Notification works for phone calls, if this topic either is in the same - // project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service - // Agent` role in the topic project. - // - // Format: `projects//locations//topics/`. - string topic = 1; - - // Format of message. - MessageFormat message_format = 2; -} - -// Defines logging behavior for conversation lifecycle events. -message LoggingConfig { - // Whether to log conversation events like - // [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] to - // Stackdriver in the conversation project as JSON format - // [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos. - bool enable_stackdriver_logging = 3; -} - -// The type of Human Agent Assistant API suggestion to perform, and the maximum -// number of results to return for that type. Multiple `Feature` objects can -// be specified in the `features` list. -message SuggestionFeature { - // Defines the type of Human Agent Assistant feature. - enum Type { - // Unspecified feature type. - TYPE_UNSPECIFIED = 0; - - // Run article suggestion model. - ARTICLE_SUGGESTION = 1; - - // Run FAQ model. - FAQ = 2; - } - - // Type of Human Agent Assistant API feature to request. - Type type = 1; -} diff --git a/google/cloud/dialogflow_v2/proto/document.proto b/google/cloud/dialogflow_v2/proto/document.proto deleted file mode 100644 index a3bc4b77b..000000000 --- a/google/cloud/dialogflow_v2/proto/document.proto +++ /dev/null @@ -1,410 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "DocumentProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing knowledge [Documents][google.cloud.dialogflow.v2.Document]. -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. - rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/knowledgeBases/*}/documents" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents" - } - additional_bindings { - get: "/v2/{parent=projects/*/agent/knowledgeBases/*}/documents" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified document. - rpc GetDocument(GetDocumentRequest) returns (Document) { - option (google.api.http) = { - get: "/v2/{name=projects/*/knowledgeBases/*/documents/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new document. - // - // Operation - rpc CreateDocument(CreateDocumentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/knowledgeBases/*}/documents" - body: "document" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents" - body: "document" - } - additional_bindings { - post: "/v2/{parent=projects/*/agent/knowledgeBases/*}/documents" - body: "document" - } - }; - option (google.api.method_signature) = "parent,document"; - option (google.longrunning.operation_info) = { - response_type: "Document" - metadata_type: "KnowledgeOperationMetadata" - }; - } - - // Deletes the specified document. - // - // Operation - rpc DeleteDocument(DeleteDocumentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/knowledgeBases/*/documents/*}" - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}" - } - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "KnowledgeOperationMetadata" - }; - } - - // Updates the specified document. - // - // Operation - rpc UpdateDocument(UpdateDocumentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v2/{document.name=projects/*/knowledgeBases/*/documents/*}" - body: "document" - additional_bindings { - patch: "/v2/{document.name=projects/*/locations/*/knowledgeBases/*/documents/*}" - body: "document" - } - additional_bindings { - patch: "/v2/{document.name=projects/*/agent/knowledgeBases/*/documents/*}" - body: "document" - } - }; - option (google.api.method_signature) = "document,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Document" - metadata_type: "KnowledgeOperationMetadata" - }; - } - - // Reloads the specified document from its specified source, content_uri or - // content. The previously loaded content of the document will be deleted. - // Note: Even when the content of the document has not changed, there still - // may be side effects because of internal implementation changes. - // - // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - // only use `projects.knowledgeBases.documents`. - // - // Operation - rpc ReloadDocument(ReloadDocumentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{name=projects/*/knowledgeBases/*/documents/*}:reload" - body: "*" - additional_bindings { - post: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:reload" - body: "*" - } - additional_bindings { - post: "/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload" - body: "*" - } - }; - option (google.api.method_signature) = "name,content_uri"; - option (google.longrunning.operation_info) = { - response_type: "Document" - metadata_type: "KnowledgeOperationMetadata" - }; - } -} - -// A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase]. -// -// For more information, see the [knowledge base -// guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). -// -// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; -// only use `projects.knowledgeBases.documents`. -message Document { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Document" - pattern: "projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}" - pattern: "projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document}" - }; - - // The status of a reload attempt. - message ReloadStatus { - // The time of a reload attempt. - // This reload may have been triggered automatically or manually and may - // not have succeeded. - google.protobuf.Timestamp time = 1; - - // The status of a reload attempt or the initial load. - google.rpc.Status status = 2; - } - - // The knowledge type of document content. - enum KnowledgeType { - // The type is unspecified or arbitrary. - KNOWLEDGE_TYPE_UNSPECIFIED = 0; - - // The document content contains question and answer pairs as either HTML or - // CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats - // may fail to be parsed. - // - // CSV must have questions in the first column and answers in the second, - // with no header. Because of this explicit format, they are always parsed - // accurately. - FAQ = 1; - - // Documents for which unstructured text is extracted and used for - // question answering. - EXTRACTIVE_QA = 2; - - // The entire document content as a whole can be used for query results. - // Only for Contact Center Solutions on Dialogflow. - ARTICLE_SUGGESTION = 3; - } - - // Optional. The document resource name. - // The name must be empty when creating a document. - // Format: `projects//locations//knowledgeBases//documents/`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The display name of the document. The name must be 1024 bytes or - // less; otherwise, the creation request fails. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The MIME type of this document. - string mime_type = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The knowledge type of document content. - repeated KnowledgeType knowledge_types = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. The source of this document. - oneof source { - // The URI where the file content is located. - // - // For documents stored in Google Cloud Storage, these URIs must have - // the form `gs:///`. - // - // NOTE: External URLs must correspond to public webpages, i.e., they must - // be indexed by Google Search. In particular, URLs for showing documents in - // Google Cloud Storage (i.e. the URL in your browser) are not supported. - // Instead use the `gs://` format URI described above. - string content_uri = 5; - - // The raw content of the document. This field is only permitted for - // EXTRACTIVE_QA and FAQ knowledge types. - bytes raw_content = 9; - } - - // Optional. If true, we try to automatically reload the document every day - // (at a time picked by the system). If false or unspecified, we don't try - // to automatically reload the document. - // - // Currently you can only enable automatic reload for documents sourced from - // a public url, see `source` field for the source types. - // - // Reload status can be tracked in `latest_reload_status`. If a reload - // fails, we will keep the document unchanged. - // - // If a reload fails with internal errors, the system will try to reload the - // document on the next day. - // If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the - // system will not try to reload the document anymore. You need to manually - // reload the document successfully by calling `ReloadDocument` and clear the - // errors. - bool enable_auto_reload = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time and status of the latest reload. - // This reload may have been triggered automatically or manually - // and may not have succeeded. - ReloadStatus latest_reload_status = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Metadata for the document. The metadata supports arbitrary - // key-value pairs. Suggested use cases include storing a document's title, - // an external URL distinct from the document's content_uri, etc. - // The max size of a `key` or a `value` of the metadata is 1024 bytes. - map metadata = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [Documents.GetDocument][google.cloud.dialogflow.v2.Documents.GetDocument]. -message GetDocumentRequest { - // Required. The name of the document to retrieve. - // Format `projects//locations//knowledgeBases//documents/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Document" - } - ]; -} - -// Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments]. -message ListDocumentsRequest { - // Required. The knowledge base to list all documents for. - // Format: `projects//locations//knowledgeBases/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Document" - } - ]; - - // The maximum number of items to return in a single page. By - // default 10 and at most 100. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments]. -message ListDocumentsResponse { - // The list of documents. - repeated Document documents = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2.Documents.CreateDocument]. -message CreateDocumentRequest { - // Required. The knowledge base to create a document for. - // Format: `projects//locations//knowledgeBases/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Document" - } - ]; - - // Required. The document to create. - Document document = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2.Documents.DeleteDocument]. -message DeleteDocumentRequest { - // Required. The name of the document to delete. - // Format: `projects//locations//knowledgeBases//documents/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Document" - } - ]; -} - -// Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2.Documents.UpdateDocument]. -message UpdateDocumentRequest { - // Required. The document to update. - Document document = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Not specified means `update all`. - // Currently, only `display_name` can be updated, an InvalidArgument will be - // returned for attempting to update other fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2.Documents.ReloadDocument]. -message ReloadDocumentRequest { - // Required. The name of the document to reload. - // Format: `projects//locations//knowledgeBases//documents/` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Document" - } - ]; - - // The source for document reloading. - // If provided, the service will load the contents from the source - // and update document in the knowledge base. - oneof source { - // Optional. The path of gcs source file for reloading document content. For now, - // only gcs uri is supported. - // - // For documents stored in Google Cloud Storage, these URIs must have - // the form `gs:///`. - string content_uri = 3 [(google.api.field_behavior) = OPTIONAL]; - } -} - -// Metadata in google::longrunning::Operation for Knowledge operations. -message KnowledgeOperationMetadata { - // States of the operation. - enum State { - // State unspecified. - STATE_UNSPECIFIED = 0; - - // The operation has been created. - PENDING = 1; - - // The operation is currently running. - RUNNING = 2; - - // The operation is done, either cancelled or completed. - DONE = 3; - } - - // Output only. The current state of this operation. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/google/cloud/dialogflow_v2/proto/entity_type.proto b/google/cloud/dialogflow_v2/proto/entity_type.proto deleted file mode 100644 index c15b5a188..000000000 --- a/google/cloud/dialogflow_v2/proto/entity_type.proto +++ /dev/null @@ -1,547 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "EntityTypeProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType]. -service EntityTypes { - 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 entity types in the specified agent. - rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/agent}/entityTypes" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/agent}/entityTypes" - } - }; - option (google.api.method_signature) = "parent"; - option (google.api.method_signature) = "parent,language_code"; - } - - // Retrieves the specified entity type. - rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { - option (google.api.http) = { - get: "/v2/{name=projects/*/agent/entityTypes/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/agent/entityTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - option (google.api.method_signature) = "name,language_code"; - } - - // Creates an entity type in the specified agent. - rpc CreateEntityType(CreateEntityTypeRequest) returns (EntityType) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent}/entityTypes" - body: "entity_type" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent}/entityTypes" - body: "entity_type" - } - }; - option (google.api.method_signature) = "parent,entity_type"; - option (google.api.method_signature) = "parent,entity_type,language_code"; - } - - // Updates the specified entity type. - rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) { - option (google.api.http) = { - patch: "/v2/{entity_type.name=projects/*/agent/entityTypes/*}" - body: "entity_type" - additional_bindings { - patch: "/v2/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}" - body: "entity_type" - } - }; - option (google.api.method_signature) = "entity_type"; - option (google.api.method_signature) = "entity_type,language_code"; - } - - // Deletes the specified entity type. - rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/agent/entityTypes/*}" - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/agent/entityTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Updates/Creates multiple entity types in the specified agent. - // - // Operation - rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent}/entityTypes:batchUpdate" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate" - body: "*" - } - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse" - metadata_type: "google.protobuf.Struct" - }; - } - - // Deletes entity types in the specified agent. - // - // Operation - rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent}/entityTypes:batchDelete" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete" - body: "*" - } - }; - option (google.api.method_signature) = "parent,entity_type_names"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Creates multiple new entities in the specified entity type. - // - // Operation - rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate" - body: "*" - } - }; - option (google.api.method_signature) = "parent,entities"; - option (google.api.method_signature) = "parent,entities,language_code"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Updates or creates multiple entities in the specified entity type. This - // method does not affect entities in the entity type that aren't explicitly - // specified in the request. - // - // - // Operation - rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate" - body: "*" - } - }; - option (google.api.method_signature) = "parent,entities"; - option (google.api.method_signature) = "parent,entities,language_code"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Deletes entities in the specified entity type. - // - // - // Operation - rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete" - body: "*" - } - }; - option (google.api.method_signature) = "parent,entity_values"; - option (google.api.method_signature) = "parent,entity_values,language_code"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } -} - -// Each intent parameter has a type, called the entity type, which dictates -// exactly how data from an end-user expression is extracted. -// -// Dialogflow provides predefined system entities that can match many common -// types of data. For example, there are system entities for matching dates, -// times, colors, email addresses, and so on. You can also create your own -// custom entities for matching custom data. For example, you could define a -// vegetable entity that can match the types of vegetables available for -// purchase with a grocery store agent. -// -// For more information, see the -// [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview). -message EntityType { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/EntityType" - pattern: "projects/{project}/agent/entityTypes/{entity_type}" - }; - - // An **entity entry** for an associated entity type. - message Entity { - // Required. The primary value associated with this entity entry. - // For example, if the entity type is *vegetable*, the value could be - // *scallions*. - // - // For `KIND_MAP` entity types: - // - // * A reference value to be used in place of synonyms. - // - // For `KIND_LIST` entity types: - // - // * A string that can contain references to other entity types (with or - // without aliases). - string value = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. A collection of value synonyms. For example, if the entity type - // is *vegetable*, and `value` is *scallions*, a synonym could be *green - // onions*. - // - // For `KIND_LIST` entity types: - // - // * This collection must contain exactly one synonym equal to `value`. - repeated string synonyms = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Represents kinds of entities. - enum Kind { - // Not specified. This value should be never used. - KIND_UNSPECIFIED = 0; - - // Map entity types allow mapping of a group of synonyms to a reference - // value. - KIND_MAP = 1; - - // List entity types contain a set of entries that do not map to reference - // values. However, list entity types can contain references to other entity - // types (with or without aliases). - KIND_LIST = 2; - - // Regexp entity types allow to specify regular expressions in entries - // values. - KIND_REGEXP = 3; - } - - // Represents different entity type expansion modes. Automated expansion - // allows an agent to recognize values that have not been explicitly listed in - // the entity (for example, new kinds of shopping list items). - enum AutoExpansionMode { - // Auto expansion disabled for the entity. - AUTO_EXPANSION_MODE_UNSPECIFIED = 0; - - // Allows an agent to recognize values that have not been explicitly - // listed in the entity. - AUTO_EXPANSION_MODE_DEFAULT = 1; - } - - // The unique identifier of the entity type. - // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and - // [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods. - // Format: `projects//agent/entityTypes/`. - string name = 1; - - // Required. The name of the entity type. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Indicates the kind of entity type. - Kind kind = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Indicates whether the entity type can be automatically - // expanded. - AutoExpansionMode auto_expansion_mode = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of entity entries associated with the entity type. - repeated Entity entities = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Enables fuzzy entity extraction during classification. - bool enable_fuzzy_extraction = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. -message ListEntityTypesRequest { - // Required. The agent to list all entity types from. - // Format: `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. -message ListEntityTypesResponse { - // The list of agent entity types. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated EntityType entity_types = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType]. -message GetEntityTypeRequest { - // Required. The name of the entity type. - // Format: `projects//agent/entityTypes/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType]. -message CreateEntityTypeRequest { - // Required. The agent to create a entity type for. - // Format: `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The entity type to create. - EntityType entity_type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]. -message UpdateEntityTypeRequest { - // Required. The entity type to update. - EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType]. -message DeleteEntityTypeRequest { - // Required. The name of the entity type to delete. - // Format: `projects//agent/entityTypes/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; -} - -// The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. -message BatchUpdateEntityTypesRequest { - // Required. The name of the agent to update or create entity types in. - // Format: `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // The source of the entity type batch. - // - // For each entity type in the batch: - // - // * If `name` is specified, we update an existing entity type. - // * If `name` is not specified, we create a new entity type. - oneof entity_type_batch { - // The URI to a Google Cloud Storage file containing entity types to update - // or create. The file format can either be a serialized proto (of - // EntityBatch type) or a JSON object. Note: The URI must start with - // "gs://". - string entity_type_batch_uri = 2; - - // The collection of entity types to update or create. - EntityTypeBatch entity_type_batch_inline = 3; - } - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. -message BatchUpdateEntityTypesResponse { - // The collection of updated or created entity types. - repeated EntityType entity_types = 1; -} - -// The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes]. -message BatchDeleteEntityTypesRequest { - // Required. The name of the agent to delete all entities types for. Format: - // `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The names entity types to delete. All names must point to the - // same agent as `parent`. - repeated string entity_type_names = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities]. -message BatchCreateEntitiesRequest { - // Required. The name of the entity type to create entities in. Format: - // `projects//agent/entityTypes/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The entities to create. - repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities]. -message BatchUpdateEntitiesRequest { - // Required. The name of the entity type to update or create entities in. - // Format: `projects//agent/entityTypes/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The entities to update or create. - repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities]. -message BatchDeleteEntitiesRequest { - // Required. The name of the entity type to delete entries for. Format: - // `projects//agent/entityTypes/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The reference `values` of the entities to delete. Note that - // these are not fully-qualified names, i.e. they don't start with - // `projects/`. - repeated string entity_values = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// This message is a wrapper around a collection of entity types. -message EntityTypeBatch { - // A collection of entity types. - repeated EntityType entity_types = 1; -} diff --git a/google/cloud/dialogflow_v2/proto/environment.proto b/google/cloud/dialogflow_v2/proto/environment.proto deleted file mode 100644 index db8885425..000000000 --- a/google/cloud/dialogflow_v2/proto/environment.proto +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2; - -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/api/client.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "EnvironmentProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [Environments][google.cloud.dialogflow.v2.Environment]. -service Environments { - 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 non-draft environments of the specified agent. - rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/agent}/environments" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/agent}/environments" - } - }; - } -} - -// You can create multiple versions of your agent and publish them to separate -// environments. -// -// When you edit an agent, you are editing the draft agent. At any point, you -// can save the draft agent as an agent version, which is an immutable snapshot -// of your agent. -// -// When you save the draft agent, it is published to the default environment. -// When you create agent versions, you can publish them to custom environments. -// You can create a variety of custom environments for: -// -// - testing -// - development -// - production -// - etc. -// -// For more information, see the [versions and environments -// guide](https://cloud.google.com/dialogflow/docs/agents-versions). -message Environment { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Environment" - pattern: "projects/{project}/agent/environments/{environment}" - }; - - // Represents an environment state. When an environment is pointed to a new - // agent version, the environment is temporarily set to the `LOADING` state. - // During that time, the environment keeps on serving the previous version of - // the agent. After the new agent version is done loading, the environment is - // set back to the `RUNNING` state. - enum State { - // Not specified. This value is not used. - STATE_UNSPECIFIED = 0; - - // Stopped. - STOPPED = 1; - - // Loading. - LOADING = 2; - - // Running. - RUNNING = 3; - } - - // Output only. The unique identifier of this agent environment. - // Format: `projects//agent/environments/`. - // For Environment ID, "-" is reserved for 'draft' environment. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The developer-provided description for this environment. - // The maximum length is 500 characters. If exceeded, the request is rejected. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The agent version loaded into this environment. - // Format: `projects//agent/versions/`. - string agent_version = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The state of this environment. This field is read-only, i.e., it cannot be - // set by create and update methods. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update time of this environment. This field is read-only, i.e., it - // cannot be set by create and update methods. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. -message ListEnvironmentsRequest { - // Required. The agent to list all environments from. - // Format: `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Environment" - } - ]; - - // Optional. The maximum number of items to return in a single page. By default 100 and - // at most 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. -message ListEnvironmentsResponse { - // The list of agent environments. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated Environment environments = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} diff --git a/google/cloud/dialogflow_v2/proto/gcs.proto b/google/cloud/dialogflow_v2/proto/gcs.proto deleted file mode 100644 index 1fb2dc99c..000000000 --- a/google/cloud/dialogflow_v2/proto/gcs.proto +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2; - -import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "GcsProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; diff --git a/google/cloud/dialogflow_v2/proto/human_agent_assistant_event.proto b/google/cloud/dialogflow_v2/proto/human_agent_assistant_event.proto deleted file mode 100644 index f79ce9d46..000000000 --- a/google/cloud/dialogflow_v2/proto/human_agent_assistant_event.proto +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2; - -import "google/cloud/dialogflow/v2/participant.proto"; -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "HumanAgentAssistantEventProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Represents a notification sent to Cloud Pub/Sub subscribers for -// human agent assistant events in a specific conversation. -message HumanAgentAssistantEvent { - // The conversation this notification refers to. - // Format: `projects//conversations/`. - string conversation = 1; - - // The participant that the suggestion is compiled for. - // Format: `projects//conversations//participants/`. It will not be set in legacy workflow. - string participant = 3; - - // The suggestion results payload that this notification refers to. - repeated SuggestionResult suggestion_results = 5; -} diff --git a/google/cloud/dialogflow_v2/proto/intent.proto b/google/cloud/dialogflow_v2/proto/intent.proto deleted file mode 100644 index b61109585..000000000 --- a/google/cloud/dialogflow_v2/proto/intent.proto +++ /dev/null @@ -1,1067 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "IntentProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [Intents][google.cloud.dialogflow.v2.Intent]. -service Intents { - 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 intents in the specified agent. - rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/agent}/intents" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/agent}/intents" - } - additional_bindings { - get: "/v2/{parent=projects/*/agent/environments/*}/intents" - } - }; - option (google.api.method_signature) = "parent"; - option (google.api.method_signature) = "parent,language_code"; - } - - // Retrieves the specified intent. - rpc GetIntent(GetIntentRequest) returns (Intent) { - option (google.api.http) = { - get: "/v2/{name=projects/*/agent/intents/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/agent/intents/*}" - } - }; - option (google.api.method_signature) = "name"; - option (google.api.method_signature) = "name,language_code"; - } - - // Creates an intent in the specified agent. - rpc CreateIntent(CreateIntentRequest) returns (Intent) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent}/intents" - body: "intent" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent}/intents" - body: "intent" - } - }; - option (google.api.method_signature) = "parent,intent"; - option (google.api.method_signature) = "parent,intent,language_code"; - } - - // Updates the specified intent. - rpc UpdateIntent(UpdateIntentRequest) returns (Intent) { - option (google.api.http) = { - patch: "/v2/{intent.name=projects/*/agent/intents/*}" - body: "intent" - additional_bindings { - patch: "/v2/{intent.name=projects/*/locations/*/agent/intents/*}" - body: "intent" - } - }; - option (google.api.method_signature) = "intent,language_code"; - option (google.api.method_signature) = "intent,language_code,update_mask"; - } - - // Deletes the specified intent and its direct or indirect followup intents. - rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/agent/intents/*}" - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/agent/intents/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Updates/Creates multiple intents in the specified agent. - // - // Operation - rpc BatchUpdateIntents(BatchUpdateIntentsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent}/intents:batchUpdate" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent}/intents:batchUpdate" - body: "*" - } - }; - option (google.api.method_signature) = "parent,intent_batch_uri"; - option (google.api.method_signature) = "parent,intent_batch_inline"; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.dialogflow.v2.BatchUpdateIntentsResponse" - metadata_type: "google.protobuf.Struct" - }; - } - - // Deletes intents in the specified agent. - // - // Operation - rpc BatchDeleteIntents(BatchDeleteIntentsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent}/intents:batchDelete" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent}/intents:batchDelete" - body: "*" - } - }; - option (google.api.method_signature) = "parent,intents"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } -} - -// An intent categorizes an end-user's intention for one conversation turn. For -// each agent, you define many intents, where your combined intents can handle a -// complete conversation. When an end-user writes or says something, referred to -// as an end-user expression or end-user input, Dialogflow matches the end-user -// input to the best intent in your agent. Matching an intent is also known as -// intent classification. -// -// For more information, see the [intent -// guide](https://cloud.google.com/dialogflow/docs/intents-overview). -message Intent { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Intent" - pattern: "projects/{project}/agent/intents/{intent}" - }; - - // Represents an example that the agent is trained on. - message TrainingPhrase { - // Represents a part of a training phrase. - message Part { - // Required. The text for this part. - string text = 1; - - // Optional. The entity type name prefixed with `@`. - // This field is required for annotated parts of the training phrase. - string entity_type = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The parameter name for the value extracted from the - // annotated part of the example. - // This field is required for annotated parts of the training phrase. - string alias = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates whether the text was manually annotated. - // This field is set to true when the Dialogflow Console is used to - // manually annotate the part. When creating an annotated part with the - // API, you must set this to true. - bool user_defined = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Represents different types of training phrases. - enum Type { - // Not specified. This value should never be used. - TYPE_UNSPECIFIED = 0; - - // Examples do not contain @-prefixed entity type names, but example parts - // can be annotated with entity types. - EXAMPLE = 1; - - // Templates are not annotated with entity types, but they can contain - // @-prefixed entity type names as substrings. - // Template mode has been deprecated. Example mode is the only supported - // way to create new training phrases. If you have existing training - // phrases that you've created in template mode, those will continue to - // work. - TEMPLATE = 2 [deprecated = true]; - } - - // Output only. The unique identifier of this training phrase. - string name = 1; - - // Required. The type of the training phrase. - Type type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ordered list of training phrase parts. - // The parts are concatenated in order to form the training phrase. - // - // Note: The API does not automatically annotate training phrases like the - // Dialogflow Console does. - // - // Note: Do not forget to include whitespace at part boundaries, - // so the training phrase is well formatted when the parts are concatenated. - // - // If the training phrase does not need to be annotated with parameters, - // you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set. - // - // If you want to annotate the training phrase, you must create multiple - // parts, where the fields of each part are populated in one of two ways: - // - // - `Part.text` is set to a part of the phrase that has no parameters. - // - `Part.text` is set to a part of the phrase that you want to annotate, - // and the `entity_type`, `alias`, and `user_defined` fields are all - // set. - repeated Part parts = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Indicates how many times this example was added to - // the intent. Each time a developer adds an existing sample by editing an - // intent or training, this counter is increased. - int32 times_added_count = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Represents intent parameters. - message Parameter { - // The unique identifier of this parameter. - string name = 1; - - // Required. The name of the parameter. - string display_name = 2; - - // Optional. The definition of the parameter value. It can be: - // - // - a constant string, - // - a parameter value defined as `$parameter_name`, - // - an original parameter value defined as `$parameter_name.original`, - // - a parameter value from some context defined as - // `#context_name.parameter_name`. - string value = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The default value to use when the `value` yields an empty - // result. - // Default values can be extracted from contexts by using the following - // syntax: `#context_name.parameter_name`. - string default_value = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the entity type, prefixed with `@`, that - // describes values of the parameter. If the parameter is - // required, this must be provided. - string entity_type_display_name = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates whether the parameter is required. That is, - // whether the intent cannot be completed without collecting the parameter - // value. - bool mandatory = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of prompts that the agent can present to the - // user in order to collect a value for the parameter. - repeated string prompts = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates whether the parameter represents a list of values. - bool is_list = 8 [(google.api.field_behavior) = OPTIONAL]; - } - - // A rich response message. - // Corresponds to the intent `Response` field in the Dialogflow console. - // For more information, see - // [Rich response - // messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages). - message Message { - // The text response message. - message Text { - // Optional. The collection of the agent's responses. - repeated string text = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // The image response message. - message Image { - // Optional. The public URI to an image file. - string image_uri = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A text description of the image to be used for accessibility, - // e.g., screen readers. - string accessibility_text = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // The quick replies response message. - message QuickReplies { - // Optional. The title of the collection of quick replies. - string title = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of quick replies. - repeated string quick_replies = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // The card response message. - message Card { - // Contains information about a button. - message Button { - // Optional. The text to show on the button. - string text = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The text to send back to the Dialogflow API or a URI to - // open. - string postback = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. The title of the card. - string title = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The subtitle of the card. - string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The public URI to an image file for the card. - string image_uri = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of card buttons. - repeated Button buttons = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // The simple response message containing speech or text. - message SimpleResponse { - // One of text_to_speech or ssml must be provided. The plain text of the - // speech output. Mutually exclusive with ssml. - string text_to_speech = 1; - - // One of text_to_speech or ssml must be provided. Structured spoken - // response to the user in the SSML format. Mutually exclusive with - // text_to_speech. - string ssml = 2; - - // Optional. The text to display. - string display_text = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // The collection of simple response candidates. - // This message in `QueryResult.fulfillment_messages` and - // `WebhookResponse.fulfillment_messages` should contain only one - // `SimpleResponse`. - message SimpleResponses { - // Required. The list of simple responses. - repeated SimpleResponse simple_responses = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // The basic card message. Useful for displaying information. - message BasicCard { - // The button object that appears at the bottom of a card. - message Button { - // Opens the given URI. - message OpenUriAction { - // Required. The HTTP or HTTPS scheme URI. - string uri = 1; - } - - // Required. The title of the button. - string title = 1; - - // Required. Action to take when a user taps on the button. - OpenUriAction open_uri_action = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Optional. The title of the card. - string title = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The subtitle of the card. - string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required, unless image is present. The body text of the card. - string formatted_text = 3; - - // Optional. The image for the card. - Image image = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of card buttons. - repeated Button buttons = 5 [(google.api.field_behavior) = OPTIONAL]; - } - - // The suggestion chip message that the user can tap to quickly post a reply - // to the conversation. - message Suggestion { - // Required. The text shown the in the suggestion chip. - string title = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // The collection of suggestions. - message Suggestions { - // Required. The list of suggested replies. - repeated Suggestion suggestions = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // The suggestion chip message that allows the user to jump out to the app - // or website associated with this agent. - message LinkOutSuggestion { - // Required. The name of the app or site this chip is linking to. - string destination_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The URI of the app or site to open when the user taps the - // suggestion chip. - string uri = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // The card for presenting a list of options to select from. - message ListSelect { - // An item in the list. - message Item { - // Required. Additional information about this option. - SelectItemInfo info = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The title of the list item. - string title = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The main text describing the item. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The image to display. - Image image = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. The overall title of the list. - string title = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. List items. - repeated Item items = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Subtitle of the list. - string subtitle = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // The card for presenting a carousel of options to select from. - message CarouselSelect { - // An item in the carousel. - message Item { - // Required. Additional info about the option item. - SelectItemInfo info = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Title of the carousel item. - string title = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The body text of the card. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The image to display. - Image image = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. Carousel items. - repeated Item items = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Additional info about the select item for when it is triggered in a - // dialog. - message SelectItemInfo { - // Required. A unique key that will be sent back to the agent if this - // response is given. - string key = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A list of synonyms that can also be used to trigger this - // item in dialog. - repeated string synonyms = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // The media content card for Actions on Google. - message MediaContent { - // Response media object for media content card. - message ResponseMediaObject { - // Required. Name of media card. - string name = 1; - - // Optional. Description of media card. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Image to show with the media card. - oneof image { - // Optional. Image to display above media content. - Image large_image = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Icon to display above media content. - Image icon = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. Url where the media is stored. - string content_url = 5; - } - - // Format of response media type. - enum ResponseMediaType { - // Unspecified. - RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; - - // Response media type is audio. - AUDIO = 1; - } - - // Optional. What type of media is the content (ie "audio"). - ResponseMediaType media_type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. List of media objects. - repeated ResponseMediaObject media_objects = 2; - } - - // Browse Carousel Card for Actions on Google. - // https://developers.google.com/actions/assistant/responses#browsing_carousel - message BrowseCarouselCard { - // Browsing carousel tile - message BrowseCarouselCardItem { - // Actions on Google action to open a given url. - message OpenUrlAction { - // Type of the URI. - enum UrlTypeHint { - // Unspecified - URL_TYPE_HINT_UNSPECIFIED = 0; - - // Url would be an amp action - AMP_ACTION = 1; - - // URL that points directly to AMP content, or to a canonical URL - // which refers to AMP content via . - AMP_CONTENT = 2; - } - - // Required. URL - string url = 1; - - // Optional. Specifies the type of viewer that is used when opening - // the URL. Defaults to opening via web browser. - UrlTypeHint url_type_hint = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. Action to present to the user. - OpenUrlAction open_uri_action = 1; - - // Required. Title of the carousel item. Maximum of two lines of text. - string title = 2; - - // Optional. Description of the carousel item. Maximum of four lines of - // text. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Hero image for the carousel item. - Image image = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Text that appears at the bottom of the Browse Carousel - // Card. Maximum of one line of text. - string footer = 5 [(google.api.field_behavior) = OPTIONAL]; - } - - // Image display options for Actions on Google. This should be used for - // when the image's aspect ratio does not match the image container's - // aspect ratio. - enum ImageDisplayOptions { - // Fill the gaps between the image and the image container with gray - // bars. - IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; - - // Fill the gaps between the image and the image container with gray - // bars. - GRAY = 1; - - // Fill the gaps between the image and the image container with white - // bars. - WHITE = 2; - - // Image is scaled such that the image width and height match or exceed - // the container dimensions. This may crop the top and bottom of the - // image if the scaled image height is greater than the container - // height, or crop the left and right of the image if the scaled image - // width is greater than the container width. This is similar to "Zoom - // Mode" on a widescreen TV when playing a 4:3 video. - CROPPED = 3; - - // Pad the gaps between image and image frame with a blurred copy of the - // same image. - BLURRED_BACKGROUND = 4; - } - - // Required. List of items in the Browse Carousel Card. Minimum of two - // items, maximum of ten. - repeated BrowseCarouselCardItem items = 1; - - // Optional. Settings for displaying the image. Applies to every image in - // [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. - ImageDisplayOptions image_display_options = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Table card for Actions on Google. - message TableCard { - // Required. Title of the card. - string title = 1; - - // Optional. Subtitle to the title. - string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Image which should be displayed on the card. - Image image = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Display properties for the columns in this table. - repeated ColumnProperties column_properties = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Rows in this table of data. - repeated TableCardRow rows = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. List of buttons for the card. - repeated BasicCard.Button buttons = 6 [(google.api.field_behavior) = OPTIONAL]; - } - - // Column properties for [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. - message ColumnProperties { - // Text alignments within a cell. - enum HorizontalAlignment { - // Text is aligned to the leading edge of the column. - HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; - - // Text is aligned to the leading edge of the column. - LEADING = 1; - - // Text is centered in the column. - CENTER = 2; - - // Text is aligned to the trailing edge of the column. - TRAILING = 3; - } - - // Required. Column heading. - string header = 1; - - // Optional. Defines text alignment for all cells in this column. - HorizontalAlignment horizontal_alignment = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Row of [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. - message TableCardRow { - // Optional. List of cells that make up this row. - repeated TableCardCell cells = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether to add a visual divider after this row. - bool divider_after = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Cell of [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.TableCardRow]. - message TableCardCell { - // Required. Text in this cell. - string text = 1; - } - - // The rich response message integration platform. See - // [Integrations](https://cloud.google.com/dialogflow/docs/integrations). - enum Platform { - // Default platform. - PLATFORM_UNSPECIFIED = 0; - - // Facebook. - FACEBOOK = 1; - - // Slack. - SLACK = 2; - - // Telegram. - TELEGRAM = 3; - - // Kik. - KIK = 4; - - // Skype. - SKYPE = 5; - - // Line. - LINE = 6; - - // Viber. - VIBER = 7; - - // Google Assistant - // See [Dialogflow webhook - // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) - ACTIONS_ON_GOOGLE = 8; - - // Google Hangouts. - GOOGLE_HANGOUTS = 11; - } - - // Required. The rich response message. - oneof message { - // The text response. - Text text = 1; - - // The image response. - Image image = 2; - - // The quick replies response. - QuickReplies quick_replies = 3; - - // The card response. - Card card = 4; - - // A custom platform-specific response. - google.protobuf.Struct payload = 5; - - // The voice and text-only responses for Actions on Google. - SimpleResponses simple_responses = 7; - - // The basic card response for Actions on Google. - BasicCard basic_card = 8; - - // The suggestion chips for Actions on Google. - Suggestions suggestions = 9; - - // The link out suggestion chip for Actions on Google. - LinkOutSuggestion link_out_suggestion = 10; - - // The list card response for Actions on Google. - ListSelect list_select = 11; - - // The carousel card response for Actions on Google. - CarouselSelect carousel_select = 12; - - // Browse carousel card for Actions on Google. - BrowseCarouselCard browse_carousel_card = 22; - - // Table card for Actions on Google. - TableCard table_card = 23; - - // The media content card for Actions on Google. - MediaContent media_content = 24; - } - - // Optional. The platform that this message is intended for. - Platform platform = 6 [(google.api.field_behavior) = OPTIONAL]; - } - - // Represents a single followup intent in the chain. - message FollowupIntentInfo { - // The unique identifier of the followup intent. - // Format: `projects//agent/intents/`. - string followup_intent_name = 1; - - // The unique identifier of the followup intent's parent. - // Format: `projects//agent/intents/`. - string parent_followup_intent_name = 2; - } - - // Represents the different states that webhooks can be in. - enum WebhookState { - // Webhook is disabled in the agent and in the intent. - WEBHOOK_STATE_UNSPECIFIED = 0; - - // Webhook is enabled in the agent and in the intent. - WEBHOOK_STATE_ENABLED = 1; - - // Webhook is enabled in the agent and in the intent. Also, each slot - // filling prompt is forwarded to the webhook. - WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; - } - - // Optional. The unique identifier of this intent. - // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] - // methods. - // Format: `projects//agent/intents/`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The name of this intent. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Indicates whether webhooks are enabled for the intent. - WebhookState webhook_state = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The priority of this intent. Higher numbers represent higher - // priorities. - // - // - If the supplied value is unspecified or 0, the service - // translates the value to 500,000, which corresponds to the - // `Normal` priority in the console. - // - If the supplied value is negative, the intent is ignored - // in runtime detect intent requests. - int32 priority = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates whether this is a fallback intent. - bool is_fallback = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates whether Machine Learning is disabled for the intent. - // Note: If `ml_disabled` setting is set to true, then this intent is not - // taken into account during inference in `ML ONLY` match mode. Also, - // auto-markup in the UI is turned off. - bool ml_disabled = 19 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates that a live agent should be brought in to handle the - // interaction with the user. In most cases, when you set this flag to true, - // you would also want to set end_interaction to true as well. Default is - // false. - bool live_agent_handoff = 20 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates that this intent ends an interaction. Some integrations - // (e.g., Actions on Google or Dialogflow phone gateway) use this information - // to close interaction with an end user. Default is false. - bool end_interaction = 21 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of context names required for this intent to be - // triggered. - // Format: `projects//agent/sessions/-/contexts/`. - repeated string input_context_names = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of event names that trigger the intent. - // If the collection of input contexts is not empty, all of the contexts must - // be present in the active user session for an event to trigger this intent. - // Event names are limited to 150 characters. - repeated string events = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of examples that the agent is - // trained on. - repeated TrainingPhrase training_phrases = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the action associated with the intent. - // Note: The action name must not contain whitespaces. - string action = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of contexts that are activated when the intent - // is matched. Context messages in this collection should not set the - // parameters field. Setting the `lifespan_count` to 0 will reset the context - // when the intent is matched. - // Format: `projects//agent/sessions/-/contexts/`. - repeated Context output_contexts = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates whether to delete all contexts in the current - // session when this intent is matched. - bool reset_contexts = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of parameters associated with the intent. - repeated Parameter parameters = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of rich messages corresponding to the - // `Response` field in the Dialogflow console. - repeated Message messages = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of platforms for which the first responses will be - // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). - repeated Message.Platform default_response_platforms = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Read-only. The unique identifier of the root intent in the chain of - // followup intents. It identifies the correct followup intents chain for - // this intent. We populate this field only in the output. - // - // Format: `projects//agent/intents/`. - string root_followup_intent_name = 16; - - // Read-only after creation. The unique identifier of the parent intent in the - // chain of followup intents. You can set this field when creating an intent, - // for example with [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or - // [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], in order to make this - // intent a followup intent. - // - // It identifies the parent followup intent. - // Format: `projects//agent/intents/`. - string parent_followup_intent_name = 17; - - // Read-only. Information about all followup intents that have this intent as - // a direct or indirect parent. We populate this field only in the output. - repeated FollowupIntentInfo followup_intent_info = 18; -} - -// The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. -message ListIntentsRequest { - // Required. The agent to list all intents from. - // Format: `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Intent" - } - ]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. -message ListIntentsResponse { - // The list of agent intents. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated Intent intents = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent]. -message GetIntentRequest { - // Required. The name of the intent. - // Format: `projects//agent/intents/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Intent" - } - ]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent]. -message CreateIntentRequest { - // Required. The agent to create a intent for. - // Format: `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Intent" - } - ]; - - // Required. The intent to create. - Intent intent = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent]. -message UpdateIntentRequest { - // Required. The intent to update. - Intent intent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent]. -message DeleteIntentRequest { - // Required. The name of the intent to delete. If this intent has direct or - // indirect followup intents, we also delete them. - // Format: `projects//agent/intents/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Intent" - } - ]; -} - -message BatchUpdateIntentsRequest { - // Required. The name of the agent to update or create intents in. - // Format: `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Intent" - } - ]; - - // The source of the intent batch. - oneof intent_batch { - // The URI to a Google Cloud Storage file containing intents to update or - // create. The file format can either be a serialized proto (of IntentBatch - // type) or JSON object. Note: The URI must start with "gs://". - string intent_batch_uri = 2; - - // The collection of intents to update or create. - IntentBatch intent_batch_inline = 3; - } - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]. -message BatchUpdateIntentsResponse { - // The collection of updated or created intents. - repeated Intent intents = 1; -} - -// The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents]. -message BatchDeleteIntentsRequest { - // Required. The name of the agent to delete all entities types for. Format: - // `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Intent" - } - ]; - - // Required. The collection of intents to delete. Only intent `name` must be - // filled in. - repeated Intent intents = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// This message is a wrapper around a collection of intents. -message IntentBatch { - // A collection of intents. - repeated Intent intents = 1; -} - -// Represents the options for views of an intent. -// An intent can be a sizable object. Therefore, we provide a resource view that -// does not return training phrases in the response by default. -enum IntentView { - // Training phrases field is not populated in the response. - INTENT_VIEW_UNSPECIFIED = 0; - - // All fields are populated. - INTENT_VIEW_FULL = 1; -} diff --git a/google/cloud/dialogflow_v2/proto/knowledge_base.proto b/google/cloud/dialogflow_v2/proto/knowledge_base.proto deleted file mode 100644 index 0b1aa8b3e..000000000 --- a/google/cloud/dialogflow_v2/proto/knowledge_base.proto +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "KnowledgeBaseProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [KnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBase]. -service KnowledgeBases { - 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 knowledge bases of the specified agent. - rpc ListKnowledgeBases(ListKnowledgeBasesRequest) returns (ListKnowledgeBasesResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*}/knowledgeBases" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/knowledgeBases" - } - additional_bindings { - get: "/v2/{parent=projects/*/agent}/knowledgeBases" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified knowledge base. - rpc GetKnowledgeBase(GetKnowledgeBaseRequest) returns (KnowledgeBase) { - option (google.api.http) = { - get: "/v2/{name=projects/*/knowledgeBases/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/knowledgeBases/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/agent/knowledgeBases/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a knowledge base. - rpc CreateKnowledgeBase(CreateKnowledgeBaseRequest) returns (KnowledgeBase) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/knowledgeBases" - body: "knowledge_base" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/knowledgeBases" - body: "knowledge_base" - } - additional_bindings { - post: "/v2/{parent=projects/*/agent}/knowledgeBases" - body: "knowledge_base" - } - }; - option (google.api.method_signature) = "parent,knowledge_base"; - } - - // Deletes the specified knowledge base. - rpc DeleteKnowledgeBase(DeleteKnowledgeBaseRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/knowledgeBases/*}" - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/knowledgeBases/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/agent/knowledgeBases/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Updates the specified knowledge base. - rpc UpdateKnowledgeBase(UpdateKnowledgeBaseRequest) returns (KnowledgeBase) { - option (google.api.http) = { - patch: "/v2/{knowledge_base.name=projects/*/knowledgeBases/*}" - body: "knowledge_base" - additional_bindings { - patch: "/v2/{knowledge_base.name=projects/*/locations/*/knowledgeBases/*}" - body: "knowledge_base" - } - additional_bindings { - patch: "/v2/{knowledge_base.name=projects/*/agent/knowledgeBases/*}" - body: "knowledge_base" - } - }; - option (google.api.method_signature) = "knowledge_base,update_mask"; - } -} - -// A knowledge base represents a collection of knowledge documents that you -// provide to Dialogflow. Your knowledge documents contain information that may -// be useful during conversations with end-users. Some Dialogflow features use -// knowledge bases when looking for a response to an end-user input. -// -// For more information, see the [knowledge base -// guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). -// -// Note: The `projects.agent.knowledgeBases` resource is deprecated; -// only use `projects.knowledgeBases`. -message KnowledgeBase { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/KnowledgeBase" - pattern: "projects/{project}/knowledgeBases/{knowledge_base}" - pattern: "projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}" - }; - - // The knowledge base resource name. - // The name must be empty when creating a knowledge base. - // Format: `projects//locations//knowledgeBases/`. - string name = 1; - - // Required. The display name of the knowledge base. The name must be 1024 - // bytes or less; otherwise, the creation request fails. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Language which represents the KnowledgeBase. When the KnowledgeBase is - // created/updated, expect this to be present for non en-us languages. When - // unspecified, the default language code en-us applies. - string language_code = 4; -} - -// Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases]. -message ListKnowledgeBasesRequest { - // Required. The project to list of knowledge bases for. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; - - // The maximum number of items to return in a single page. By - // default 10 and at most 100. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases]. -message ListKnowledgeBasesResponse { - // The list of knowledge bases. - repeated KnowledgeBase knowledge_bases = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.GetKnowledgeBase]. -message GetKnowledgeBaseRequest { - // Required. The name of the knowledge base to retrieve. - // Format `projects//locations//knowledgeBases/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; -} - -// Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.CreateKnowledgeBase]. -message CreateKnowledgeBaseRequest { - // Required. The project to create a knowledge base for. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; - - // Required. The knowledge base to create. - KnowledgeBase knowledge_base = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.DeleteKnowledgeBase]. -message DeleteKnowledgeBaseRequest { - // Required. The name of the knowledge base to delete. - // Format: `projects//locations//knowledgeBases/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; - - // Optional. Force deletes the knowledge base. When set to true, any documents - // in the knowledge base are also deleted. - bool force = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.UpdateKnowledgeBase]. -message UpdateKnowledgeBaseRequest { - // Required. The knowledge base to update. - KnowledgeBase knowledge_base = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Not specified means `update all`. - // Currently, only `display_name` can be updated, an InvalidArgument will be - // returned for attempting to update other fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/google/cloud/dialogflow_v2/proto/participant.proto b/google/cloud/dialogflow_v2/proto/participant.proto deleted file mode 100644 index 91aa04543..000000000 --- a/google/cloud/dialogflow_v2/proto/participant.proto +++ /dev/null @@ -1,588 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/session.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ParticipantProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [Participants][google.cloud.dialogflow.v2.Participant]. -service Participants { - 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"; - - // Creates a new participant in a conversation. - rpc CreateParticipant(CreateParticipantRequest) returns (Participant) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/conversations/*}/participants" - body: "participant" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/conversations/*}/participants" - body: "participant" - } - }; - option (google.api.method_signature) = "parent,participant"; - } - - // Retrieves a conversation participant. - rpc GetParticipant(GetParticipantRequest) returns (Participant) { - option (google.api.http) = { - get: "/v2/{name=projects/*/conversations/*/participants/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/conversations/*/participants/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Returns the list of all participants in the specified conversation. - rpc ListParticipants(ListParticipantsRequest) returns (ListParticipantsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/conversations/*}/participants" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/conversations/*}/participants" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Updates the specified participant. - rpc UpdateParticipant(UpdateParticipantRequest) returns (Participant) { - option (google.api.http) = { - patch: "/v2/{participant.name=projects/*/conversations/*/participants/*}" - body: "participant" - additional_bindings { - patch: "/v2/{participant.name=projects/*/locations/*/conversations/*/participants/*}" - body: "participant" - } - }; - option (google.api.method_signature) = "participant,update_mask"; - } - - // Adds a text (chat, for example), or audio (phone recording, for example) - // message from a participant into the conversation. - // - // Note: Always use agent versions for production traffic - // sent to virtual agents. See [Versions and - // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - rpc AnalyzeContent(AnalyzeContentRequest) returns (AnalyzeContentResponse) { - option (google.api.http) = { - post: "/v2/{participant=projects/*/conversations/*/participants/*}:analyzeContent" - body: "*" - additional_bindings { - post: "/v2/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent" - body: "*" - } - }; - option (google.api.method_signature) = "participant,text_input"; - option (google.api.method_signature) = "participant,event_input"; - } - - // Gets suggested articles for a participant based on specific historical - // messages. - rpc SuggestArticles(SuggestArticlesRequest) returns (SuggestArticlesResponse) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets suggested faq answers for a participant based on specific historical - // messages. - rpc SuggestFaqAnswers(SuggestFaqAnswersRequest) returns (SuggestFaqAnswersResponse) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - } -} - -// Represents a conversation participant (human agent, virtual agent, end-user). -message Participant { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Participant" - pattern: "projects/{project}/conversations/{conversation}/participants/{participant}" - pattern: "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}" - }; - - // Enumeration of the roles a participant can play in a conversation. - enum Role { - // Participant role not set. - ROLE_UNSPECIFIED = 0; - - // Participant is a human agent. - HUMAN_AGENT = 1; - - // Participant is an automated agent, such as a Dialogflow agent. - AUTOMATED_AGENT = 2; - - // Participant is an end user that has called or chatted with - // Dialogflow services. - END_USER = 3; - } - - // Optional. The unique identifier of this participant. - // Format: `projects//locations//conversations//participants/`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Immutable. The role this participant plays in the conversation. This field must be set - // during participant creation and is then immutable. - Role role = 2 [(google.api.field_behavior) = IMMUTABLE]; - - // Optional. Label applied to streams representing this participant in SIPREC - // XML metadata and SDP. This is used to assign transcriptions from that - // media stream to this participant. This field can be updated. - string sip_recording_media_label = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Represents a message posted into a conversation. -message Message { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Message" - pattern: "projects/{project}/conversations/{conversation}/messages/{message}" - pattern: "projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}" - }; - - // The unique identifier of the message. - // Format: `projects//locations//conversations//messages/`. - string name = 1; - - // Required. The message content. - string content = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The message language. - // This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - // language tag. Example: "en-US". - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The participant that sends this message. - string participant = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The role of the participant. - Participant.Role participant_role = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the message was created. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The annotation for the message. - MessageAnnotation message_annotation = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for [Participants.CreateParticipant][google.cloud.dialogflow.v2.Participants.CreateParticipant]. -message CreateParticipantRequest { - // Required. Resource identifier of the conversation adding the participant. - // Format: `projects//locations//conversations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Participant" - } - ]; - - // Required. The participant to create. - Participant participant = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Participants.GetParticipant][google.cloud.dialogflow.v2.Participants.GetParticipant]. -message GetParticipantRequest { - // Required. The name of the participant. Format: - // `projects//locations//conversations//participants/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Participant" - } - ]; -} - -// The request message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants]. -message ListParticipantsRequest { - // Required. The conversation to list all participants from. - // Format: `projects//locations//conversations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Participant" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants]. -message ListParticipantsResponse { - // The list of participants. There is a maximum number of items - // returned based on the page_size field in the request. - repeated Participant participants = 1; - - // Token to retrieve the next page of results or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [Participants.UpdateParticipant][google.cloud.dialogflow.v2.Participants.UpdateParticipant]. -message UpdateParticipantRequest { - // Required. The participant to update. - Participant participant = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The mask to specify which fields to update. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]. -message AnalyzeContentRequest { - // Required. The name of the participant this text comes from. - // Format: `projects//locations//conversations//participants/`. - string participant = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Participant" - } - ]; - - // Required. The input content. - oneof input { - // The natural language text to be processed. - TextInput text_input = 6; - - // An input event to send to Dialogflow. - EventInput event_input = 8; - } - - // Speech synthesis configuration. - // The speech synthesis settings for a virtual agent that may be configured - // for the associated conversation profile are not used when calling - // AnalyzeContent. If this configuration is not supplied, speech synthesis - // is disabled. - OutputAudioConfig reply_audio_config = 5; - - // Parameters for a Dialogflow virtual-agent query. - QueryParameters query_params = 9; - - // A unique identifier for this request. Restricted to 36 ASCII characters. - // A random UUID is recommended. - // This request is only idempotent if a `request_id` is provided. - string request_id = 11; -} - -// The message in the response that indicates the parameters of DTMF. -message DtmfParameters { - // Indicates whether DTMF input can be handled in the next request. - bool accepts_dtmf_input = 1; -} - -// The response message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]. -message AnalyzeContentResponse { - // The output text content. - // This field is set if the automated agent responded with text to show to - // the user. - string reply_text = 1; - - // The audio data bytes encoded as specified in the request. - // This field is set if: - // - // - `reply_audio_config` was specified in the request, or - // - The automated agent responded with audio to play to the user. In such - // case, `reply_audio.config` contains settings used to synthesize the - // speech. - // - // In some scenarios, multiple output audio fields may be present in the - // response structure. In these cases, only the top-most-level audio output - // has content. - OutputAudio reply_audio = 2; - - // Only set if a Dialogflow automated agent has responded. - // Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - // and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - // are always empty, use [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] instead. - AutomatedAgentReply automated_agent_reply = 3; - - // Message analyzed by CCAI. - Message message = 5; - - // The suggestions for most recent human agent. The order is the same as - // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of - // [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. - repeated SuggestionResult human_agent_suggestion_results = 6; - - // The suggestions for end user. The order is the same as - // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of - // [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. - repeated SuggestionResult end_user_suggestion_results = 7; - - // Indicates the parameters of DTMF. - DtmfParameters dtmf_parameters = 9; -} - -// The request message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles]. -message SuggestArticlesRequest { - // Required. The name of the participant to fetch suggestion for. - // Format: `projects//locations//conversations//participants/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Participant" - } - ]; - - // The name of the latest conversation message to compile suggestion - // for. If empty, it will be the latest message of the conversation. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2 [(google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Message" - }]; - - // Max number of messages prior to and including - // [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] to use as context - // when compiling the suggestion. By default 20 and at most 50. - int32 context_size = 3; -} - -// The response message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles]. -message SuggestArticlesResponse { - // Articles ordered by score in descending order. - repeated ArticleAnswer article_answers = 1; - - // The name of the latest conversation message used to compile - // suggestion for. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2; - - // Number of messages prior to and including - // [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] to compile the - // suggestion. It may be smaller than the - // [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] field in the request if there - // aren't that many messages in the conversation. - int32 context_size = 3; -} - -// The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers]. -message SuggestFaqAnswersRequest { - // Required. The name of the participant to fetch suggestion for. - // Format: `projects//locations//conversations//participants/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Participant" - } - ]; - - // The name of the latest conversation message to compile suggestion - // for. If empty, it will be the latest message of the conversation. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2 [(google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Message" - }]; - - // Max number of messages prior to and including - // [latest_message] to use as context when compiling the - // suggestion. By default 20 and at most 50. - int32 context_size = 3; -} - -// The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers]. -message SuggestFaqAnswersResponse { - // Answers extracted from FAQ documents. - repeated FaqAnswer faq_answers = 1; - - // The name of the latest conversation message used to compile - // suggestion for. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2; - - // Number of messages prior to and including - // [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] to compile the - // suggestion. It may be smaller than the - // [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] field in the request if there - // aren't that many messages in the conversation. - int32 context_size = 3; -} - -// Represents the natural language speech audio to be played to the end user. -message OutputAudio { - // Instructs the speech synthesizer how to generate the speech - // audio. - OutputAudioConfig config = 1; - - // The natural language speech audio. - bytes audio = 2; -} - -// Represents a response from an automated agent. -message AutomatedAgentReply { - // Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] call. - DetectIntentResponse detect_intent_response = 1; -} - -// Represents article answer. -message ArticleAnswer { - // The article title. - string title = 1; - - // The article URI. - string uri = 2; - - // Article snippets. - repeated string snippets = 3; - - // Article match confidence. - // The system's confidence score that this article is a good match for this - // conversation, as a value from 0.0 (completely uncertain) to 1.0 - // (completely certain). - float confidence = 4; - - // A map that contains metadata about the answer and the - // document from which it originates. - map metadata = 5; - - // The name of answer record, in the format of - // "projects//locations//answerRecords/" - string answer_record = 6; -} - -// Represents answer from "frequently asked questions". -message FaqAnswer { - // The piece of text from the `source` knowledge base document. - string answer = 1; - - // The system's confidence score that this Knowledge answer is a good match - // for this conversational query, range from 0.0 (completely uncertain) - // to 1.0 (completely certain). - float confidence = 2; - - // The corresponding FAQ question. - string question = 3; - - // Indicates which Knowledge Document this answer was extracted - // from. - // Format: `projects//locations//agent/knowledgeBases//documents/`. - string source = 4; - - // A map that contains metadata about the answer and the - // document from which it originates. - map metadata = 5; - - // The name of answer record, in the format of - // "projects//locations//answerRecords/" - string answer_record = 6; -} - -// One response of different type of suggestion response which is used in -// the response of [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and -// [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent], as well as [HumanAgentAssistantEvent][google.cloud.dialogflow.v2.HumanAgentAssistantEvent]. -message SuggestionResult { - // Different type of suggestion response. - oneof suggestion_response { - // Error status if the request failed. - google.rpc.Status error = 1; - - // SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. - SuggestArticlesResponse suggest_articles_response = 2; - - // SuggestFaqAnswersResponse if request is for FAQ_ANSWER. - SuggestFaqAnswersResponse suggest_faq_answers_response = 3; - } -} - -// Represents a part of a message possibly annotated with an entity. The part -// can be an entity or purely a part of the message between two entities or -// message start/end. -message AnnotatedMessagePart { - // A part of a message possibly annotated with an entity. - string text = 1; - - // The [Dialogflow system entity - // type](https://cloud.google.com/dialogflow/docs/reference/system-entities) - // of this message part. If this is empty, Dialogflow could not annotate the - // phrase part with a system entity. - string entity_type = 2; - - // The [Dialogflow system entity formatted value - // ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of - // this message part. For example for a system entity of type - // `@sys.unit-currency`, this may contain: - //
-  // {
-  //   "amount": 5,
-  //   "currency": "USD"
-  // }
-  // 
- google.protobuf.Value formatted_value = 3; -} - -// Represents the result of annotation for the message. -message MessageAnnotation { - // The collection of annotated message parts ordered by their - // position in the message. You can recover the annotated message by - // concatenating [AnnotatedMessagePart.text]. - repeated AnnotatedMessagePart parts = 1; - - // Indicates whether the text message contains entities. - bool contain_entities = 2; -} diff --git a/google/cloud/dialogflow_v2/proto/session.proto b/google/cloud/dialogflow_v2/proto/session.proto deleted file mode 100644 index 13e3abff7..000000000 --- a/google/cloud/dialogflow_v2/proto/session.proto +++ /dev/null @@ -1,663 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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"; -import "google/cloud/dialogflow/v2/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"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -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}/agent/sessions/{session}" - pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}" -}; - -// A service used for session interactions. -// -// For more information, see the [API interactions -// guide](https://cloud.google.com/dialogflow/docs/api-overview). -service Sessions { - 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"; - - // Processes a natural language query and returns structured, actionable data - // as a result. This method is not idempotent, because it may cause contexts - // and session entity types to be updated, which in turn might affect - // results of future queries. - // - // Note: Always use agent versions for production traffic. - // See [Versions and - // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) { - option (google.api.http) = { - post: "/v2/{session=projects/*/agent/sessions/*}:detectIntent" - body: "*" - additional_bindings { - post: "/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent" - body: "*" - } - additional_bindings { - post: "/v2/{session=projects/*/locations/*/agent/sessions/*}:detectIntent" - body: "*" - } - additional_bindings { - post: "/v2/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent" - body: "*" - } - }; - option (google.api.method_signature) = "session,query_input"; - } - - // Processes a natural language query in audio format in a streaming fashion - // and returns structured, actionable data as a result. This method is only - // available via the gRPC API (not REST). - // - // Note: Always use agent versions for production traffic. - // See [Versions and - // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) { - } -} - -// The request to detect user's intent. -message DetectIntentRequest { - // Required. The name of the session this query is sent to. Format: - // `projects//agent/sessions/`, or - // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - // default 'draft' environment (`Environment ID` might be referred to as - // environment name at some places). If `User ID` is not specified, we are - // using "-". It's up to the API caller to choose an appropriate `Session ID` - // and `User Id`. They can be a random number or some type of user and session - // identifiers (preferably hashed). The length of the `Session ID` and - // `User ID` must not exceed 36 characters. - // - // For more information, see the [API interactions - // guide](https://cloud.google.com/dialogflow/docs/api-overview). - // - // Note: Always use agent versions for production traffic. - // See [Versions and - // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - string session = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Session" - } - ]; - - // The parameters of this query. - QueryParameters query_params = 2; - - // Required. The input specification. It can be set to: - // - // 1. an audio config - // which instructs the speech recognizer how to process the speech audio, - // - // 2. a conversational query in the form of text, or - // - // 3. an event that specifies which intent to trigger. - QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; - - // 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; - - // Mask for [output_audio_config][google.cloud.dialogflow.v2.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.v2.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; -} - -// The message returned from the DetectIntent method. -message DetectIntentResponse { - // The unique identifier of the response. It can be used to - // locate a response in the training example set or for reporting issues. - string response_id = 1; - - // The selected results of the conversational query or event processing. - // See `alternative_query_results` for additional potential results. - QueryResult query_result = 2; - - // Specifies the status of the webhook request. - google.rpc.Status webhook_status = 3; - - // The audio data bytes encoded as specified in the request. - // Note: The output audio is generated based on the values of default platform - // text responses found in the `query_result.fulfillment_messages` field. If - // multiple default text responses exist, they will be concatenated when - // generating audio. If no default platform text responses exist, the - // generated audio content will be empty. - // - // In some scenarios, multiple output audio fields may be present in the - // response structure. In these cases, only the top-most-level audio output - // has content. - bytes output_audio = 4; - - // The config used by the speech synthesizer to generate the output audio. - OutputAudioConfig output_audio_config = 6; -} - -// Represents the parameters of the conversational query. -message QueryParameters { - // 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; - - // The geo location of this conversational query. - google.type.LatLng geo_location = 2; - - // The collection of contexts to be activated before this query is - // executed. - repeated Context contexts = 3; - - // Specifies whether to delete all contexts in the current session - // before the new ones are activated. - bool reset_contexts = 4; - - // 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; - - // This field can be used to pass custom data to your webhook. - // Arbitrary JSON objects are supported. - // If supplied, the value is used to populate the - // `WebhookRequest.original_detect_intent_request.payload` - // field sent to your webhook. - google.protobuf.Struct payload = 6; - - // Configures the type of sentiment analysis to perform. If not - // provided, sentiment analysis is not performed. - SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; - - // This field can be used to pass HTTP headers for a webhook - // call. These headers will be sent to webhook along with the headers that - // have been configured through the Dialogflow web console. The headers - // defined within this field will overwrite the headers configured through the - // Dialogflow console if there is a conflict. Header names are - // case-insensitive. Google's specified headers are not allowed. Including: - // "Host", "Content-Length", "Connection", "From", "User-Agent", - // "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", - // etc. - map webhook_headers = 14; -} - -// Represents the query input. It can contain either: -// -// 1. An audio config which -// instructs the speech recognizer how to process the speech audio. -// -// 2. A conversational query in the form of text,. -// -// 3. An event that specifies which intent to trigger. -message QueryInput { - // Required. The input specification. - oneof input { - // Instructs the speech recognizer how to process the speech audio. - InputAudioConfig audio_config = 1; - - // The natural language text to be processed. - TextInput text = 2; - - // The event to be processed. - EventInput event = 3; - } -} - -// Represents the result of conversational query or event processing. -message QueryResult { - // The original conversational query text: - // - // - If natural language text was provided as input, `query_text` contains - // a copy of the input. - // - If natural language speech audio was provided as input, `query_text` - // contains the speech recognition result. If speech recognizer produced - // multiple alternatives, a particular one is picked. - // - If automatic spell correction is enabled, `query_text` will contain the - // corrected user input. - string query_text = 1; - - // The language that was triggered during intent detection. - // See [Language - // Support](https://cloud.google.com/dialogflow/docs/reference/language) - // for a list of the currently supported language codes. - string language_code = 15; - - // The Speech recognition confidence between 0.0 and 1.0. A higher number - // indicates an estimated greater likelihood that the recognized words are - // correct. The default of 0.0 is a sentinel value indicating that confidence - // was not set. - // - // This field is not guaranteed to be accurate or set. In particular this - // field isn't set for StreamingDetectIntent since the streaming endpoint has - // separate confidence estimates per portion of the audio in - // StreamingRecognitionResult. - float speech_recognition_confidence = 2; - - // The action name from the matched intent. - string action = 3; - - // The collection of extracted parameters. - // - // Depending on your protocol or client library language, this is a - // map, associative array, symbol table, dictionary, or JSON object - // composed of a collection of (MapKey, MapValue) pairs: - // - // - MapKey type: string - // - MapKey value: parameter name - // - MapValue type: - // - If parameter's entity type is a composite entity: map - // - Else: depending on parameter value type, could be one of string, - // number, boolean, null, list or map - // - MapValue value: - // - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - // - Else: parameter value - google.protobuf.Struct parameters = 4; - - // This field is set to: - // - // - `false` if the matched intent has required parameters and not all of - // the required parameter values have been collected. - // - `true` if all required parameter values have been collected, or if the - // matched intent doesn't contain any required parameters. - bool all_required_params_present = 5; - - // The text to be pronounced to the user or shown on the screen. - // Note: This is a legacy field, `fulfillment_messages` should be preferred. - string fulfillment_text = 6; - - // The collection of rich messages to present to the user. - repeated Intent.Message fulfillment_messages = 7; - - // If the query was fulfilled by a webhook call, this field is set to the - // value of the `source` field returned in the webhook response. - string webhook_source = 8; - - // If the query was fulfilled by a webhook call, this field is set to the - // value of the `payload` field returned in the webhook response. - google.protobuf.Struct webhook_payload = 9; - - // The collection of output contexts. If applicable, - // `output_contexts.parameters` contains entries with name - // `.original` containing the original parameter values - // before the query. - repeated Context output_contexts = 10; - - // The intent that matched the conversational query. Some, not - // all fields are filled in this message, including but not limited to: - // `name`, `display_name`, `end_interaction` and `is_fallback`. - Intent intent = 11; - - // The intent detection confidence. Values range from 0.0 - // (completely uncertain) to 1.0 (completely certain). - // This value is for informational purpose only and is only used to - // help match the best intent within the classification threshold. - // This value may change for the same end-user expression at any time due to a - // model retraining or change in implementation. - // If there are `multiple knowledge_answers` messages, this value is set to - // the greatest `knowledgeAnswers.match_confidence` value in the list. - float intent_detection_confidence = 12; - - // Free-form diagnostic information for the associated detect intent request. - // The fields of this data can change without notice, so you should not write - // code that depends on its structure. - // The data may contain: - // - // - webhook call latency - // - webhook errors - google.protobuf.Struct diagnostic_info = 14; - - // The sentiment analysis result, which depends on the - // `sentiment_analysis_request_config` specified in the request. - SentimentAnalysisResult sentiment_analysis_result = 17; -} - -// The top-level message sent by the client to the -// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent] method. -// -// Multiple request messages should be sent in order: -// -// 1. The first message must contain -// [session][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.session], -// [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] plus optionally -// [query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. If the client -// wants to receive an audio response, it should also contain -// [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config]. -// The message must not contain -// [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio]. -// 2. If [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] was set to -// [query_input.audio_config][google.cloud.dialogflow.v2.InputAudioConfig], all subsequent -// messages must contain -// [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio] to continue with -// Speech recognition. -// If you decide to rather detect an intent from text input after you -// already started Speech recognition, please send a message with -// [query_input.text][google.cloud.dialogflow.v2.QueryInput.text]. -// -// However, note that: -// -// * Dialogflow will bill you for the audio duration so far. -// * Dialogflow discards all Speech recognition results in favor of the -// input text. -// * Dialogflow will use the language code from the first message. -// -// After you sent all input, you must half-close or abort the request stream. -message StreamingDetectIntentRequest { - // Required. The name of the session the query is sent to. - // Format of the session name: - // `projects//agent/sessions/`, or - // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume - // default 'draft' environment. If `User ID` is not specified, we are using - // "-". It's up to the API caller to choose an appropriate `Session ID` and - // `User Id`. They can be a random number or some type of user and session - // identifiers (preferably hashed). The length of the `Session ID` and - // `User ID` must not exceed 36 characters. - // - // For more information, see the [API interactions - // guide](https://cloud.google.com/dialogflow/docs/api-overview). - // - // Note: Always use agent versions for production traffic. - // See [Versions and - // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - string session = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Session" - } - ]; - - // The parameters of this query. - QueryParameters query_params = 2; - - // Required. The input specification. It can be set to: - // - // 1. an audio config which instructs the speech recognizer how to process - // the speech audio, - // - // 2. a conversational query in the form of text, or - // - // 3. an event that specifies which intent to trigger. - QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; - - // Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. - // 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 stopped or paused. In this case, once a detected - // intent is received, the client should close the stream and start a new - // request with a new stream as needed. - // This setting is ignored when `query_input` is a piece of text or an event. - bool single_utterance = 4 [deprecated = true]; - - // 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; - - // Mask for [output_audio_config][google.cloud.dialogflow.v2.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.v2.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; -} - -// The top-level message returned from the -// `StreamingDetectIntent` method. -// -// Multiple response messages can be returned in order: -// -// 1. If the input was set to streaming audio, the first one or more messages -// contain `recognition_result`. Each `recognition_result` represents a more -// complete transcript of what the user said. The last `recognition_result` -// has `is_final` set to `true`. -// -// 2. The next message contains `response_id`, `query_result` -// and optionally `webhook_status` if a WebHook was called. -message StreamingDetectIntentResponse { - // The unique identifier of the response. It can be used to - // locate a response in the training example set or for reporting issues. - string response_id = 1; - - // The result of speech recognition. - StreamingRecognitionResult recognition_result = 2; - - // The result of the conversational query or event processing. - QueryResult query_result = 3; - - // Specifies the status of the webhook request. - google.rpc.Status webhook_status = 4; - - // The audio data bytes encoded as specified in the request. - // Note: The output audio is generated based on the values of default platform - // text responses found in the `query_result.fulfillment_messages` field. If - // multiple default text responses exist, they will be concatenated when - // generating audio. If no default platform text responses exist, the - // generated audio content will be empty. - // - // In some scenarios, multiple output audio fields may be present in the - // response structure. In these cases, only the top-most-level audio output - // has content. - bytes output_audio = 5; - - // The config used by the speech synthesizer to generate the output audio. - OutputAudioConfig output_audio_config = 6; -} - -// Contains a speech recognition result corresponding to a portion of the audio -// that is currently being processed or an indication that this is the end -// of the single requested utterance. -// -// Example: -// -// 1. transcript: "tube" -// -// 2. transcript: "to be a" -// -// 3. transcript: "to be" -// -// 4. transcript: "to be or not to be" -// is_final: true -// -// 5. transcript: " that's" -// -// 6. transcript: " that is" -// -// 7. message_type: `END_OF_SINGLE_UTTERANCE` -// -// 8. transcript: " that is the question" -// is_final: true -// -// Only two of the responses contain final results (#4 and #8 indicated by -// `is_final: true`). Concatenating these generates the full transcript: "to be -// or not to be that is the question". -// -// In each response we populate: -// -// * for `TRANSCRIPT`: `transcript` and possibly `is_final`. -// -// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`. -message StreamingRecognitionResult { - // Type of the response message. - enum MessageType { - // Not specified. Should never be used. - MESSAGE_TYPE_UNSPECIFIED = 0; - - // Message contains a (possibly partial) transcript. - TRANSCRIPT = 1; - - // Event indicates that the server has detected the end of the user's speech - // utterance and expects no additional inputs. - // Therefore, the server will not process additional audio (although it may subsequently return additional results). The - // client should stop sending additional audio data, half-close the gRPC - // connection, and wait for any additional results until the server closes - // the gRPC connection. This message is only sent if `single_utterance` was - // set to `true`, and is not used otherwise. - END_OF_SINGLE_UTTERANCE = 2; - } - - // Type of the result message. - MessageType message_type = 1; - - // Transcript text representing the words that the user spoke. - // Populated if and only if `message_type` = `TRANSCRIPT`. - string transcript = 2; - - // If `false`, the `StreamingRecognitionResult` represents an - // interim result that may change. If `true`, the recognizer will not return - // any further hypotheses about this piece of the audio. May only be populated - // for `message_type` = `TRANSCRIPT`. - bool is_final = 3; - - // The Speech confidence between 0.0 and 1.0 for the current portion of audio. - // A higher number indicates an estimated greater likelihood that the - // recognized words are correct. The default of 0.0 is a sentinel value - // indicating that confidence was not set. - // - // This field is typically only provided if `is_final` is true and you should - // not rely on it being accurate or even set. - float confidence = 4; - - // Word-specific information for the words recognized by Speech in - // [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and - // [InputAudioConfig.enable_word_info] is set. - repeated SpeechWordInfo speech_word_info = 7; - - // Time offset of the end of this Speech recognition result relative to the - // beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. - google.protobuf.Duration speech_end_offset = 8; -} - -// Represents the natural language text to be processed. -message TextInput { - // Required. The UTF-8 encoded natural language text to be processed. - // Text length must not exceed 256 characters. - string text = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The language of this conversational query. See [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 = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Events allow for matching intents by event name instead of the natural -// language input. For instance, input `` can trigger a personalized welcome response. -// The parameter `name` may be used by the agent in the response: -// `"Hello #welcome_event.name! What can I do for you today?"`. -message EventInput { - // Required. The unique identifier of the event. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // The collection of parameters associated with the event. - // - // Depending on your protocol or client library language, this is a - // map, associative array, symbol table, dictionary, or JSON object - // composed of a collection of (MapKey, MapValue) pairs: - // - // - MapKey type: string - // - MapKey value: parameter name - // - MapValue type: - // - If parameter's entity type is a composite entity: map - // - Else: depending on parameter value type, could be one of string, - // number, boolean, null, list or map - // - MapValue value: - // - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - // - Else: parameter value - google.protobuf.Struct parameters = 2; - - // Required. The language of this query. See [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 [(google.api.field_behavior) = REQUIRED]; -} - -// Configures the types of sentiment analysis to perform. -message SentimentAnalysisRequestConfig { - // 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; -} - -// The result of sentiment analysis. Sentiment analysis inspects user input -// and identifies the prevailing subjective opinion, especially to determine a -// user's attitude as positive, negative, or neutral. -// For [Participants.DetectIntent][], it needs to be configured in -// [DetectIntentRequest.query_params][google.cloud.dialogflow.v2.DetectIntentRequest.query_params]. For -// [Participants.StreamingDetectIntent][], it needs to be configured in -// [StreamingDetectIntentRequest.query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. -// And for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and -// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent], it needs to be configured in -// [ConversationProfile.human_agent_assistant_config][google.cloud.dialogflow.v2.ConversationProfile.human_agent_assistant_config] -message SentimentAnalysisResult { - // The sentiment analysis result for `query_text`. - Sentiment query_text_sentiment = 1; -} - -// The sentiment, such as positive/negative feeling or association, for a unit -// of analysis, such as the query text. -message Sentiment { - // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive - // sentiment). - float score = 1; - - // A non-negative number in the [0, +inf) range, which represents the absolute - // magnitude of sentiment, regardless of score (positive or negative). - float magnitude = 2; -} diff --git a/google/cloud/dialogflow_v2/proto/session_entity_type.proto b/google/cloud/dialogflow_v2/proto/session_entity_type.proto deleted file mode 100644 index cac38be77..000000000 --- a/google/cloud/dialogflow_v2/proto/session_entity_type.proto +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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/entity_type.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "SessionEntityTypeProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType]. -service SessionEntityTypes { - 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 session entity types in the specified session. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes" - additional_bindings { - get: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" - } - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes" - } - additional_bindings { - get: "/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified session entity type. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) { - option (google.api.http) = { - get: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}" - additional_bindings { - get: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a session entity type. - // - // If the specified session entity type already exists, overrides the session - // entity type. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes" - body: "session_entity_type" - additional_bindings { - post: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" - body: "session_entity_type" - } - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes" - body: "session_entity_type" - } - additional_bindings { - post: "/v2/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes" - body: "session_entity_type" - } - }; - option (google.api.method_signature) = "parent,session_entity_type"; - } - - // Updates the specified session entity type. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) { - option (google.api.http) = { - patch: "/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}" - body: "session_entity_type" - additional_bindings { - patch: "/v2/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - body: "session_entity_type" - } - additional_bindings { - patch: "/v2/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" - body: "session_entity_type" - } - additional_bindings { - patch: "/v2/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - body: "session_entity_type" - } - }; - option (google.api.method_signature) = "session_entity_type"; - option (google.api.method_signature) = "session_entity_type,update_mask"; - } - - // Deletes the specified session entity type. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}" - additional_bindings { - delete: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// A session represents a conversation between a Dialogflow agent and an -// end-user. You can create special entities, called session entities, during a -// session. Session entities can extend or replace custom entity types and only -// exist during the session that they were created for. All session data, -// including session entities, is stored by Dialogflow for 20 minutes. -// -// For more information, see the [session entity -// guide](https://cloud.google.com/dialogflow/docs/entities-session). -message SessionEntityType { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/SessionEntityType" - pattern: "projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}" - pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}" - }; - - // The types of modifications for a session entity type. - enum EntityOverrideMode { - // Not specified. This value should be never used. - ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; - - // The collection of session entities overrides the collection of entities - // in the corresponding custom entity type. - ENTITY_OVERRIDE_MODE_OVERRIDE = 1; - - // The collection of session entities extends the collection of entities in - // the corresponding custom entity type. - // - // Note: Even in this override mode calls to `ListSessionEntityTypes`, - // `GetSessionEntityType`, `CreateSessionEntityType` and - // `UpdateSessionEntityType` only return the additional entities added in - // this session entity type. If you want to get the supplemented list, - // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] on the custom entity type - // and merge. - ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; - } - - // Required. The unique identifier of this session entity type. Format: - // `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - // - // `` must be the display name of an existing entity - // type in the same agent that will be overridden or supplemented. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Indicates whether the additional data should override or - // supplement the custom entity type definition. - EntityOverrideMode entity_override_mode = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The collection of entities associated with this session entity - // type. - repeated EntityType.Entity entities = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. -message ListSessionEntityTypesRequest { - // Required. The session to list all session entity types from. - // Format: `projects//agent/sessions/` or - // `projects//agent/environments//users// - // sessions/`. - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/SessionEntityType" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. -message ListSessionEntityTypesResponse { - // The list of session entity types. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated SessionEntityType session_entity_types = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType]. -message GetSessionEntityTypeRequest { - // Required. The name of the session entity type. Format: - // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/SessionEntityType" - } - ]; -} - -// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType]. -message CreateSessionEntityTypeRequest { - // Required. The session to create a session entity type for. - // Format: `projects//agent/sessions/` or - // `projects//agent/environments//users// - // sessions/`. - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/SessionEntityType" - } - ]; - - // Required. The session entity type to create. - SessionEntityType session_entity_type = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType]. -message UpdateSessionEntityTypeRequest { - // Required. The session entity type to update. - SessionEntityType session_entity_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType]. -message DeleteSessionEntityTypeRequest { - // Required. The name of the entity type to delete. Format: - // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/SessionEntityType" - } - ]; -} diff --git a/google/cloud/dialogflow_v2/proto/validation_result.proto b/google/cloud/dialogflow_v2/proto/validation_result.proto deleted file mode 100644 index e41cb9cde..000000000 --- a/google/cloud/dialogflow_v2/proto/validation_result.proto +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2; - -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ValidationResultProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// Represents a single validation error. -message ValidationError { - // Represents a level of severity. - enum Severity { - // Not specified. This value should never be used. - SEVERITY_UNSPECIFIED = 0; - - // The agent doesn't follow Dialogflow best practices. - INFO = 1; - - // The agent may not behave as expected. - WARNING = 2; - - // The agent may experience partial failures. - ERROR = 3; - - // The agent may completely fail. - CRITICAL = 4; - } - - // The severity of the error. - Severity severity = 1; - - // The names of the entries that the error is associated with. - // Format: - // - // - "projects//agent", if the error is associated with the entire - // agent. - // - "projects//agent/intents/", if the error is - // associated with certain intents. - // - "projects//agent/intents//trainingPhrases/", if the - // error is associated with certain intent training phrases. - // - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. - // - "projects//agent/entities/", if the error is - // associated with certain entities. - repeated string entries = 3; - - // The detailed error messsage. - string error_message = 4; -} - -// Represents the output of agent validation. -message ValidationResult { - // Contains all validation errors. - repeated ValidationError validation_errors = 1; -} diff --git a/google/cloud/dialogflow_v2/proto/webhook.proto b/google/cloud/dialogflow_v2/proto/webhook.proto deleted file mode 100644 index ce72e92d3..000000000 --- a/google/cloud/dialogflow_v2/proto/webhook.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2; - -import "google/cloud/dialogflow/v2/context.proto"; -import "google/cloud/dialogflow/v2/intent.proto"; -import "google/cloud/dialogflow/v2/session.proto"; -import "google/cloud/dialogflow/v2/session_entity_type.proto"; -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "WebhookProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// The request message for a webhook call. -message WebhookRequest { - // The unique identifier of detectIntent request session. - // Can be used to identify end-user inside webhook implementation. - // Format: `projects//agent/sessions/`, or - // `projects//agent/environments//users//sessions/`. - string session = 4; - - // The unique identifier of the response. Contains the same value as - // `[Streaming]DetectIntentResponse.response_id`. - string response_id = 1; - - // The result of the conversational query or event processing. Contains the - // same value as `[Streaming]DetectIntentResponse.query_result`. - QueryResult query_result = 2; - - // Optional. The contents of the original request that was passed to - // `[Streaming]DetectIntent` call. - OriginalDetectIntentRequest original_detect_intent_request = 3; -} - -// The response message for a webhook call. -// -// This response is validated by the Dialogflow server. If validation fails, -// an error will be returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow.v2.QueryResult.diagnostic_info] field. -// Setting JSON fields to an empty value with the wrong type is a common error. -// To avoid this error: -// -// - Use `""` for empty strings -// - Use `{}` or `null` for empty objects -// - Use `[]` or `null` for empty arrays -// -// For more information, see the -// [Protocol Buffers Language -// Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). -message WebhookResponse { - // Optional. The text response message intended for the end-user. - // It is recommended to use `fulfillment_messages.text.text[0]` instead. - // When provided, Dialogflow uses this field to populate - // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller. - string fulfillment_text = 1; - - // Optional. The rich response messages intended for the end-user. - // When provided, Dialogflow uses this field to populate - // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller. - repeated Intent.Message fulfillment_messages = 2; - - // Optional. A custom field used to identify the webhook source. - // Arbitrary strings are supported. - // When provided, Dialogflow uses this field to populate - // [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller. - string source = 3; - - // Optional. This field can be used to pass custom data from your webhook to the - // integration or API caller. Arbitrary JSON objects are supported. - // When provided, Dialogflow uses this field to populate - // [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. - // This field is also used by the - // [Google Assistant - // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) - // for rich response messages. - // See the format definition at [Google Assistant Dialogflow webhook - // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) - google.protobuf.Struct payload = 4; - - // Optional. The collection of output contexts that will overwrite currently - // active contexts for the session and reset their lifespans. - // When provided, Dialogflow uses this field to populate - // [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller. - repeated Context output_contexts = 5; - - // Optional. Invokes the supplied events. - // When this field is set, Dialogflow ignores the `fulfillment_text`, - // `fulfillment_messages`, and `payload` fields. - EventInput followup_event_input = 6; - - // Optional. Additional session entity types to replace or extend developer - // entity types with. The entity synonyms apply to all languages and persist - // for the session. Setting this data from a webhook overwrites - // the session entity types that have been set using `detectIntent`, - // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods. - repeated SessionEntityType session_entity_types = 10; -} - -// Represents the contents of the original request that was passed to -// the `[Streaming]DetectIntent` call. -message OriginalDetectIntentRequest { - // The source of this request, e.g., `google`, `facebook`, `slack`. It is set - // by Dialogflow-owned servers. - string source = 1; - - // Optional. The version of the protocol used for this request. - // This field is AoG-specific. - string version = 2; - - // Optional. This field is set to the value of the `QueryParameters.payload` - // field passed in the request. Some integrations that query a Dialogflow - // agent may provide additional information in the payload. - // - // In particular, for the Dialogflow Phone Gateway integration, this field has - // the form: - //
{
-  //  "telephony": {
-  //    "caller_id": "+18558363987"
-  //  }
-  // }
- // Note: The caller ID field (`caller_id`) will be redacted for Trial - // Edition agents and populated with the caller ID in [E.164 - // format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. - google.protobuf.Struct payload = 3; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/agent.proto b/google/cloud/dialogflow_v2beta1/proto/agent.proto deleted file mode 100644 index 51c5b831d..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/agent.proto +++ /dev/null @@ -1,518 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/environment.proto"; -import "google/cloud/dialogflow/v2beta1/validation_result.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "AgentProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [Agents][google.cloud.dialogflow.v2beta1.Agent]. -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" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*}/agent" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Creates/updates the specified agent. - rpc SetAgent(SetAgentRequest) returns (Agent) { - option (google.api.http) = { - post: "/v2beta1/{agent.parent=projects/*}/agent" - body: "agent" - additional_bindings { - post: "/v2beta1/{agent.parent=projects/*/locations/*}/agent" - body: "agent" - } - }; - option (google.api.method_signature) = "agent"; - } - - // Deletes the specified agent. - rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{parent=projects/*}/agent" - additional_bindings { - delete: "/v2beta1/{parent=projects/*/locations/*}/agent" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Returns the list of agents. - // Since there is at most one conversational agent per project, this method is - // useful primarily for listing all agents across projects the caller has - // access to. One can achieve that with a wildcard project collection id "-". - // Refer to [List - // Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - rpc SearchAgents(SearchAgentsRequest) returns (SearchAgentsResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*}/agent:search" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*}/agent:search" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Trains the specified agent. - // - // - // Operation - rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/agent:train" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*}/agent:train" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Exports the specified agent to a ZIP file. - // - // - // Operation - rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/agent:export" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*}/agent:export" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.dialogflow.v2beta1.ExportAgentResponse" - metadata_type: "google.protobuf.Struct" - }; - } - - // Imports the specified agent from a ZIP file. - // - // Uploads new intents and entity types without deleting the existing ones. - // Intents and entity types with the same name are replaced with the new - // versions from [ImportAgentRequest][google.cloud.dialogflow.v2beta1.ImportAgentRequest]. After the import, the imported draft - // agent will be trained automatically (unless disabled in agent settings). - // However, once the import is done, training may not be completed yet. Please - // call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it returns in order to train - // explicitly. - // - // - // Operation - // An operation which tracks when importing is complete. It only tracks - // when the draft agent is updated not when it is done training. - rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/agent:import" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*}/agent:import" - body: "*" - } - }; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Restores the specified agent from a ZIP file. - // - // Replaces the current agent version with a new one. All the intents and - // entity types in the older version are deleted. After the restore, the - // restored draft agent will be trained automatically (unless disabled in - // agent settings). However, once the restore is done, training may not be - // completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it - // returns in order to train explicitly. - // - // - // Operation - // An operation which tracks when restoring is complete. It only tracks - // when the draft agent is updated not when it is done training. - rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/agent:restore" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*}/agent:restore" - body: "*" - } - }; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Gets agent validation result. Agent validation is performed during - // training time and is updated automatically when training is completed. - rpc GetValidationResult(GetValidationResultRequest) returns (ValidationResult) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*}/agent/validationResult" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*}/agent/validationResult" - } - }; - } -} - -// A Dialogflow agent is a virtual agent that handles conversations with your -// end-users. It is a natural language understanding module that understands the -// nuances of human language. Dialogflow translates end-user text or audio -// during a conversation to structured data that your apps and services can -// understand. You design and build a Dialogflow agent to handle the types of -// conversations required for your system. -// -// For more information about agents, see the -// [Agent guide](https://cloud.google.com/dialogflow/docs/agents-overview). -message Agent { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Agent" - pattern: "projects/{project}/agent" - pattern: "projects/{project}/locations/{location}/agent" - }; - - // Match mode determines how intents are detected from user queries. - enum MatchMode { - // Not specified. - MATCH_MODE_UNSPECIFIED = 0; - - // Best for agents with a small number of examples in intents and/or wide - // use of templates syntax and composite entities. - MATCH_MODE_HYBRID = 1; - - // Can be used for agents with a large number of examples in intents, - // especially the ones using @sys.any or very large custom entities. - 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/` or - // `projects//locations/` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The name of this agent. - string display_name = 2; - - // Required. The default language of the agent as a language tag. See - // [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; - - // Optional. The list of all languages supported by this agent (except for the - // `default_language_code`). - repeated string supported_language_codes = 4; - - // Required. The time zone of this agent from the - // [time zone database](https://www.iana.org/time-zones), e.g., - // America/New_York, Europe/Paris. - string time_zone = 5; - - // Optional. The description of this agent. - // The maximum length is 500 characters. If exceeded, the request is rejected. - string description = 6; - - // 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/docs/integrations/web-demo) - // integration. - string avatar_uri = 7; - - // Optional. Determines whether this agent should log conversation queries. - bool enable_logging = 8; - - // Optional. Determines how intents are detected from user queries. - MatchMode match_mode = 9 [deprecated = true]; - - // Optional. To filter out false positive results and still get variety in - // matched natural language inputs for your agent, you can tune the machine - // learning classification threshold. If the returned score value is less than - // the threshold value, then a fallback intent will be triggered or, if there - // are no fallback intents defined, no intent will be triggered. The score - // 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]. -message GetAgentRequest { - // Required. The project that the agent to fetch is associated with. - // Format: `projects/` or - // `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; -} - -// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2beta1.Agents.SetAgent]. -message SetAgentRequest { - // Required. The agent to update. - Agent agent = 1 [(google.api.field_behavior) = REQUIRED]; - - // 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/` or - // `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; -} - -// Contains basic configuration for a sub-agent. -message SubAgent { - // Required. The project of this agent. - // Format: `projects/` or - // `projects//locations/`. - 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. - // Format: `projects/` or - // `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents]. -message SearchAgentsResponse { - // The list of agents. There will be a maximum number of items returned based - // on the page_size field in the request. - repeated Agent agents = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent]. -message TrainAgentRequest { - // Required. The project that the agent to train is associated with. - // Format: `projects/` or - // `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; -} - -// The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent]. -message ExportAgentRequest { - // Required. The project that the agent to export is associated with. - // Format: `projects/` or - // `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // Optional. The - // [Google Cloud Storage](https://cloud.google.com/storage/docs/) - // URI to export the agent to. - // The format of this URI must be `gs:///`. - // If left unspecified, the serialized agent is returned inline. - string agent_uri = 2; -} - -// The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent]. -message ExportAgentResponse { - // The exported agent. - oneof agent { - // The URI to a file containing the exported agent. This field is populated - // only if `agent_uri` is specified in `ExportAgentRequest`. - string agent_uri = 1; - - // Zip compressed raw byte content for agent. - bytes agent_content = 2; - } -} - -// The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent]. -message ImportAgentRequest { - // Required. The project that the agent to import is associated with. - // Format: `projects/` or - // `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // Required. The agent to import. - oneof agent { - // The URI to a Google Cloud Storage file containing the agent to import. - // Note: The URI must start with "gs://". - string agent_uri = 2; - - // Zip compressed raw byte content for agent. - bytes agent_content = 3; - } -} - -// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2beta1.Agents.RestoreAgent]. -message RestoreAgentRequest { - // Required. The project that the agent to restore is associated with. - // Format: `projects/` or - // `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // Required. The agent to restore. - oneof agent { - // The URI to a Google Cloud Storage file containing the agent to restore. - // Note: The URI must start with "gs://". - string agent_uri = 2; - - // Zip compressed raw byte content for agent. - bytes agent_content = 3; - } -} - -// The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2beta1.Agents.GetValidationResult]. -message GetValidationResultRequest { - // Required. The project that the agent is associated with. - // Format: `projects/` or - // `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Agent" - } - ]; - - // 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 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/answer_record.proto b/google/cloud/dialogflow_v2beta1/proto/answer_record.proto deleted file mode 100644 index 4f7b9f44a..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/answer_record.proto +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/participant.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "AnswerRecordsProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing -// [AnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecord]. -service AnswerRecords { - 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"; - - // Deprecated. - // Retrieves a specific answer record. - rpc GetAnswerRecord(GetAnswerRecordRequest) returns (AnswerRecord) { - option deprecated = true; - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/answerRecords/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/answerRecords/*}" - } - }; - } - - // Returns the list of all answer records in the specified project in reverse - // chronological order. - rpc ListAnswerRecords(ListAnswerRecordsRequest) - returns (ListAnswerRecordsResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*}/answerRecords" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*}/answerRecords" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Updates the specified answer record. - rpc UpdateAnswerRecord(UpdateAnswerRecordRequest) returns (AnswerRecord) { - option (google.api.http) = { - patch: "/v2beta1/{answer_record.name=projects/*/answerRecords/*}" - body: "answer_record" - additional_bindings { - patch: "/v2beta1/{answer_record.name=projects/*/locations/*/answerRecords/*}" - body: "answer_record" - } - }; - option (google.api.method_signature) = "answer_record,update_mask"; - } -} - -// Answer records are records to manage answer history and feedbacks for -// Dialogflow. -// -// Currently, answer record includes: -// -// - human agent assistant article suggestion -// - human agent assistant faq article -// -// It doesn't include: -// -// - `DetectIntent` intent matching -// - `DetectIntent` knowledge -// -// Answer records are not related to the conversation history in the -// Dialogflow Console. A Record is generated even when the end-user disables -// conversation history in the console. Records are created when there's a human -// agent assistant suggestion generated. -// -// A typical workflow for customers provide feedback to an answer is: -// -// 1. For human agent assistant, customers get suggestion via ListSuggestions -// API. Together with the answers, -// [AnswerRecord.name][google.cloud.dialogflow.v2beta1.AnswerRecord.name] are -// returned to the customers. -// 2. The customer uses the -// [AnswerRecord.name][google.cloud.dialogflow.v2beta1.AnswerRecord.name] to -// call the -// [UpdateAnswerRecord][] method to send feedback about a specific answer -// that they believe is wrong. -message AnswerRecord { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/AnswerRecord" - pattern: "projects/{project}/answerRecords/{answer_record}" - pattern: "projects/{project}/locations/{location}/answerRecords/{answer_record}" - }; - - // The unique identifier of this answer record. - // Required for - // [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord] - // method. Format: `projects//locations//answerRecords/`. - string name = 1; - - // Optional. The AnswerFeedback for this record. You can set this with - // [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord] - // in order to give us feedback about this answer. - AnswerFeedback answer_feedback = 3; - - // Output only. The record for this answer. - oneof record { - // Output only. The record for human agent assistant. - AgentAssistantRecord agent_assistant_record = 4; - } -} - -// Represents a record of a human agent assistant answer. -message AgentAssistantRecord { - // Output only. The agent assistant answer. - oneof answer { - // Output only. The article suggestion answer. - ArticleAnswer article_suggestion_answer = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The FAQ answer. - FaqAnswer faq_answer = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - } -} - -// Represents feedback the customer has about the quality & correctness of a -// certain answer in a conversation. -message AnswerFeedback { - // The correctness level of an answer. - enum CorrectnessLevel { - // Correctness level unspecified. - CORRECTNESS_LEVEL_UNSPECIFIED = 0; - - // Answer is totally wrong. - NOT_CORRECT = 1; - - // Answer is partially correct. - PARTIALLY_CORRECT = 2; - - // Answer is fully correct. - FULLY_CORRECT = 3; - } - - // The correctness level of the specific answer. - CorrectnessLevel correctness_level = 1; - - // Normally, detail feedback is provided when answer is not fully correct. - oneof detail_feedback { - // Optional. Detail feedback of agent assistant suggestions. - AgentAssistantFeedback agent_assistant_detail_feedback = 2; - } - - // Indicates whether the answer/item was clicked by the human agent - // or not. Default to false. - bool clicked = 3; - - // Time when the answer/item was clicked. - google.protobuf.Timestamp click_time = 5; - - // Indicates whether the answer/item was displayed to the human - // agent in the agent desktop UI. Default to false. - bool displayed = 4; - - // Time when the answer/item was displayed. - google.protobuf.Timestamp display_time = 6; -} - -// Detail feedback of Agent Assistant result. -message AgentAssistantFeedback { - // Feedback for conversation summarization. - message SummarizationFeedback { - // Timestamp when composing of the summary starts. - google.protobuf.Timestamp start_timestamp = 1; - - // Timestamp when the summary was submitted. - google.protobuf.Timestamp submit_timestamp = 2; - - // Text of actual submitted summary. - string summary_text = 3; - } - - // Relevance of an answer. - enum AnswerRelevance { - // Answer relevance unspecified. - ANSWER_RELEVANCE_UNSPECIFIED = 0; - - // Answer is irrelevant to query. - IRRELEVANT = 1; - - // Answer is relevant to query. - RELEVANT = 2; - } - - // Correctness of document. - enum DocumentCorrectness { - // Document correctness unspecified. - DOCUMENT_CORRECTNESS_UNSPECIFIED = 0; - - // Information in document is incorrect. - INCORRECT = 1; - - // Information in document is correct. - CORRECT = 2; - } - - // Efficiency of document. - enum DocumentEfficiency { - // Document efficiency unspecified. - DOCUMENT_EFFICIENCY_UNSPECIFIED = 0; - - // Document is inefficient. - INEFFICIENT = 1; - - // Document is efficient. - EFFICIENT = 2; - } - - // Optional. Whether or not the suggested answer is relevant. - // - // For example: - // - // * Query: "Can I change my mailing address?" - // * Suggested document says: "Items must be returned/exchanged within 60 - // days of the purchase date." - // * [answer_relevance][google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT] - AnswerRelevance answer_relevance = 1; - - // Optional. Whether or not the information in the document is correct. - // - // For example: - // - // * Query: "Can I return the package in 2 days once received?" - // * Suggested document says: "Items must be returned/exchanged within 60 - // days of the purchase date." - // * Ground truth: "No return or exchange is allowed." - // * [document_correctness]: INCORRECT - DocumentCorrectness document_correctness = 2; - - // Optional. Whether or not the suggested document is efficient. For example, - // if the document is poorly written, hard to understand, hard to use or - // too long to find useful information, - // [document_efficiency][google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.document_efficiency] - // is - // [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT]. - DocumentEfficiency document_efficiency = 3; - - // Feedback for conversation summarization. - SummarizationFeedback summarization_feedback = 4; -} - -// Request message for -// [AnswerRecords.GetAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecord]. -message GetAnswerRecordRequest { - // Required. The name of the answer record to retrieve. - // Format: `projects//locations//answerRecords/`. - string name = 1; -} - -// Request message for -// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecords]. -message ListAnswerRecordsRequest { - // Required. The project to list all answer records for in reverse - // chronological order. Format: `projects//locations/`. - string parent = 1 [(google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/AnswerRecord" - }]; - - // Optional. The maximum number of records to return in a single page. - // The server may return fewer records than this. If unspecified, we use 10. - // The maximum is 100. - int32 page_size = 3; - - // Optional. The - // [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.next_page_token] - // value returned from a previous list request used to continue listing on - // the next page. - string page_token = 4; -} - -// Response message for -// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecords]. -message ListAnswerRecordsResponse { - // The list of answer records. - repeated AnswerRecord answer_records = 1; - - // A token to retrieve next page of results. Or empty if there are no more - // results. - // Pass this value in the - // [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.page_token] - // field in the subsequent call to `ListAnswerRecords` method to retrieve the - // next page of results. - string next_page_token = 2; -} - -// Request message for -// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord]. -message UpdateAnswerRecordRequest { - // Required. Answer record to update. - AnswerRecord answer_record = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/audio_config.proto b/google/cloud/dialogflow_v2beta1/proto/audio_config.proto deleted file mode 100644 index f8c42b7db..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/audio_config.proto +++ /dev/null @@ -1,437 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -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; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "AudioConfigProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Hints for the speech recognizer to help with recognition in a specific -// conversation state. -message SpeechContext { - // Optional. A list of strings containing words and phrases that the speech - // recognizer should recognize with higher likelihood. - // - // This list can be used to: - // - // * improve accuracy for words and phrases you expect the user to say, - // e.g. typical commands for your Dialogflow agent - // * add additional words to the speech recognizer vocabulary - // * ... - // - // See the [Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/quotas) for usage - // limits. - repeated string phrases = 1; - - // Optional. Boost for this context compared to other contexts: - // - // * If the boost is positive, Dialogflow will increase the probability that - // the phrases in this context are recognized over similar sounding phrases. - // * If the boost is unspecified or non-positive, Dialogflow will not apply - // any boost. - // - // Dialogflow recommends that you use boosts in the range (0, 20] and that you - // find a value that fits your use case with binary search. - float boost = 2; -} - -// Audio encoding of the audio content sent in the conversational query request. -// Refer to the -// [Cloud Speech API -// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more -// details. -enum AudioEncoding { - // Not specified. - AUDIO_ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - AUDIO_ENCODING_LINEAR_16 = 1; - - // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio - // Codec) is the recommended encoding because it is lossless (therefore - // recognition is not compromised) and requires only about half the - // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and - // 24-bit samples, however, not all fields in `STREAMINFO` are supported. - AUDIO_ENCODING_FLAC = 2; - - // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - AUDIO_ENCODING_MULAW = 3; - - // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - AUDIO_ENCODING_AMR = 4; - - // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_AMR_WB = 5; - - // Opus encoded audio frames in Ogg container - // ([OggOpus](https://wiki.xiph.org/OggOpus)). - // `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_OGG_OPUS = 6; - - // Although the use of lossy encodings is not recommended, if a very low - // bitrate encoding is required, `OGG_OPUS` is highly preferred over - // Speex encoding. The [Speex](https://speex.org/) encoding supported by - // Dialogflow API has a header byte in each block, as in MIME type - // `audio/x-speex-with-header-byte`. - // It is a variant of the RTP Speex encoding defined in - // [RFC 5574](https://tools.ietf.org/html/rfc5574). - // The stream is a sequence of blocks, one block per RTP packet. Each block - // starts with a byte containing the length of the block, in bytes, followed - // by one or more frames of Speex data, padded to an integral number of - // bytes (octets) as specified in RFC 5574. In other words, each RTP header - // is replaced with a single byte containing the block length. Only Speex - // wideband is supported. `sample_rate_hertz` must be 16000. - 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 -// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) -// for which models have different variants. For example, the "phone_call" model -// has both a standard and an enhanced variant. When you use an enhanced model, -// you will generally receive higher quality results than for a standard model. -enum SpeechModelVariant { - // No model variant specified. In this case Dialogflow defaults to - // USE_BEST_AVAILABLE. - SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; - - // Use the best available variant of the [Speech - // model][InputAudioConfig.model] that the caller is eligible for. - // - // Please see the [Dialogflow - // docs](https://cloud.google.com/dialogflow/docs/data-logging) for - // how to make your project eligible for enhanced models. - USE_BEST_AVAILABLE = 1; - - // Use standard model variant even if an enhanced model is available. See the - // [Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) - // for details about enhanced models. - USE_STANDARD = 2; - - // Use an enhanced model variant: - // - // * If an enhanced variant does not exist for the given - // [model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] and request language, Dialogflow falls - // back to the standard variant. - // - // The [Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) - // describes which models have enhanced variants. - // - // * If the API caller isn't eligible for enhanced models, Dialogflow returns - // an error. Please see the [Dialogflow - // docs](https://cloud.google.com/dialogflow/docs/data-logging) - // for how to make your project eligible. - USE_ENHANCED = 3; -} - -// Instructs the speech recognizer on how to process the audio content. -message InputAudioConfig { - // Required. Audio encoding of the audio content to process. - AudioEncoding audio_encoding = 1; - - // Required. Sample rate (in Hertz) of the audio content sent in the query. - // Refer to - // [Cloud Speech API - // documentation](https://cloud.google.com/speech-to-text/docs/basics) for - // more details. - int32 sample_rate_hertz = 2; - - // Required. The language of the supplied audio. Dialogflow does not do - // translations. See [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; - - // 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; - - // 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. - // - // This field is deprecated. Please use [speech_contexts]() instead. If you - // specify both [phrase_hints]() and [speech_contexts](), Dialogflow will - // treat the [phrase_hints]() as a single additional [SpeechContext](). - repeated string phrase_hints = 4 [deprecated = true]; - - // Context information to assist speech recognition. - // - // See [the Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - // for more details. - repeated SpeechContext speech_contexts = 11; - - // Which Speech model to select for the given request. Select the - // model best suited to your domain to get best results. If a model is not - // explicitly specified, then we auto-select a model based on the parameters - // in the InputAudioConfig. - // If enhanced speech model is enabled for the agent and an enhanced - // version of the specified model for the language does not exist, then the - // speech is recognized using the standard version of the specified model. - // Refer to - // [Cloud Speech API - // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - // for more details. - string model = 7; - - // Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. - SpeechModelVariant model_variant = 10; - - // 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 - // stopped or paused. In this case, once a detected intent is received, the - // client should close the stream and start a new request with a new stream as - // needed. - // Note: This setting is relevant only for streaming methods. - // Note: When specified, InputAudioConfig.single_utterance takes precedence - // over StreamingDetectIntentRequest.single_utterance. - bool single_utterance = 8; - - // Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] and - // [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent]. - // If `false` and recognition doesn't return any result, trigger - // `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. - bool disable_no_speech_recognized_event = 14; -} - -// 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 - // [ssml_gender][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.ssml_gender]. - // - // For the list of available voices, please refer to [Supported voices and - // languages](https://cloud.google.com/text-to-speech/docs/voices). - 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][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.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 - // native speed supported by the specific voice. 2.0 is twice as fast, and - // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any - // other values < 0.25 or > 4.0 will return an error. - double speaking_rate = 1; - - // Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 - // semitones from the original pitch. -20 means decrease 20 semitones from the - // original pitch. - double pitch = 2; - - // Optional. Volume gain (in dB) of the normal native volume supported by the - // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of - // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) - // will play at approximately half the amplitude of the normal native signal - // amplitude. A value of +6.0 (dB) will play at approximately twice the - // amplitude of the normal native signal amplitude. We strongly recommend not - // to exceed +10 (dB) as there's usually no effective increase in loudness for - // any value greater than that. - double volume_gain_db = 3; - - // Optional. An identifier which selects 'audio effects' profiles that are - // applied on (post synthesized) text to speech. Effects are applied on top of - // each other in the order they are given. - repeated string effects_profile_id = 5; - - // Optional. The desired voice of the synthesized audio. - VoiceSelectionParams voice = 4; -} - -// Gender of the voice as described in -// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). -enum SsmlVoiceGender { - // An unspecified gender, which means that the client doesn't care which - // gender the selected voice will have. - SSML_VOICE_GENDER_UNSPECIFIED = 0; - - // A male voice. - SSML_VOICE_GENDER_MALE = 1; - - // A female voice. - SSML_VOICE_GENDER_FEMALE = 2; - - // A gender-neutral voice. - SSML_VOICE_GENDER_NEUTRAL = 3; -} - -// Instructs the speech synthesizer how to generate the output audio content. -// If this audio config is supplied in a request, it overrides all existing -// text-to-speech settings applied to the agent. -message OutputAudioConfig { - // Required. Audio encoding of the synthesized audio content. - OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; - - // 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; - - // Configuration of how speech should be synthesized. - SynthesizeSpeechConfig synthesize_speech_config = 3; -} - -// A wrapper of repeated TelephonyDtmf digits. -message TelephonyDtmfEvents { - // A sequence of TelephonyDtmf digits. - repeated TelephonyDtmf dtmf_events = 1; -} - -// Audio encoding of the output audio format in Text-To-Speech. -enum OutputAudioEncoding { - // Not specified. - OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - // Audio content returned as LINEAR16 also contains a WAV header. - OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; - - // MP3 audio at 32kbps. - OUTPUT_AUDIO_ENCODING_MP3 = 2; - - // MP3 audio at 64kbps. - OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; - - // Opus encoded audio wrapped in an ogg container. The result will be a - // file which can be played natively on Android, and in browsers (at least - // Chrome and Firefox). The quality of the encoding is considerably higher - // than MP3 while using approximately the same bitrate. - OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; - - // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - OUTPUT_AUDIO_ENCODING_MULAW = 5; -} - -// Configures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile]. -message SpeechToTextConfig { - // Optional. The speech model used in speech to text. - // `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as - // `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2beta1.AnalyzeContentRequest] and - // [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest] request. - SpeechModelVariant speech_model_variant = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// [DTMF](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling) -// digit in Telephony Gateway. -enum TelephonyDtmf { - // Not specified. This value may be used to indicate an absent digit. - TELEPHONY_DTMF_UNSPECIFIED = 0; - - // Number: '1'. - DTMF_ONE = 1; - - // Number: '2'. - DTMF_TWO = 2; - - // Number: '3'. - DTMF_THREE = 3; - - // Number: '4'. - DTMF_FOUR = 4; - - // Number: '5'. - DTMF_FIVE = 5; - - // Number: '6'. - DTMF_SIX = 6; - - // Number: '7'. - DTMF_SEVEN = 7; - - // Number: '8'. - DTMF_EIGHT = 8; - - // Number: '9'. - DTMF_NINE = 9; - - // Number: '0'. - DTMF_ZERO = 10; - - // Letter: 'A'. - DTMF_A = 11; - - // Letter: 'B'. - DTMF_B = 12; - - // Letter: 'C'. - DTMF_C = 13; - - // Letter: 'D'. - DTMF_D = 14; - - // Asterisk/star: '*'. - DTMF_STAR = 15; - - // Pound/diamond/hash/square/gate/octothorpe: '#'. - DTMF_POUND = 16; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/context.proto b/google/cloud/dialogflow_v2beta1/proto/context.proto deleted file mode 100644 index a48e0ab63..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/context.proto +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ContextProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [Contexts][google.cloud.dialogflow.v2beta1.Context]. -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) = { - get: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts" - additional_bindings { - get: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" - } - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts" - } - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified context. - rpc GetContext(GetContextRequest) returns (Context) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" - } - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}" - } - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a context. - // - // If the specified context already exists, overrides the context. - rpc CreateContext(CreateContextRequest) returns (Context) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts" - body: "context" - additional_bindings { - post: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" - body: "context" - } - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts" - body: "context" - } - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" - body: "context" - } - }; - option (google.api.method_signature) = "parent,context"; - } - - // Updates the specified context. - rpc UpdateContext(UpdateContextRequest) returns (Context) { - option (google.api.http) = { - patch: "/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}" - body: "context" - additional_bindings { - patch: "/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" - body: "context" - } - additional_bindings { - patch: "/v2beta1/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}" - body: "context" - } - additional_bindings { - patch: "/v2beta1/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" - body: "context" - } - }; - option (google.api.method_signature) = "context,update_mask"; - option (google.api.method_signature) = "context"; - } - - // Deletes the specified context. - rpc DeleteContext(DeleteContextRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}" - additional_bindings { - delete: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" - } - additional_bindings { - delete: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}" - } - additional_bindings { - delete: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Deletes all active contexts in the specified session. - rpc DeleteAllContexts(DeleteAllContextsRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts" - additional_bindings { - delete: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" - } - additional_bindings { - delete: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts" - } - additional_bindings { - delete: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" - } - }; - option (google.api.method_signature) = "parent"; - } -} - -// Dialogflow contexts are similar to natural language context. If a person says -// to you "they are orange", you need context in order to understand what "they" -// is referring to. Similarly, for Dialogflow to handle an end-user expression -// like that, it needs to be provided with context in order to correctly match -// an intent. -// -// Using contexts, you can control the flow of a conversation. You can configure -// contexts for an intent by setting input and output contexts, which are -// identified by string names. When an intent is matched, any configured output -// contexts for that intent become active. While any contexts are active, -// Dialogflow is more likely to match intents that are configured with input -// contexts that correspond to the currently active contexts. -// -// For more information about context, see the -// [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). -message Context { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Context" - pattern: "projects/{project}/agent/sessions/{session}/contexts/{context}" - pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}" - pattern: "projects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}" - }; - - // Required. The unique identifier of the context. Supported formats: - // - `projects//agent/sessions//contexts/`, - // - `projects//locations//agent/sessions//contexts/`, - // - `projects//agent/environments//users//sessions//contexts/`, - // - `projects//locations//agent/environments//users//sessions//contexts/`, - // - // The `Context ID` is always converted to lowercase, may only contain - // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. - // - // If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. - // - // The following context names are reserved for internal use by Dialogflow. - // You should not use these contexts or create contexts with these names: - // - // * `__system_counters__` - // * `*_id_dialog_context` - // * `*_dialog_params_size` - string name = 1; - - // Optional. The number of conversational query requests after which the - // context expires. The default is `0`. If set to `0`, the context expires - // immediately. Contexts expire automatically after 20 minutes if there - // are no matching queries. - int32 lifespan_count = 2; - - // Optional. The collection of parameters associated with this context. - // - // Depending on your protocol or client library language, this is a - // map, associative array, symbol table, dictionary, or JSON object - // composed of a collection of (MapKey, MapValue) pairs: - // - // - MapKey type: string - // - MapKey value: parameter name - // - MapValue type: - // - If parameter's entity type is a composite entity: map - // - Else: depending on parameter value type, could be one of string, - // number, boolean, null, list or map - // - MapValue value: - // - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - // - Else: parameter value - google.protobuf.Struct parameters = 3; -} - -// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts]. -message ListContextsRequest { - // Required. The session to list all contexts from. Supported formats: - // - `projects//agent/sessions/, - // - `projects//locations//agent/sessions/`, - // - `projects//agent/environments//users//sessions/`, - // - `projects//locations//agent/environments//users//sessions/`, - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Context" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts]. -message ListContextsResponse { - // The list of contexts. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated Context contexts = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2beta1.Contexts.GetContext]. -message GetContextRequest { - // Required. The name of the context. Supported formats: - // - `projects//agent/sessions//contexts/`, - // - `projects//locations//agent/sessions//contexts/`, - // - `projects//agent/environments//users//sessions//contexts/`, - // - `projects//locations//agent/environments//users//sessions//contexts/`, - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Context" - } - ]; -} - -// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2beta1.Contexts.CreateContext]. -message CreateContextRequest { - // Required. The session to create a context for. Supported formats: - // - `projects//agent/sessions/, - // - `projects//locations//agent/sessions/`, - // - `projects//agent/environments//users//sessions/`, - // - `projects//locations//agent/environments//users//sessions/`, - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Context" - } - ]; - - // Required. The context to create. - Context context = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext]. -message UpdateContextRequest { - // Required. The context to update. - Context context = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2beta1.Contexts.DeleteContext]. -message DeleteContextRequest { - // Required. The name of the context to delete. Supported formats: - // - `projects//agent/sessions//contexts/`, - // - `projects//locations//agent/sessions//contexts/`, - // - `projects//agent/environments//users//sessions//contexts/`, - // - `projects//locations//agent/environments//users//sessions//contexts/`, - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Context" - } - ]; -} - -// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts]. -message DeleteAllContextsRequest { - // Required. The name of the session to delete all contexts from. Supported formats: - // - `projects//agent/sessions/, - // - `projects//locations//agent/sessions/`, - // - `projects//agent/environments//users//sessions/`, - // - `projects//locations//agent/environments//users//sessions/`, - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified we assume default 'draft' environment. If - // `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Context" - } - ]; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/conversation.proto b/google/cloud/dialogflow_v2beta1/proto/conversation.proto deleted file mode 100644 index 6e203540b..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/conversation.proto +++ /dev/null @@ -1,442 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/gcs.proto"; -import "google/cloud/dialogflow/v2beta1/participant.proto"; -import "google/cloud/dialogflow/v2beta1/session.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ConversationProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing -// [Conversations][google.cloud.dialogflow.v2beta1.Conversation]. -service Conversations { - 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"; - - // Creates a new conversation. Conversations are auto-completed after 24 - // hours. - // - // Conversation Lifecycle: - // There are two stages during a conversation: Automated Agent Stage and - // Assist Stage. - // - // For Automated Agent Stage, there will be a dialogflow agent responding to - // user queries. - // - // For Assist Stage, there's no dialogflow agent responding to user queries. - // But we will provide suggestions which are generated from conversation. - // - // If - // [Conversation.conversation_profile][google.cloud.dialogflow.v2beta1.Conversation.conversation_profile] - // is configured for a dialogflow agent, conversation will start from - // `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And - // during `Automated Agent Stage`, once an - // [Intent][google.cloud.dialogflow.v2beta1.Intent] with - // [Intent.live_agent_handoff][google.cloud.dialogflow.v2beta1.Intent.live_agent_handoff] - // is triggered, conversation will transfer to Assist Stage. - rpc CreateConversation(CreateConversationRequest) returns (Conversation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/conversations" - body: "conversation" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*}/conversations" - body: "conversation" - } - }; - option (google.api.method_signature) = "parent,conversation"; - } - - // Returns the list of all conversations in the specified project. - rpc ListConversations(ListConversationsRequest) - returns (ListConversationsResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*}/conversations" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*}/conversations" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specific conversation. - rpc GetConversation(GetConversationRequest) returns (Conversation) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/conversations/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/conversations/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Completes the specified conversation. Finished conversations are purged - // from the database after 30 days. - rpc CompleteConversation(CompleteConversationRequest) returns (Conversation) { - option (google.api.http) = { - post: "/v2beta1/{name=projects/*/conversations/*}:complete" - body: "*" - additional_bindings { - post: "/v2beta1/{name=projects/*/locations/*/conversations/*}:complete" - body: "*" - } - }; - option (google.api.method_signature) = "name"; - } - - // Batch ingests messages to conversation. Customers can use this RPC to - // ingest historical messages to conversation. - rpc BatchCreateMessages(BatchCreateMessagesRequest) - returns (BatchCreateMessagesResponse) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/conversations/*}/messages:batchCreate" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/conversations/*}/messages:batchCreate" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Lists messages that belong to a given conversation. - // `messages` are ordered by `create_time` in descending order. To fetch - // updates without duplication, send request with filter - // `create_time_epoch_microseconds > - // [first item's create_time of previous request]` and empty page_token. - rpc ListMessages(ListMessagesRequest) returns (ListMessagesResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*/conversations/*}/messages" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/conversations/*}/messages" - } - }; - option (google.api.method_signature) = "parent"; - } -} - -// Represents a conversation. -// A conversation is an interaction between an agent, including live agents -// and Dialogflow agents, and a support customer. Conversations can -// include phone calls and text-based chat sessions. -message Conversation { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Conversation" - pattern: "projects/{project}/conversations/{conversation}" - pattern: "projects/{project}/locations/{location}/conversations/{conversation}" - }; - - // Enumeration of the completion status of the conversation. - enum LifecycleState { - // Unknown. - LIFECYCLE_STATE_UNSPECIFIED = 0; - - // Conversation is currently open for media analysis. - IN_PROGRESS = 1; - - // Conversation has been completed. - COMPLETED = 2; - } - - // Enumeration of the different conversation stages a conversation can be in. - // Reference: - // https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages - enum ConversationStage { - // Unknown. Should never be used after a conversation is successfully - // created. - CONVERSATION_STAGE_UNSPECIFIED = 0; - - // The conversation should return virtual agent responses into the - // conversation. - VIRTUAL_AGENT_STAGE = 1; - - // The conversation should not provide responses, just listen and provide - // suggestions. - HUMAN_ASSIST_STAGE = 2; - } - - // Output only. The unique identifier of this conversation. - // Format: `projects//locations//conversations/`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the Conversation. - LifecycleState lifecycle_state = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The Conversation Profile to be used to configure this - // Conversation. This field cannot be updated. - // Format: `projects//locations//conversationProfiles/`. - string conversation_profile = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; - - // Output only. Required if the conversation is to be connected over - // telephony. - ConversationPhoneNumber phone_number = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The stage of a conversation. It indicates whether the virtual agent or a - // human agent is handling the conversation. - // - // If the conversation is created with the conversation profile that has - // Dialogflow config set, defaults to - // [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2beta1.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; - // Otherwise, defaults to - // [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2beta1.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - // - // If the conversation is created with the conversation profile that has - // Dialogflow config set but explicitly sets conversation_stage to - // [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2beta1.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], - // it skips - // [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2beta1.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] - // stage and directly goes to - // [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2beta1.Conversation.ConversationStage.HUMAN_ASSIST_STAGE]. - ConversationStage conversation_stage = 7; - - // Output only. The time the conversation was started. - google.protobuf.Timestamp start_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the conversation was finished. - google.protobuf.Timestamp end_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Represents a phone number for telephony integration. It allows for connecting -// a particular conversation over telephony. -message ConversationPhoneNumber { - // Output only. The phone number to connect to this conversation. - string phone_number = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for -// [Conversations.CreateConversation][google.cloud.dialogflow.v2beta1.Conversations.CreateConversation]. -message CreateConversationRequest { - // Required. Resource identifier of the project creating the conversation. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Conversation" - } - ]; - - // Required. The conversation to create. - Conversation conversation = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Identifier of the conversation. Generally it's auto generated by - // Google. Only set it if you cannot wait for the response to return a - // auto-generated one to you. - // - // The conversation ID must be compliant with the regression fomula - // "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64]. - // If the field is provided, the caller is resposible for - // 1. the uniqueness of the ID, otherwise the request will be rejected. - // 2. the consistency for whether to use custom ID or not under a project to - // better ensure uniqueness. - string conversation_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for -// [Conversations.ListConversations][google.cloud.dialogflow.v2beta1.Conversations.ListConversations]. -message ListConversationsRequest { - // Required. The project from which to list all conversation. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Conversation" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3; - - // A filter expression that filters conversations listed in the response. In - // general, the expression must specify the field name, a comparison operator, - // and the value to use for filtering: - //
    - //
  • The value must be a string, a number, or a boolean.
  • - //
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • - //
  • To filter on multiple expressions, separate the - // expressions with `AND` or `OR` (omitting both implies `AND`).
  • - //
  • For clarity, expressions can be enclosed in parentheses.
  • - //
- // Only `lifecycle_state` can be filtered on in this way. For example, - // the following expression only returns `COMPLETED` conversations: - // - // `lifecycle_state = "COMPLETED"` - // - // For more information about filtering, see - // [API Filtering](https://aip.dev/160). - string filter = 4; -} - -// The response message for -// [Conversations.ListConversations][google.cloud.dialogflow.v2beta1.Conversations.ListConversations]. -message ListConversationsResponse { - // The list of conversations. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated Conversation conversations = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for -// [Conversations.GetConversation][google.cloud.dialogflow.v2beta1.Conversations.GetConversation]. -message GetConversationRequest { - // Required. The name of the conversation. Format: - // `projects//locations//conversations/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Conversation" - } - ]; -} - -// The request message for -// [Conversations.CompleteConversation][google.cloud.dialogflow.v2beta1.Conversations.CompleteConversation]. -message CompleteConversationRequest { - // Required. Resource identifier of the conversation to close. - // Format: `projects//locations//conversations/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Conversation" - } - ]; -} - -// The request message to create one Message. Currently it is only used in -// BatchCreateMessagesRequest. -message CreateMessageRequest { - // Required. Resource identifier of the conversation to create message. - // Format: `projects//locations//conversations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Conversation" - } - ]; - - // Required. The message to create. - // [Message.participant][google.cloud.dialogflow.v2beta1.Message.participant] - // is required. - Message message = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Conversations.BatchCreateMessagesRequest][]. -message BatchCreateMessagesRequest { - // Required. Resource identifier of the conversation to create message. - // Format: `projects//locations//conversations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Conversation" - } - ]; - - // Required. A maximum of 1000 Messages can be created in a batch. - // [CreateMessageRequest.message.send_time][] is required. All created - // messages will have identical - // [Message.create_time][google.cloud.dialogflow.v2beta1.Message.create_time]. - repeated CreateMessageRequest requests = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Conversations.BatchCreateMessagesResponse][]. -message BatchCreateMessagesResponse { - // Messages created. - repeated Message messages = 1; -} - -// The request message for -// [Conversations.ListMessages][google.cloud.dialogflow.v2beta1.Conversations.ListMessages]. -message ListMessagesRequest { - // Required. The name of the conversation to list messages for. - // Format: `projects//locations//conversations/` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Message" - } - ]; - - // Optional. Filter on message fields. Currently predicates on `create_time` - // and `create_time_epoch_microseconds` are supported. `create_time` only - // support milliseconds accuracy. E.g., - // `create_time_epoch_microseconds > 1551790877964485` or - // `create_time > 2017-01-15T01:30:15.01Z`. - // - // For more information about filtering, see - // [API Filtering](https://aip.dev/160). - string filter = 4; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// The response message for -// [Conversations.ListMessages][google.cloud.dialogflow.v2beta1.Conversations.ListMessages]. -message ListMessagesResponse { - // Required. The list of messages. There will be a maximum number of items - // returned based on the page_size field in the request. - // `messages` is sorted by `create_time` in descending order. - repeated Message messages = 1; - - // Optional. Token to retrieve the next page of results, or empty if there are - // no more results in the list. - string next_page_token = 2; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/conversation_event.proto b/google/cloud/dialogflow_v2beta1/proto/conversation_event.proto deleted file mode 100644 index 35c1de1ee..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/conversation_event.proto +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -import "google/cloud/dialogflow/v2beta1/participant.proto"; -import "google/rpc/status.proto"; -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ConversationEventProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Represents a notification sent to Pub/Sub subscribers for conversation -// lifecycle events. -message ConversationEvent { - // Enumeration of the types of events available. - enum Type { - // Type not set. - TYPE_UNSPECIFIED = 0; - - // A new conversation has been opened. This is fired when a telephone call - // is answered, or a conversation is created via the API. - CONVERSATION_STARTED = 1; - - // An existing conversation has closed. This is fired when a telephone call - // is terminated, or a conversation is closed via the API. - CONVERSATION_FINISHED = 2; - - // An existing conversation has received a new message, either from API or - // telephony. It is configured in - // [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2beta1.ConversationProfile.new_message_event_notification_config] - NEW_MESSAGE = 5; - - // Unrecoverable error during a telephone call. - // - // In general non-recoverable errors only occur if something was - // misconfigured in the ConversationProfile corresponding to the call. After - // a non-recoverable error, Dialogflow may stop responding. - // - // We don't fire this event: - // - // * in an API call because we can directly return the error, or, - // * when we can recover from an error. - UNRECOVERABLE_ERROR = 4; - } - - // Required. The unique identifier of the conversation this notification - // refers to. - // Format: `projects//conversations/`. - string conversation = 1; - - // Required. The type of the event that this notification refers to. - Type type = 2; - - // Optional. More detailed information about an error. Only set for type - // UNRECOVERABLE_ERROR_IN_PHONE_CALL. - google.rpc.Status error_status = 3; - - // Payload of conversation event. - oneof payload { - // Payload of NEW_MESSAGE event. - Message new_message_payload = 4; - } -} diff --git a/google/cloud/dialogflow_v2beta1/proto/conversation_profile.proto b/google/cloud/dialogflow_v2beta1/proto/conversation_profile.proto deleted file mode 100644 index 24ec8d433..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/conversation_profile.proto +++ /dev/null @@ -1,561 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/audio_config.proto"; -import "google/cloud/dialogflow/v2beta1/document.proto"; -import "google/cloud/dialogflow/v2beta1/participant.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ConversationProfileProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [ConversationProfiles][google.cloud.dialogflow.v2beta1.ConversationProfile]. -service ConversationProfiles { - 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 conversation profiles in the specified project. - rpc ListConversationProfiles(ListConversationProfilesRequest) returns (ListConversationProfilesResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*}/conversationProfiles" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*}/conversationProfiles" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified conversation profile. - rpc GetConversationProfile(GetConversationProfileRequest) returns (ConversationProfile) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/conversationProfiles/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/conversationProfiles/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a conversation profile in the specified project. - // - // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] - // aren't populated in the response. You can retrieve them via - // [GetConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfile] API. - rpc CreateConversationProfile(CreateConversationProfileRequest) returns (ConversationProfile) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/conversationProfiles" - body: "conversation_profile" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*}/conversationProfiles" - body: "conversation_profile" - } - }; - option (google.api.method_signature) = "parent,conversation_profile"; - } - - // Updates the specified conversation profile. - // - // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] - // aren't populated in the response. You can retrieve them via - // [GetConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfile] API. - rpc UpdateConversationProfile(UpdateConversationProfileRequest) returns (ConversationProfile) { - option (google.api.http) = { - patch: "/v2beta1/{conversation_profile.name=projects/*/conversationProfiles/*}" - body: "conversation_profile" - additional_bindings { - patch: "/v2beta1/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}" - body: "conversation_profile" - } - }; - option (google.api.method_signature) = "conversation_profile,update_mask"; - } - - // Deletes the specified conversation profile. - rpc DeleteConversationProfile(DeleteConversationProfileRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{name=projects/*/conversationProfiles/*}" - additional_bindings { - delete: "/v2beta1/{name=projects/*/locations/*/conversationProfiles/*}" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// Defines the services to connect to incoming Dialogflow conversations. -message ConversationProfile { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/ConversationProfile" - pattern: "projects/{project}/conversationProfiles/{conversation_profile}" - pattern: "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}" - }; - - // The unique identifier of this conversation profile. - // Format: `projects//locations//conversationProfiles/`. - string name = 1; - - // Required. Human readable name for this profile. Max length 1024 bytes. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Create time of the conversation profile. - google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Update time of the conversation profile. - google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Configuration for an automated agent to use with this profile. - AutomatedAgentConfig automated_agent_config = 3; - - // Configuration for agent assistance to use with this profile. - HumanAgentAssistantConfig human_agent_assistant_config = 4; - - // Configuration for connecting to a live agent. - HumanAgentHandoffConfig human_agent_handoff_config = 5; - - // Configuration for publishing conversation lifecycle events. - NotificationConfig notification_config = 6; - - // Configuration for logging conversation lifecycle events. - LoggingConfig logging_config = 7; - - // Configuration for publishing new message events. Event will be sent in - // format of [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] - NotificationConfig new_message_event_notification_config = 8; - - // Settings for speech transcription. - SpeechToTextConfig stt_config = 9; - - // 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. - string language_code = 10; -} - -// Defines the Automated Agent to connect to a conversation. -message AutomatedAgentConfig { - // Required. ID of the Dialogflow agent environment to use. - // - // This project needs to either be the same project as the conversation or you - // need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API - // Service Agent` role in this project. - // - // - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not - // specified, the default `draft` environment is used. Refer to - // [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.DetectIntentRequest) - // for more details. - // - // - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment - // is used. - string agent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Agent" - } - ]; -} - -// Defines the Human Agent Assistant to connect to a conversation. -message HumanAgentAssistantConfig { - // Settings of suggestion trigger. - message SuggestionTriggerSettings { - // Do not trigger if last utterance is small talk. - bool no_small_talk = 1; - - // Only trigger suggestion if participant role of last utterance is - // END_USER. - bool only_end_user = 2; - } - - // Config for suggestion features. - message SuggestionFeatureConfig { - // The suggestion feature. - SuggestionFeature suggestion_feature = 5; - - // Automatically iterates all participants and tries to compile - // suggestions. - // - // Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. - bool enable_event_based_suggestion = 3; - - // Settings of suggestion trigger. - // - // Currently, only ARTICLE_SUGGESTION, FAQ, and DIALOGFLOW_ASSIST will use - // this field. - SuggestionTriggerSettings suggestion_trigger_settings = 10; - - // Configs of query. - SuggestionQueryConfig query_config = 6; - - // Configs of custom conversation model. - ConversationModelConfig conversation_model_config = 7; - } - - // Detail human agent assistant config. - message SuggestionConfig { - // Configuration of different suggestion features. One feature can have only - // one config. - repeated SuggestionFeatureConfig feature_configs = 2; - - // If `group_suggestion_responses` is false, and there are multiple - // `feature_configs` in `event based suggestion` or - // StreamingAnalyzeContent, we will try to deliver suggestions to customers - // as soon as we get new suggestion. Different type of suggestions based on - // the same context will be in separate Pub/Sub event or - // `StreamingAnalyzeContentResponse`. - // - // If `group_suggestion_responses` set to true. All the suggestions to the - // same participant based on the same context will be grouped into a single - // Pub/Sub event or StreamingAnalyzeContentResponse. - bool group_suggestion_responses = 3; - } - - // Config for suggestion query. - message SuggestionQueryConfig { - // Knowledge base source settings. - // - // Supported features: ARTICLE_SUGGESTION, FAQ. - message KnowledgeBaseQuerySource { - // Required. Knowledge bases to query. Format: - // `projects//locations//knowledgeBases/`. Currently, only one knowledge - // base is supported. - repeated string knowledge_bases = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; - } - - // Document source settings. - // - // Supported features: SMART_REPLY, SMART_COMPOSE. - message DocumentQuerySource { - // Required. Knowledge documents to query from. Format: - // `projects//locations//knowledgeBases//documents/`. - // Currently, only one document is supported. - repeated string documents = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Document" - } - ]; - } - - // Dialogflow source setting. - // - // Supported feature: DIALOGFLOW_ASSIST. - message DialogflowQuerySource { - // Required. The name of a dialogflow virtual agent used for end user side intent - // detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in - // the same Dialogflow project. - string agent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Agent" - } - ]; - } - - // Settings that determine how to filter recent conversation context when - // generating suggestions. - message ContextFilterSettings { - // If set to true, the last message from virtual agent (hand off message) - // and the message before it (trigger message of hand off) are dropped. - bool drop_handoff_messages = 1; - - // If set to true, all messages from virtual agent are dropped. - bool drop_virtual_agent_messages = 2; - - // If set to true, all messages from ivr stage are dropped. - bool drop_ivr_messages = 3; - } - - // Source of query. - oneof query_source { - // Query from knowledgebase. It is used by: - // ARTICLE_SUGGESTION, FAQ. - KnowledgeBaseQuerySource knowledge_base_query_source = 1; - - // Query from knowledge base document. It is used by: - // SMART_REPLY, SMART_COMPOSE. - DocumentQuerySource document_query_source = 2; - - // Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. - DialogflowQuerySource dialogflow_query_source = 3; - } - - // Maximum number of results to return. Currently, if unset, defaults to 10. - // And the max number is 20. - int32 max_results = 4; - - // Confidence threshold of query result. - // - // Agent Assist gives each suggestion a score in the range [0.0, 1.0], based - // on the relevance between the suggestion and the current conversation - // context. A score of 0.0 has no relevance, while a score of 1.0 has high - // relevance. Only suggestions with a score greater than or equal to the - // value of this field are included in the results. - // - // For a baseline model (the default), the recommended value is in the range - // [0.05, 0.1]. - // - // For a custom model, there is no recommended value. Tune this value by - // starting from a very low value and slowly increasing until you have - // desired results. - // - // If this field is not set, it is default to 0.0, which means that all - // suggestions are returned. - // - // Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. - float confidence_threshold = 5; - - // Determines how recent conversation context is filtered when generating - // suggestions. If unspecified, no messages will be dropped. - ContextFilterSettings context_filter_settings = 7; - } - - // Custom conversation models used in agent assist feature. - // - // Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY. - message ConversationModelConfig { - // Required. Conversation model resource name. Format: `projects//conversationModels/`. - string model = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - } - - // Configuration for analyses to run on each conversation message. - message MessageAnalysisConfig { - // Enable entity extraction in conversation messages on [agent assist - // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - // If unspecified, defaults to false. - bool enable_entity_extraction = 2; - - // Enable sentiment analysis in conversation messages on [agent assist - // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). - // If unspecified, defaults to false. Sentiment analysis inspects user input - // and identifies the prevailing subjective opinion, especially to determine - // a user's attitude as positive, negative, or neutral: - // https://cloud.google.com/natural-language/docs/basics#sentiment_analysis - // For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] method, result will be in - // [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.message]. - // For [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] method, result will be in - // [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.message] - // For [Conversations.ListMessages][google.cloud.dialogflow.v2beta1.Conversations.ListMessages] method, result will be in - // [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2beta1.ListMessagesResponse.messages] - // If Pub/Sub notification is configured, result will be in - // [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2beta1.ConversationEvent.new_message_payload]. - bool enable_sentiment_analysis = 3; - } - - // Pub/Sub topic on which to publish new agent assistant events. - NotificationConfig notification_config = 2; - - // Configuration for agent assistance of human agent participant. - SuggestionConfig human_agent_suggestion_config = 3; - - // Configuration for agent assistance of end user participant. - SuggestionConfig end_user_suggestion_config = 4; - - // Configuration for message analysis. - MessageAnalysisConfig message_analysis_config = 5; -} - -// Defines the hand off to a live agent, typically on which external agent -// service provider to connect to a conversation. -message HumanAgentHandoffConfig { - // Configuration specific to LivePerson (https://www.liveperson.com). - message LivePersonConfig { - // Required. Account number of the LivePerson account to connect. This is - // the account number you input at the login page. - string account_number = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Configuration specific to Salesforce Live Agent. - message SalesforceLiveAgentConfig { - // Required. The organization ID of the Salesforce account. - string organization_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Live Agent deployment ID. - string deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Live Agent chat button ID. - string button_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Domain of the Live Agent endpoint for this agent. You can find - // the endpoint URL in the `Live Agent settings` page. For example if URL - // has the form https://d.la4-c2-phx.salesforceliveagent.com/..., - // you should fill in d.la4-c2-phx.salesforceliveagent.com. - string endpoint_domain = 4 [(google.api.field_behavior) = REQUIRED]; - } - - // Required. Specifies which agent service to connect for human agent handoff. - oneof agent_service { - // Uses LivePerson (https://www.liveperson.com). - LivePersonConfig live_person_config = 1; - - // Uses Salesforce Live Agent. - SalesforceLiveAgentConfig salesforce_live_agent_config = 2; - } -} - -// Defines notification behavior. -message NotificationConfig { - // Format of cloud pub/sub message. - enum MessageFormat { - // If it is unspecified, PROTO will be used. - MESSAGE_FORMAT_UNSPECIFIED = 0; - - // Pubsub message will be serialized proto. - PROTO = 1; - - // Pubsub message will be json. - JSON = 2; - } - - // Name of the Pub/Sub topic to publish conversation - // events like - // [CONVERSATION_STARTED][google.cloud.dialogflow.v2beta1.ConversationEvent.Type.CONVERSATION_STARTED] as - // serialized [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] protos. - // - // Notification works for phone calls, if this topic either is in the same - // project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service - // Agent` role in the topic project. - // - // Format: `projects//locations//topics/`. - string topic = 1; - - // Format of message. - MessageFormat message_format = 2; -} - -// Defines logging behavior for conversation lifecycle events. -message LoggingConfig { - // Whether to log conversation events like - // [CONVERSATION_STARTED][google.cloud.dialogflow.v2beta1.ConversationEvent.Type.CONVERSATION_STARTED] to - // Stackdriver in the conversation project as JSON format - // [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] protos. - bool enable_stackdriver_logging = 3; -} - -// The request message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2beta1.ConversationProfiles.ListConversationProfiles]. -message ListConversationProfilesRequest { - // Required. The project to list all conversation profiles from. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; - - // The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// The response message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2beta1.ConversationProfiles.ListConversationProfiles]. -message ListConversationProfilesResponse { - // The list of project conversation profiles. There is a maximum number - // of items returned based on the page_size field in the request. - repeated ConversationProfile conversation_profiles = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfile]. -message GetConversationProfileRequest { - // Required. The resource name of the conversation profile. - // Format: `projects//locations//conversationProfiles/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; -} - -// The request message for [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.CreateConversationProfile]. -message CreateConversationProfileRequest { - // Required. The project to create a conversation profile for. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; - - // Required. The conversation profile to create. - ConversationProfile conversation_profile = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.UpdateConversationProfile]. -message UpdateConversationProfileRequest { - // Required. The conversation profile to update. - ConversationProfile conversation_profile = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The mask to control which fields to update. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.DeleteConversationProfile]. -// -// This operation fails if the conversation profile is still referenced from -// a phone number. -message DeleteConversationProfileRequest { - // Required. The name of the conversation profile to delete. - // Format: `projects//locations//conversationProfiles/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/ConversationProfile" - } - ]; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/document.proto b/google/cloud/dialogflow_v2beta1/proto/document.proto deleted file mode 100644 index 0af6eb9e6..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/document.proto +++ /dev/null @@ -1,528 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/gcs.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "DocumentProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing knowledge [Documents][google.cloud.dialogflow.v2beta1.Document]. -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; - // only use `projects.knowledgeBases.documents`. - rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents" - } - additional_bindings { - get: "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified document. - // - // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - // only use `projects.knowledgeBases.documents`. - rpc GetDocument(GetDocumentRequest) returns (Document) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*/documents/*}" - } - additional_bindings { - get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new document. - // - // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - // only use `projects.knowledgeBases.documents`. - rpc CreateDocument(CreateDocumentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents" - body: "document" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents" - body: "document" - } - additional_bindings { - post: "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" - body: "document" - } - }; - option (google.api.method_signature) = "parent,document"; - option (google.longrunning.operation_info) = { - response_type: "Document" - metadata_type: "KnowledgeOperationMetadata" - }; - } - - // Create documents by importing data from external sources. - rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents:import" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents:import" - body: "*" - } - }; - option (google.longrunning.operation_info) = { - response_type: "ImportDocumentsResponse" - metadata_type: "KnowledgeOperationMetadata" - }; - } - - // Deletes the specified document. - // - // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - // only use `projects.knowledgeBases.documents`. - rpc DeleteDocument(DeleteDocumentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}" - additional_bindings { - delete: "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*/documents/*}" - } - additional_bindings { - delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" - } - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "KnowledgeOperationMetadata" - }; - } - - // Updates the specified document. - // - // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - // only use `projects.knowledgeBases.documents`. - rpc UpdateDocument(UpdateDocumentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}" - body: "document" - additional_bindings { - patch: "/v2beta1/{document.name=projects/*/locations/*/knowledgeBases/*/documents/*}" - body: "document" - } - additional_bindings { - patch: "/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}" - body: "document" - } - }; - option (google.api.method_signature) = "document,update_mask"; - option (google.api.method_signature) = "document"; - option (google.longrunning.operation_info) = { - response_type: "Document" - metadata_type: "KnowledgeOperationMetadata" - }; - } - - // Reloads the specified document from its specified source, content_uri or - // content. The previously loaded content of the document will be deleted. - // Note: Even when the content of the document has not changed, there still - // may be side effects because of internal implementation changes. - // Note: If the document source is Google Cloud Storage URI, its metadata will - // be replaced with the custom metadata from Google Cloud Storage if the - // `import_gcs_custom_metadata` field is set to true in the request. - // - // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - // only use `projects.knowledgeBases.documents`. - rpc ReloadDocument(ReloadDocumentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload" - body: "*" - additional_bindings { - post: "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:reload" - body: "*" - } - additional_bindings { - post: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload" - body: "*" - } - }; - option (google.api.method_signature) = "name,gcs_source"; - option (google.longrunning.operation_info) = { - response_type: "Document" - metadata_type: "KnowledgeOperationMetadata" - }; - } -} - -// A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBase]. -// -// For more information, see the [knowledge base -// guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). -// -// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; -// only use `projects.knowledgeBases.documents`. -message Document { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Document" - pattern: "projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}" - pattern: "projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document}" - }; - - // The status of a reload attempt. - message ReloadStatus { - // Output only. The time of a reload attempt. - // This reload may have been triggered automatically or manually and may - // not have succeeded. - google.protobuf.Timestamp time = 1; - - // Output only. The status of a reload attempt or the initial load. - google.rpc.Status status = 2; - } - - // The knowledge type of document content. - enum KnowledgeType { - // The type is unspecified or arbitrary. - KNOWLEDGE_TYPE_UNSPECIFIED = 0; - - // The document content contains question and answer pairs as either HTML or - // CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats - // may fail to be parsed. - // - // CSV must have questions in the first column and answers in the second, - // with no header. Because of this explicit format, they are always parsed - // accurately. - FAQ = 1; - - // Documents for which unstructured text is extracted and used for - // question answering. - EXTRACTIVE_QA = 2; - - // The entire document content as a whole can be used for query results. - // Only for Contact Center Solutions on Dialogflow. - ARTICLE_SUGGESTION = 3; - - // The legacy enum for agent-facing smart reply feature. - SMART_REPLY = 4; - } - - // Optional. The document resource name. - // The name must be empty when creating a document. - // Format: `projects//locations//knowledgeBases//documents/`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The display name of the document. The name must be 1024 bytes or - // less; otherwise, the creation request fails. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The MIME type of this document. - string mime_type = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The knowledge type of document content. - repeated KnowledgeType knowledge_types = 4 [(google.api.field_behavior) = REQUIRED]; - - // The source of this document. - oneof source { - // The URI where the file content is located. - // - // For documents stored in Google Cloud Storage, these URIs must have - // the form `gs:///`. - // - // NOTE: External URLs must correspond to public webpages, i.e., they must - // be indexed by Google Search. In particular, URLs for showing documents in - // Google Cloud Storage (i.e. the URL in your browser) are not supported. - // Instead use the `gs://` format URI described above. - string content_uri = 5; - - // The raw content of the document. This field is only permitted for - // EXTRACTIVE_QA and FAQ knowledge types. - // Note: This field is in the process of being deprecated, please use - // raw_content instead. - string content = 6 [deprecated = true]; - - // The raw content of the document. This field is only permitted for - // EXTRACTIVE_QA and FAQ knowledge types. - bytes raw_content = 9; - } - - // Optional. If true, we try to automatically reload the document every day - // (at a time picked by the system). If false or unspecified, we don't try - // to automatically reload the document. - // - // Currently you can only enable automatic reload for documents sourced from - // a public url, see `source` field for the source types. - // - // Reload status can be tracked in `latest_reload_status`. If a reload - // fails, we will keep the document unchanged. - // - // If a reload fails with internal errors, the system will try to reload the - // document on the next day. - // If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the - // system will not try to reload the document anymore. You need to manually - // reload the document successfully by calling `ReloadDocument` and clear the - // errors. - bool enable_auto_reload = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time and status of the latest reload. - // This reload may have been triggered automatically or manually - // and may not have succeeded. - ReloadStatus latest_reload_status = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Metadata for the document. The metadata supports arbitrary - // key-value pairs. Suggested use cases include storing a document's title, - // an external URL distinct from the document's content_uri, etc. - // The max size of a `key` or a `value` of the metadata is 1024 bytes. - map metadata = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [Documents.GetDocument][google.cloud.dialogflow.v2beta1.Documents.GetDocument]. -message GetDocumentRequest { - // Required. The name of the document to retrieve. - // Format `projects//locations//knowledgeBases//documents/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Document" - } - ]; -} - -// Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments]. -message ListDocumentsRequest { - // Required. The knowledge base to list all documents for. - // Format: `projects//locations//knowledgeBases/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Document" - } - ]; - - // The maximum number of items to return in a single page. By - // default 10 and at most 100. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request. - string page_token = 3; - - // The filter expression used to filter documents returned by the list method. - // The expression has the following syntax: - // - // [AND ] ... - // - // The following fields and operators are supported: - // - // * knowledge_types with has(:) operator - // * display_name with has(:) operator - // * state with equals(=) operator - // - // Examples: - // - // * "knowledge_types:FAQ" matches documents with FAQ knowledge type. - // * "display_name:customer" matches documents whose display name contains - // "customer". - // * "state=ACTIVE" matches documents with ACTIVE state. - // * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. - // - // For more information about filtering, see - // [API Filtering](https://aip.dev/160). - string filter = 4; -} - -// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments]. -message ListDocumentsResponse { - // The list of documents. - repeated Document documents = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2beta1.Documents.CreateDocument]. -message CreateDocumentRequest { - // Required. The knowledge base to create a document for. - // Format: `projects//locations//knowledgeBases/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Document" - } - ]; - - // Required. The document to create. - Document document = 2 [(google.api.field_behavior) = REQUIRED]; - - // Whether to import custom metadata from Google Cloud Storage. - // Only valid when the document source is Google Cloud Storage URI. - bool import_gcs_custom_metadata = 3; -} - -// Request message for [Documents.ImportDocuments][google.cloud.dialogflow.v2beta1.Documents.ImportDocuments]. -message ImportDocumentsRequest { - // Required. The knowledge base to import documents into. - // Format: `projects//locations//knowledgeBases/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Document" - } - ]; - - // Required. The source to use for importing documents. - // - // If the source captures multiple objects, then multiple documents will be - // created, one corresponding to each object, and all of these documents will - // be created using the same document template. - oneof source { - // The Google Cloud Storage location for the documents. - // The path can include a wildcard. - // - // These URIs may have the forms - // `gs:///`. - // `gs:////*.`. - GcsSources gcs_source = 2; - } - - // Required. Document template used for importing all the documents. - ImportDocumentTemplate document_template = 3 [(google.api.field_behavior) = REQUIRED]; - - // Whether to import custom metadata from Google Cloud Storage. - // Only valid when the document source is Google Cloud Storage URI. - bool import_gcs_custom_metadata = 4; -} - -// The template used for importing documents. -message ImportDocumentTemplate { - // Required. The MIME type of the document. - string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The knowledge type of document content. - repeated Document.KnowledgeType knowledge_types = 2 [(google.api.field_behavior) = REQUIRED]; - - // Metadata for the document. The metadata supports arbitrary - // key-value pairs. Suggested use cases include storing a document's title, - // an external URL distinct from the document's content_uri, etc. - // The max size of a `key` or a `value` of the metadata is 1024 bytes. - map metadata = 3; -} - -// Response message for [Documents.ImportDocuments][google.cloud.dialogflow.v2beta1.Documents.ImportDocuments]. -message ImportDocumentsResponse { - // Includes details about skipped documents or any other warnings. - repeated google.rpc.Status warnings = 1; -} - -// Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2beta1.Documents.DeleteDocument]. -message DeleteDocumentRequest { - // Required. The name of the document to delete. - // Format: `projects//locations//knowledgeBases//documents/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Document" - } - ]; -} - -// Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2beta1.Documents.UpdateDocument]. -message UpdateDocumentRequest { - // Required. The document to update. - Document document = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Not specified means `update all`. - // Currently, only `display_name` can be updated, an InvalidArgument will be - // returned for attempting to update other fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Metadata in google::longrunning::Operation for Knowledge operations. -message KnowledgeOperationMetadata { - // States of the operation. - enum State { - // State unspecified. - STATE_UNSPECIFIED = 0; - - // The operation has been created. - PENDING = 1; - - // The operation is currently running. - RUNNING = 2; - - // The operation is done, either cancelled or completed. - DONE = 3; - } - - // Required. Output only. The current state of this operation. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument]. -message ReloadDocumentRequest { - // Required. The name of the document to reload. - // Format: `projects//locations//knowledgeBases//documents/` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Document" - } - ]; - - // The source for document reloading. - // Optional. If provided, the service will load the contents from the source - // and update document in the knowledge base. - oneof source { - // The path for a Cloud Storage source file for reloading document content. - // If not provided, the Document's existing source will be reloaded. - GcsSource gcs_source = 3; - } - - // Whether to import custom metadata from Google Cloud Storage. - // Only valid when the document source is Google Cloud Storage URI. - bool import_gcs_custom_metadata = 4; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/entity_type.proto b/google/cloud/dialogflow_v2beta1/proto/entity_type.proto deleted file mode 100644 index a1703f1be..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/entity_type.proto +++ /dev/null @@ -1,571 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "EntityTypeProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [EntityTypes][google.cloud.dialogflow.v2beta1.EntityType]. -service EntityTypes { - 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 entity types in the specified agent. - rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*/agent}/entityTypes" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes" - } - }; - option (google.api.method_signature) = "parent"; - option (google.api.method_signature) = "parent,language_code"; - } - - // Retrieves the specified entity type. - rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/agent/entityTypes/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - option (google.api.method_signature) = "name,language_code"; - } - - // Creates an entity type in the specified agent. - rpc CreateEntityType(CreateEntityTypeRequest) returns (EntityType) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent}/entityTypes" - body: "entity_type" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes" - body: "entity_type" - } - }; - option (google.api.method_signature) = "parent,entity_type"; - option (google.api.method_signature) = "parent,entity_type,language_code"; - } - - // Updates the specified entity type. - rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) { - option (google.api.http) = { - patch: "/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}" - body: "entity_type" - additional_bindings { - patch: "/v2beta1/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}" - body: "entity_type" - } - }; - option (google.api.method_signature) = "entity_type"; - option (google.api.method_signature) = "entity_type,language_code"; - option (google.api.method_signature) = "entity_type,language_code,update_mask"; - } - - // Deletes the specified entity type. - rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{name=projects/*/agent/entityTypes/*}" - additional_bindings { - delete: "/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Updates/Creates multiple entity types in the specified agent. - // Operation - rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate" - body: "*" - } - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse" - metadata_type: "google.protobuf.Struct" - }; - } - - // Deletes entity types in the specified agent. - // Operation - rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete" - body: "*" - } - }; - option (google.api.method_signature) = "parent,entity_type_names"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Creates multiple new entities in the specified entity type. - // - // Operation - rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate" - body: "*" - } - }; - option (google.api.method_signature) = "parent,entities"; - option (google.api.method_signature) = "parent,entities,language_code"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Updates or creates multiple entities in the specified entity type. This - // method does not affect entities in the entity type that aren't explicitly - // specified in the request. - // - // Operation - rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate" - body: "*" - } - }; - option (google.api.method_signature) = "parent,entities"; - option (google.api.method_signature) = "parent,entities,language_code"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } - - // Deletes entities in the specified entity type. - // - // Operation - rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete" - body: "*" - } - }; - option (google.api.method_signature) = "parent,entity_values"; - option (google.api.method_signature) = "parent,entity_values,language_code"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } -} - -// Each intent parameter has a type, called the entity type, which dictates -// exactly how data from an end-user expression is extracted. -// -// Dialogflow provides predefined system entities that can match many common -// types of data. For example, there are system entities for matching dates, -// times, colors, email addresses, and so on. You can also create your own -// custom entities for matching custom data. For example, you could define a -// vegetable entity that can match the types of vegetables available for -// purchase with a grocery store agent. -// -// For more information, see the -// [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview). -message EntityType { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/EntityType" - pattern: "projects/{project}/agent/entityTypes/{entity_type}" - pattern: "projects/{project}/locations/{location}/agent/entityTypes/{entity_type}" - }; - - // An **entity entry** for an associated entity type. - message Entity { - // Required. The primary value associated with this entity entry. - // For example, if the entity type is *vegetable*, the value could be - // *scallions*. - // - // For `KIND_MAP` entity types: - // - // * A reference value to be used in place of synonyms. - // - // For `KIND_LIST` entity types: - // - // * A string that can contain references to other entity types (with or - // without aliases). - string value = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. A collection of value synonyms. For example, if the entity type - // is *vegetable*, and `value` is *scallions*, a synonym could be *green - // onions*. - // - // For `KIND_LIST` entity types: - // - // * This collection must contain exactly one synonym equal to `value`. - repeated string synonyms = 2; - } - - // Represents kinds of entities. - enum Kind { - // Not specified. This value should be never used. - KIND_UNSPECIFIED = 0; - - // Map entity types allow mapping of a group of synonyms to a reference - // value. - KIND_MAP = 1; - - // List entity types contain a set of entries that do not map to reference - // values. However, list entity types can contain references to other entity - // types (with or without aliases). - KIND_LIST = 2; - - // Regexp entity types allow to specify regular expressions in entries - // values. - KIND_REGEXP = 3; - } - - // Represents different entity type expansion modes. Automated expansion - // allows an agent to recognize values that have not been explicitly listed in - // the entity (for example, new kinds of shopping list items). - enum AutoExpansionMode { - // Auto expansion disabled for the entity. - AUTO_EXPANSION_MODE_UNSPECIFIED = 0; - - // Allows an agent to recognize values that have not been explicitly - // listed in the entity. - AUTO_EXPANSION_MODE_DEFAULT = 1; - } - - // The unique identifier of the entity type. - // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType] and - // [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes] methods. - // Supported formats: - // - `projects//agent/entityTypes/` - // - `projects//locations//agent/entityTypes/` - string name = 1; - - // Required. The name of the entity type. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Indicates the kind of entity type. - Kind kind = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Indicates whether the entity type can be automatically - // expanded. - AutoExpansionMode auto_expansion_mode = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of entity entries associated with the entity type. - repeated Entity entities = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Enables fuzzy entity extraction during classification. - bool enable_fuzzy_extraction = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. -message ListEntityTypesRequest { - // Required. The agent to list all entity types from. - // Supported formats: - // - `projects//agent` - // - `projects//locations//agent` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. -message ListEntityTypesResponse { - // The list of agent entity types. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated EntityType entity_types = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType]. -message GetEntityTypeRequest { - // Required. The name of the entity type. - // Supported formats: - // - `projects//agent/entityTypes/` - // - `projects//locations//agent/entityTypes/` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType]. -message CreateEntityTypeRequest { - // Required. The agent to create a entity type for. - // Supported formats: - // - `projects//agent` - // - `projects//locations//agent` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The entity type to create. - EntityType entity_type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType]. -message UpdateEntityTypeRequest { - // Required. The entity type to update. - EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityType]. -message DeleteEntityTypeRequest { - // Required. The name of the entity type to delete. - // Supported formats: - // - `projects//agent/entityTypes/` - // - `projects//locations//agent/entityTypes/` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; -} - -// The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. -message BatchUpdateEntityTypesRequest { - // Required. The name of the agent to update or create entity types in. - // Supported formats: - // - `projects//agent` - // - `projects//locations//agent` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // The source of the entity type batch. - // - // For each entity type in the batch: - // - // * If `name` is specified, we update an existing entity type. - // * If `name` is not specified, we create a new entity type. - oneof entity_type_batch { - // The URI to a Google Cloud Storage file containing entity types to update - // or create. The file format can either be a serialized proto (of - // EntityBatch type) or a JSON object. Note: The URI must start with - // "gs://". - string entity_type_batch_uri = 2; - - // The collection of entity types to update or create. - EntityTypeBatch entity_type_batch_inline = 3; - } - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. -message BatchUpdateEntityTypesResponse { - // The collection of updated or created entity types. - repeated EntityType entity_types = 1; -} - -// The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes]. -message BatchDeleteEntityTypesRequest { - // Required. The name of the agent to delete all entities types for. - // Supported formats: - // - `projects//agent`, - // - `projects//locations//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The names entity types to delete. All names must point to the - // same agent as `parent`. - repeated string entity_type_names = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities]. -message BatchCreateEntitiesRequest { - // Required. The name of the entity type to create entities in. - // Supported formats: - // - `projects//agent/entityTypes/` - // - `projects//locations//agent/entityTypes/` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The entities to create. - repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities]. -message BatchUpdateEntitiesRequest { - // Required. The name of the entity type to update or create entities in. - // Supported formats: - // - `projects//agent/entityTypes/` - // - `projects//locations//agent/entityTypes/` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The entities to update or create. - repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 4; -} - -// The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntities]. -message BatchDeleteEntitiesRequest { - // Required. The name of the entity type to delete entries for. - // Supported formats: - // - `projects//agent/entityTypes/` - // - `projects//locations//agent/entityTypes/` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/EntityType" - } - ]; - - // Required. The reference `values` of the entities to delete. Note that - // these are not fully-qualified names, i.e. they don't start with - // `projects/`. - repeated string entity_values = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// This message is a wrapper around a collection of entity types. -message EntityTypeBatch { - // A collection of entity types. - repeated EntityType entity_types = 1; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/environment.proto b/google/cloud/dialogflow_v2beta1/proto/environment.proto deleted file mode 100644 index a933b9bea..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/environment.proto +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/audio_config.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "EnvironmentProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [Environments][google.cloud.dialogflow.v2beta1.Environment]. -service Environments { - 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 non-draft environments of the specified agent. - rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*/agent}/environments" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/agent}/environments" - } - }; - option (google.api.method_signature) = "parent"; - } -} - -// You can create multiple versions of your agent and publish them to separate -// environments. -// -// When you edit an agent, you are editing the draft agent. At any point, you -// can save the draft agent as an agent version, which is an immutable snapshot -// of your agent. -// -// When you save the draft agent, it is published to the default environment. -// When you create agent versions, you can publish them to custom environments. -// You can create a variety of custom environments for: -// -// - testing -// - development -// - production -// - etc. -// -// For more information, see the [versions and environments -// guide](https://cloud.google.com/dialogflow/docs/agents-versions). -message Environment { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Environment" - pattern: "projects/{project}/agent/environments/{environment}" - pattern: "projects/{project}/locations/{location}/agent/environments/{environment}" - }; - - // Represents an environment state. When an environment is pointed to a new - // agent version, the environment is temporarily set to the `LOADING` state. - // During that time, the environment keeps on serving the previous version of - // the agent. After the new agent version is done loading, the environment is - // set back to the `RUNNING` state. - enum State { - // Not specified. This value is not used. - STATE_UNSPECIFIED = 0; - - // Stopped. - STOPPED = 1; - - // Loading. - LOADING = 2; - - // Running. - RUNNING = 3; - } - - // Output only. The unique identifier of this agent environment. - // Supported formats: - // - `projects//agent/environments/` - // - `projects//locations//agent/environments/` - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The developer-provided description for this environment. - // The maximum length is 500 characters. If exceeded, the request is rejected. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The agent version loaded into this environment. - // Supported formats: - // - `projects//agent/versions/` - // - `projects//locations//agent/versions/` - string agent_version = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The state of this environment. This field is read-only, i.e., it cannot be - // set by create and update methods. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update time of this environment. This field is read-only, i.e., it - // cannot be set by create and update methods. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. -message ListEnvironmentsRequest { - // Required. The agent to list all environments from. - // Format: - // - `projects//agent` - // - `projects//locations//agent` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Environment" - } - ]; - - // Optional. The maximum number of items to return in a single page. By default 100 and - // at most 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. -message ListEnvironmentsResponse { - // The list of agent environments. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated Environment environments = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/gcs.proto b/google/cloud/dialogflow_v2beta1/proto/gcs.proto deleted file mode 100644 index f01ad76f3..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/gcs.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "GcsProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Google Cloud Storage locations for the inputs. -message GcsSources { - // Required. Google Cloud Storage URIs for the inputs. A URI is of the - // form: - // gs://bucket/object-prefix-or-name - // Whether a prefix or name is used depends on the use case. - repeated string uris = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Google Cloud Storage location for single input. -message GcsSource { - // Required. The Google Cloud Storage URIs for the inputs. A URI is of the - // form: - // gs://bucket/object-prefix-or-name - // Whether a prefix or name is used depends on the use case. - string uri = 1; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/human_agent_assistant_event.proto b/google/cloud/dialogflow_v2beta1/proto/human_agent_assistant_event.proto deleted file mode 100644 index d49c83acb..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/human_agent_assistant_event.proto +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -import "google/cloud/dialogflow/v2beta1/participant.proto"; -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "HumanAgentAssistantEventProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Output only. Represents a notification sent to Pub/Sub subscribers for -// agent assistant events in a specific conversation. -message HumanAgentAssistantEvent { - // The conversation this notification refers to. - // Format: `projects//conversations/`. - string conversation = 1; - - // The participant that the suggestion is compiled for. And This field is used - // to call [Participants.ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] API. Format: - // `projects//conversations//participants/`. - // It will not be set in legacy workflow. - // [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name] for more - // information. - string participant = 3; - - // The suggestion results payload that this notification refers to. It will - // only be set when - // [HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses] - // sets to true. - repeated SuggestionResult suggestion_results = 5; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/intent.proto b/google/cloud/dialogflow_v2beta1/proto/intent.proto deleted file mode 100644 index ba8c1f830..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/intent.proto +++ /dev/null @@ -1,1411 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/audio_config.proto"; -import "google/cloud/dialogflow/v2beta1/context.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "IntentProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [Intents][google.cloud.dialogflow.v2beta1.Intent]. -service Intents { - 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 intents in the specified agent. - rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*/agent}/intents" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/agent}/intents" - } - additional_bindings { - get: "/v2beta1/{parent=projects/*/agent/environments/*}/intents" - } - }; - option (google.api.method_signature) = "parent"; - option (google.api.method_signature) = "parent,language_code"; - } - - // Retrieves the specified intent. - rpc GetIntent(GetIntentRequest) returns (Intent) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/agent/intents/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/agent/intents/*}" - } - }; - option (google.api.method_signature) = "name"; - option (google.api.method_signature) = "name,language_code"; - } - - // Creates an intent in the specified agent. - rpc CreateIntent(CreateIntentRequest) returns (Intent) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent}/intents" - body: "intent" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents" - body: "intent" - } - }; - option (google.api.method_signature) = "parent,intent"; - option (google.api.method_signature) = "parent,intent,language_code"; - } - - // Updates the specified intent. - rpc UpdateIntent(UpdateIntentRequest) returns (Intent) { - option (google.api.http) = { - patch: "/v2beta1/{intent.name=projects/*/agent/intents/*}" - body: "intent" - additional_bindings { - patch: "/v2beta1/{intent.name=projects/*/locations/*/agent/intents/*}" - body: "intent" - } - }; - option (google.api.method_signature) = "intent,update_mask"; - option (google.api.method_signature) = "intent"; - option (google.api.method_signature) = "intent,language_code"; - option (google.api.method_signature) = "intent,language_code,update_mask"; - } - - // Deletes the specified intent and its direct or indirect followup intents. - rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{name=projects/*/agent/intents/*}" - additional_bindings { - delete: "/v2beta1/{name=projects/*/locations/*/agent/intents/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Updates/Creates multiple intents in the specified agent. - // - // Operation - rpc BatchUpdateIntents(BatchUpdateIntentsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent}/intents:batchUpdate" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchUpdate" - body: "*" - } - }; - option (google.api.method_signature) = "parent,intent_batch_uri"; - option (google.api.method_signature) = "parent,intent_batch_inline"; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse" - metadata_type: "google.protobuf.Struct" - }; - } - - // Deletes intents in the specified agent. - // - // Operation - rpc BatchDeleteIntents(BatchDeleteIntentsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent}/intents:batchDelete" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchDelete" - body: "*" - } - }; - option (google.api.method_signature) = "parent,intents"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.protobuf.Struct" - }; - } -} - -// An intent categorizes an end-user's intention for one conversation turn. For -// each agent, you define many intents, where your combined intents can handle a -// complete conversation. When an end-user writes or says something, referred to -// as an end-user expression or end-user input, Dialogflow matches the end-user -// input to the best intent in your agent. Matching an intent is also known as -// intent classification. -// -// For more information, see the [intent -// guide](https://cloud.google.com/dialogflow/docs/intents-overview). -message Intent { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Intent" - pattern: "projects/{project}/agent/intents/{intent}" - pattern: "projects/{project}/locations/{location}/agent/intents/{intent}" - }; - - // Represents an example that the agent is trained on. - message TrainingPhrase { - // Represents a part of a training phrase. - message Part { - // Required. The text for this part. - string text = 1; - - // Optional. The entity type name prefixed with `@`. - // This field is required for annotated parts of the training phrase. - string entity_type = 2; - - // Optional. The parameter name for the value extracted from the - // annotated part of the example. - // This field is required for annotated parts of the training phrase. - string alias = 3; - - // Optional. Indicates whether the text was manually annotated. - // This field is set to true when the Dialogflow Console is used to - // manually annotate the part. When creating an annotated part with the - // API, you must set this to true. - bool user_defined = 4; - } - - // Represents different types of training phrases. - enum Type { - // Not specified. This value should never be used. - TYPE_UNSPECIFIED = 0; - - // Examples do not contain @-prefixed entity type names, but example parts - // can be annotated with entity types. - EXAMPLE = 1; - - // Templates are not annotated with entity types, but they can contain - // @-prefixed entity type names as substrings. - // Template mode has been deprecated. Example mode is the only supported - // way to create new training phrases. If you have existing training - // phrases that you've created in template mode, those will continue to - // work. - TEMPLATE = 2 [deprecated = true]; - } - - // Output only. The unique identifier of this training phrase. - string name = 1; - - // Required. The type of the training phrase. - Type type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ordered list of training phrase parts. - // The parts are concatenated in order to form the training phrase. - // - // Note: The API does not automatically annotate training phrases like the - // Dialogflow Console does. - // - // Note: Do not forget to include whitespace at part boundaries, - // so the training phrase is well formatted when the parts are concatenated. - // - // If the training phrase does not need to be annotated with parameters, - // you just need a single part with only the [Part.text][google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.text] field set. - // - // If you want to annotate the training phrase, you must create multiple - // parts, where the fields of each part are populated in one of two ways: - // - // - `Part.text` is set to a part of the phrase that has no parameters. - // - `Part.text` is set to a part of the phrase that you want to annotate, - // and the `entity_type`, `alias`, and `user_defined` fields are all - // set. - repeated Part parts = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Indicates how many times this example was added to - // the intent. Each time a developer adds an existing sample by editing an - // intent or training, this counter is increased. - int32 times_added_count = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Represents intent parameters. - message Parameter { - // The unique identifier of this parameter. - string name = 1; - - // Required. The name of the parameter. - string display_name = 2; - - // Optional. The definition of the parameter value. It can be: - // - // - a constant string, - // - a parameter value defined as `$parameter_name`, - // - an original parameter value defined as `$parameter_name.original`, - // - a parameter value from some context defined as - // `#context_name.parameter_name`. - string value = 3; - - // Optional. The default value to use when the `value` yields an empty - // result. - // Default values can be extracted from contexts by using the following - // syntax: `#context_name.parameter_name`. - string default_value = 4; - - // Optional. The name of the entity type, prefixed with `@`, that - // describes values of the parameter. If the parameter is - // required, this must be provided. - string entity_type_display_name = 5; - - // Optional. Indicates whether the parameter is required. That is, - // whether the intent cannot be completed without collecting the parameter - // value. - bool mandatory = 6; - - // Optional. The collection of prompts that the agent can present to the - // user in order to collect a value for the parameter. - repeated string prompts = 7; - - // Optional. Indicates whether the parameter represents a list of values. - bool is_list = 8; - } - - // Corresponds to the `Response` field in the Dialogflow console. - message Message { - // The text response message. - message Text { - // Optional. The collection of the agent's responses. - repeated string text = 1; - } - - // The image response message. - message Image { - // Optional. The public URI to an image file. - string image_uri = 1; - - // A text description of the image to be used for accessibility, - // e.g., screen readers. Required if image_uri is set for CarouselSelect. - string accessibility_text = 2; - } - - // The quick replies response message. - message QuickReplies { - // Optional. The title of the collection of quick replies. - string title = 1; - - // Optional. The collection of quick replies. - repeated string quick_replies = 2; - } - - // The card response message. - message Card { - // Optional. Contains information about a button. - message Button { - // Optional. The text to show on the button. - string text = 1; - - // Optional. The text to send back to the Dialogflow API or a URI to - // open. - string postback = 2; - } - - // Optional. The title of the card. - string title = 1; - - // Optional. The subtitle of the card. - string subtitle = 2; - - // Optional. The public URI to an image file for the card. - string image_uri = 3; - - // Optional. The collection of card buttons. - repeated Button buttons = 4; - } - - // The simple response message containing speech or text. - message SimpleResponse { - // One of text_to_speech or ssml must be provided. The plain text of the - // speech output. Mutually exclusive with ssml. - string text_to_speech = 1; - - // One of text_to_speech or ssml must be provided. Structured spoken - // response to the user in the SSML format. Mutually exclusive with - // text_to_speech. - string ssml = 2; - - // Optional. The text to display. - string display_text = 3; - } - - // The collection of simple response candidates. - // This message in `QueryResult.fulfillment_messages` and - // `WebhookResponse.fulfillment_messages` should contain only one - // `SimpleResponse`. - message SimpleResponses { - // Required. The list of simple responses. - repeated SimpleResponse simple_responses = 1; - } - - // The basic card message. Useful for displaying information. - message BasicCard { - // The button object that appears at the bottom of a card. - message Button { - // Opens the given URI. - message OpenUriAction { - // Required. The HTTP or HTTPS scheme URI. - string uri = 1; - } - - // Required. The title of the button. - string title = 1; - - // Required. Action to take when a user taps on the button. - OpenUriAction open_uri_action = 2; - } - - // Optional. The title of the card. - string title = 1; - - // Optional. The subtitle of the card. - string subtitle = 2; - - // Required, unless image is present. The body text of the card. - string formatted_text = 3; - - // Optional. The image for the card. - Image image = 4; - - // Optional. The collection of card buttons. - repeated Button buttons = 5; - } - - // The suggestion chip message that the user can tap to quickly post a reply - // to the conversation. - message Suggestion { - // Required. The text shown the in the suggestion chip. - string title = 1; - } - - // The collection of suggestions. - message Suggestions { - // Required. The list of suggested replies. - repeated Suggestion suggestions = 1; - } - - // The suggestion chip message that allows the user to jump out to the app - // or website associated with this agent. - message LinkOutSuggestion { - // Required. The name of the app or site this chip is linking to. - string destination_name = 1; - - // Required. The URI of the app or site to open when the user taps the - // suggestion chip. - string uri = 2; - } - - // The card for presenting a list of options to select from. - message ListSelect { - // An item in the list. - message Item { - // Required. Additional information about this option. - SelectItemInfo info = 1; - - // Required. The title of the list item. - string title = 2; - - // Optional. The main text describing the item. - string description = 3; - - // Optional. The image to display. - Image image = 4; - } - - // Optional. The overall title of the list. - string title = 1; - - // Required. List items. - repeated Item items = 2; - - // Optional. Subtitle of the list. - string subtitle = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // The card for presenting a carousel of options to select from. - message CarouselSelect { - // An item in the carousel. - message Item { - // Required. Additional info about the option item. - SelectItemInfo info = 1; - - // Required. Title of the carousel item. - string title = 2; - - // Optional. The body text of the card. - string description = 3; - - // Optional. The image to display. - Image image = 4; - } - - // Required. Carousel items. - repeated Item items = 1; - } - - // Additional info about the select item for when it is triggered in a - // dialog. - message SelectItemInfo { - // Required. A unique key that will be sent back to the agent if this - // response is given. - string key = 1; - - // Optional. A list of synonyms that can also be used to trigger this - // item in dialog. - repeated string synonyms = 2; - } - - // Plays audio from a file in Telephony Gateway. - message TelephonyPlayAudio { - // Required. URI to a Google Cloud Storage object containing the audio to - // play, e.g., "gs://bucket/object". The object must contain a single - // channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. - // - // This object must be readable by the `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` service account - // where is the number of the Telephony Gateway project - // (usually the same as the Dialogflow agent project). If the Google Cloud - // Storage bucket is in the Telephony Gateway project, this permission is - // added by default when enabling the Dialogflow V2 API. - // - // For audio from other sources, consider using the - // `TelephonySynthesizeSpeech` message with SSML. - string audio_uri = 1; - } - - // Synthesizes speech and plays back the synthesized audio to the caller in - // Telephony Gateway. - // - // Telephony Gateway takes the synthesizer settings from - // `DetectIntentResponse.output_audio_config` which can either be set - // at request-level or can come from the agent-level synthesizer config. - message TelephonySynthesizeSpeech { - // Required. The source to be synthesized. - oneof source { - // The raw text to be synthesized. - string text = 1; - - // The SSML to be synthesized. For more information, see - // [SSML](https://developers.google.com/actions/reference/ssml). - string ssml = 2; - } - } - - // Transfers the call in Telephony Gateway. - message TelephonyTransferCall { - // Required. The phone number to transfer the call to - // in [E.164 format](https://en.wikipedia.org/wiki/E.164). - // - // We currently only allow transferring to US numbers (+1xxxyyyzzzz). - string phone_number = 1; - } - - // Rich Business Messaging (RBM) text response with suggestions. - message RbmText { - // Required. Text sent and displayed to the user. - string text = 1; - - // Optional. One or more suggestions to show to the user. - repeated RbmSuggestion rbm_suggestion = 2; - } - - // Carousel Rich Business Messaging (RBM) rich card. - // - // Rich cards allow you to respond to users with more vivid content, e.g. - // with media and suggestions. - // - // If you want to show a single card with more control over the layout, - // please use [RbmStandaloneCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard] instead. - message RbmCarouselCard { - // The width of the cards in the carousel. - enum CardWidth { - // Not specified. - CARD_WIDTH_UNSPECIFIED = 0; - - // 120 DP. Note that tall media cannot be used. - SMALL = 1; - - // 232 DP. - MEDIUM = 2; - } - - // Required. The width of the cards in the carousel. - CardWidth card_width = 1; - - // Required. The cards in the carousel. A carousel must have at least - // 2 cards and at most 10. - repeated RbmCardContent card_contents = 2; - } - - // Standalone Rich Business Messaging (RBM) rich card. - // - // Rich cards allow you to respond to users with more vivid content, e.g. - // with media and suggestions. - // - // You can group multiple rich cards into one using [RbmCarouselCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard] but - // carousel cards will give you less control over the card layout. - message RbmStandaloneCard { - // Orientation of the card. - enum CardOrientation { - // Not specified. - CARD_ORIENTATION_UNSPECIFIED = 0; - - // Horizontal layout. - HORIZONTAL = 1; - - // Vertical layout. - VERTICAL = 2; - } - - // Thumbnail preview alignment for standalone cards with horizontal - // layout. - enum ThumbnailImageAlignment { - // Not specified. - THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED = 0; - - // Thumbnail preview is left-aligned. - LEFT = 1; - - // Thumbnail preview is right-aligned. - RIGHT = 2; - } - - // Required. Orientation of the card. - CardOrientation card_orientation = 1; - - // Required if orientation is horizontal. - // Image preview alignment for standalone cards with horizontal layout. - ThumbnailImageAlignment thumbnail_image_alignment = 2; - - // Required. Card content. - RbmCardContent card_content = 3; - } - - // Rich Business Messaging (RBM) Card content - message RbmCardContent { - // Rich Business Messaging (RBM) Media displayed in Cards - // The following media-types are currently supported: - // - // Image Types - // - // * image/jpeg - // * image/jpg' - // * image/gif - // * image/png - // - // Video Types - // - // * video/h263 - // * video/m4v - // * video/mp4 - // * video/mpeg - // * video/mpeg4 - // * video/webm - message RbmMedia { - // Media height - enum Height { - // Not specified. - HEIGHT_UNSPECIFIED = 0; - - // 112 DP. - SHORT = 1; - - // 168 DP. - MEDIUM = 2; - - // 264 DP. Not available for rich card carousels when the card width - // is set to small. - TALL = 3; - } - - // Required. Publicly reachable URI of the file. The RBM platform - // determines the MIME type of the file from the content-type field in - // the HTTP headers when the platform fetches the file. The content-type - // field must be present and accurate in the HTTP response from the URL. - string file_uri = 1; - - // Optional. Publicly reachable URI of the thumbnail.If you don't - // provide a thumbnail URI, the RBM platform displays a blank - // placeholder thumbnail until the user's device downloads the file. - // Depending on the user's setting, the file may not download - // automatically and may require the user to tap a download button. - string thumbnail_uri = 2; - - // Required for cards with vertical orientation. The height of the media - // within a rich card with a vertical layout. - // For a standalone card with horizontal layout, height is not - // customizable, and this field is ignored. - Height height = 3; - } - - // Optional. Title of the card (at most 200 bytes). - // - // At least one of the title, description or media must be set. - string title = 1; - - // Optional. Description of the card (at most 2000 bytes). - // - // At least one of the title, description or media must be set. - string description = 2; - - // Optional. However at least one of the title, description or media must - // be set. Media (image, GIF or a video) to include in the card. - RbmMedia media = 3; - - // Optional. List of suggestions to include in the card. - repeated RbmSuggestion suggestions = 4; - } - - // Rich Business Messaging (RBM) suggestion. Suggestions allow user to - // easily select/click a predefined response or perform an action (like - // opening a web uri). - message RbmSuggestion { - // Predefined suggested response or action for user to choose - oneof suggestion { - // Predefined replies for user to select instead of typing - RbmSuggestedReply reply = 1; - - // Predefined client side actions that user can choose - RbmSuggestedAction action = 2; - } - } - - // Rich Business Messaging (RBM) suggested reply that the user can click - // instead of typing in their own response. - message RbmSuggestedReply { - // Suggested reply text. - string text = 1; - - // Opaque payload that the Dialogflow receives in a user event - // when the user taps the suggested reply. This data will be also - // forwarded to webhook to allow performing custom business logic. - string postback_data = 2; - } - - // Rich Business Messaging (RBM) suggested client-side action that the user - // can choose from the card. - message RbmSuggestedAction { - // Opens the user's default dialer app with the specified phone number - // but does not dial automatically. - message RbmSuggestedActionDial { - // Required. The phone number to fill in the default dialer app. - // This field should be in [E.164](https://en.wikipedia.org/wiki/E.164) - // format. An example of a correctly formatted phone number: - // +15556767888. - string phone_number = 1; - } - - // Opens the user's default web browser app to the specified uri - // If the user has an app installed that is - // registered as the default handler for the URL, then this app will be - // opened instead, and its icon will be used in the suggested action UI. - message RbmSuggestedActionOpenUri { - // Required. The uri to open on the user device - string uri = 1; - } - - // Opens the device's location chooser so the user can pick a location - // to send back to the agent. - message RbmSuggestedActionShareLocation { - - } - - // Text to display alongside the action. - string text = 1; - - // Opaque payload that the Dialogflow receives in a user event - // when the user taps the suggested action. This data will be also - // forwarded to webhook to allow performing custom business logic. - string postback_data = 2; - - // Action that needs to be triggered. - oneof action { - // Suggested client side action: Dial a phone number - RbmSuggestedActionDial dial = 3; - - // Suggested client side action: Open a URI on device - RbmSuggestedActionOpenUri open_url = 4; - - // Suggested client side action: Share user location - RbmSuggestedActionShareLocation share_location = 5; - } - } - - // The media content card for Actions on Google. - message MediaContent { - // Response media object for media content card. - message ResponseMediaObject { - // Required. Name of media card. - string name = 1; - - // Optional. Description of media card. - string description = 2; - - // Image to show with the media card. - oneof image { - // Optional. Image to display above media content. - Image large_image = 3; - - // Optional. Icon to display above media content. - Image icon = 4; - } - - // Required. Url where the media is stored. - string content_url = 5; - } - - // Format of response media type. - enum ResponseMediaType { - // Unspecified. - RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; - - // Response media type is audio. - AUDIO = 1; - } - - // Optional. What type of media is the content (ie "audio"). - ResponseMediaType media_type = 1; - - // Required. List of media objects. - repeated ResponseMediaObject media_objects = 2; - } - - // Browse Carousel Card for Actions on Google. - // https://developers.google.com/actions/assistant/responses#browsing_carousel - message BrowseCarouselCard { - // Browsing carousel tile - message BrowseCarouselCardItem { - // Actions on Google action to open a given url. - message OpenUrlAction { - // Type of the URI. - enum UrlTypeHint { - // Unspecified - URL_TYPE_HINT_UNSPECIFIED = 0; - - // Url would be an amp action - AMP_ACTION = 1; - - // URL that points directly to AMP content, or to a canonical URL - // which refers to AMP content via . - AMP_CONTENT = 2; - } - - // Required. URL - string url = 1; - - // Optional. Specifies the type of viewer that is used when opening - // the URL. Defaults to opening via web browser. - UrlTypeHint url_type_hint = 3; - } - - // Required. Action to present to the user. - OpenUrlAction open_uri_action = 1; - - // Required. Title of the carousel item. Maximum of two lines of text. - string title = 2; - - // Optional. Description of the carousel item. Maximum of four lines of - // text. - string description = 3; - - // Optional. Hero image for the carousel item. - Image image = 4; - - // Optional. Text that appears at the bottom of the Browse Carousel - // Card. Maximum of one line of text. - string footer = 5; - } - - // Image display options for Actions on Google. This should be used for - // when the image's aspect ratio does not match the image container's - // aspect ratio. - enum ImageDisplayOptions { - // Fill the gaps between the image and the image container with gray - // bars. - IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; - - // Fill the gaps between the image and the image container with gray - // bars. - GRAY = 1; - - // Fill the gaps between the image and the image container with white - // bars. - WHITE = 2; - - // Image is scaled such that the image width and height match or exceed - // the container dimensions. This may crop the top and bottom of the - // image if the scaled image height is greater than the container - // height, or crop the left and right of the image if the scaled image - // width is greater than the container width. This is similar to "Zoom - // Mode" on a widescreen TV when playing a 4:3 video. - CROPPED = 3; - - // Pad the gaps between image and image frame with a blurred copy of the - // same image. - BLURRED_BACKGROUND = 4; - } - - // Required. List of items in the Browse Carousel Card. Minimum of two - // items, maximum of ten. - repeated BrowseCarouselCardItem items = 1; - - // Optional. Settings for displaying the image. Applies to every image in - // [items][google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.items]. - ImageDisplayOptions image_display_options = 2; - } - - // Table card for Actions on Google. - message TableCard { - // Required. Title of the card. - string title = 1; - - // Optional. Subtitle to the title. - string subtitle = 2; - - // Optional. Image which should be displayed on the card. - Image image = 3; - - // Optional. Display properties for the columns in this table. - repeated ColumnProperties column_properties = 4; - - // Optional. Rows in this table of data. - repeated TableCardRow rows = 5; - - // Optional. List of buttons for the card. - repeated BasicCard.Button buttons = 6; - } - - // Column properties for [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard]. - message ColumnProperties { - // Text alignments within a cell. - enum HorizontalAlignment { - // Text is aligned to the leading edge of the column. - HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; - - // Text is aligned to the leading edge of the column. - LEADING = 1; - - // Text is centered in the column. - CENTER = 2; - - // Text is aligned to the trailing edge of the column. - TRAILING = 3; - } - - // Required. Column heading. - string header = 1; - - // Optional. Defines text alignment for all cells in this column. - HorizontalAlignment horizontal_alignment = 2; - } - - // Row of [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard]. - message TableCardRow { - // Optional. List of cells that make up this row. - repeated TableCardCell cells = 1; - - // Optional. Whether to add a visual divider after this row. - bool divider_after = 2; - } - - // Cell of [TableCardRow][google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow]. - message TableCardCell { - // Required. Text in this cell. - string text = 1; - } - - // Represents different platforms that a rich message can be intended for. - enum Platform { - // Not specified. - PLATFORM_UNSPECIFIED = 0; - - // Facebook. - FACEBOOK = 1; - - // Slack. - SLACK = 2; - - // Telegram. - TELEGRAM = 3; - - // Kik. - KIK = 4; - - // Skype. - SKYPE = 5; - - // Line. - LINE = 6; - - // Viber. - VIBER = 7; - - // Google Assistant - // See [Dialogflow webhook - // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) - ACTIONS_ON_GOOGLE = 8; - - // Telephony Gateway. - TELEPHONY = 10; - - // Google Hangouts. - GOOGLE_HANGOUTS = 11; - } - - // Required. The rich response message. - oneof message { - // Returns a text response. - Text text = 1; - - // Displays an image. - Image image = 2; - - // Displays quick replies. - QuickReplies quick_replies = 3; - - // Displays a card. - Card card = 4; - - // A custom platform-specific response. - google.protobuf.Struct payload = 5; - - // Returns a voice or text-only response for Actions on Google. - SimpleResponses simple_responses = 7; - - // Displays a basic card for Actions on Google. - BasicCard basic_card = 8; - - // Displays suggestion chips for Actions on Google. - Suggestions suggestions = 9; - - // Displays a link out suggestion chip for Actions on Google. - LinkOutSuggestion link_out_suggestion = 10; - - // Displays a list card for Actions on Google. - ListSelect list_select = 11; - - // Displays a carousel card for Actions on Google. - CarouselSelect carousel_select = 12; - - // Plays audio from a file in Telephony Gateway. - TelephonyPlayAudio telephony_play_audio = 13; - - // Synthesizes speech in Telephony Gateway. - TelephonySynthesizeSpeech telephony_synthesize_speech = 14; - - // Transfers the call in Telephony Gateway. - TelephonyTransferCall telephony_transfer_call = 15; - - // Rich Business Messaging (RBM) text response. - // - // RBM allows businesses to send enriched and branded versions of SMS. See - // https://jibe.google.com/business-messaging. - RbmText rbm_text = 18; - - // Standalone Rich Business Messaging (RBM) rich card response. - RbmStandaloneCard rbm_standalone_rich_card = 19; - - // Rich Business Messaging (RBM) carousel rich card response. - RbmCarouselCard rbm_carousel_rich_card = 20; - - // Browse carousel card for Actions on Google. - BrowseCarouselCard browse_carousel_card = 22; - - // Table card for Actions on Google. - TableCard table_card = 23; - - // The media content card for Actions on Google. - MediaContent media_content = 24; - } - - // Optional. The platform that this message is intended for. - Platform platform = 6 [(google.api.field_behavior) = OPTIONAL]; - } - - // Represents a single followup intent in the chain. - message FollowupIntentInfo { - // The unique identifier of the followup intent. - // Format: `projects//agent/intents/`. - string followup_intent_name = 1; - - // The unique identifier of the followup intent's parent. - // Format: `projects//agent/intents/`. - string parent_followup_intent_name = 2; - } - - // Represents the different states that webhooks can be in. - enum WebhookState { - // Webhook is disabled in the agent and in the intent. - WEBHOOK_STATE_UNSPECIFIED = 0; - - // Webhook is enabled in the agent and in the intent. - WEBHOOK_STATE_ENABLED = 1; - - // Webhook is enabled in the agent and in the intent. Also, each slot - // filling prompt is forwarded to the webhook. - WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; - } - - // Optional. The unique identifier of this intent. - // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents] - // methods. - // Supported formats: - // - // - `projects//agent/intents/` - // - `projects//locations//agent/intents/` - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The name of this intent. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Indicates whether webhooks are enabled for the intent. - WebhookState webhook_state = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The priority of this intent. Higher numbers represent higher - // priorities. - // - // - If the supplied value is unspecified or 0, the service - // translates the value to 500,000, which corresponds to the - // `Normal` priority in the console. - // - If the supplied value is negative, the intent is ignored - // in runtime detect intent requests. - int32 priority = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates whether this is a fallback intent. - bool is_fallback = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates whether Machine Learning is enabled for the intent. - // Note: If `ml_enabled` setting is set to false, then this intent is not - // taken into account during inference in `ML ONLY` match mode. Also, - // auto-markup in the UI is turned off. - // DEPRECATED! Please use `ml_disabled` field instead. - // NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false, - // then the default value is determined as follows: - // - // - Before April 15th, 2018 the default is: - // ml_enabled = false / ml_disabled = true. - // - After April 15th, 2018 the default is: - // ml_enabled = true / ml_disabled = false. - bool ml_enabled = 5 [ - deprecated = true, - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. Indicates whether Machine Learning is disabled for the intent. - // Note: If `ml_disabled` setting is set to true, then this intent is not - // taken into account during inference in `ML ONLY` match mode. Also, - // auto-markup in the UI is turned off. - bool ml_disabled = 19 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates that a live agent should be brought in to handle the - // interaction with the user. In most cases, when you set this flag to true, - // you would also want to set end_interaction to true as well. Default is - // false. - bool live_agent_handoff = 20 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates that this intent ends an interaction. Some integrations - // (e.g., Actions on Google or Dialogflow phone gateway) use this information - // to close interaction with an end user. Default is false. - bool end_interaction = 21 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of context names required for this intent to be - // triggered. - // Formats: - // - // - `projects//agent/sessions/-/contexts/` - // - `projects//locations//agent/sessions/-/contexts/` - repeated string input_context_names = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of event names that trigger the intent. - // If the collection of input contexts is not empty, all of the contexts must - // be present in the active user session for an event to trigger this intent. - // Event names are limited to 150 characters. - repeated string events = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of examples that the agent is - // trained on. - repeated TrainingPhrase training_phrases = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the action associated with the intent. - // Note: The action name must not contain whitespaces. - string action = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of contexts that are activated when the intent - // is matched. Context messages in this collection should not set the - // parameters field. Setting the `lifespan_count` to 0 will reset the context - // when the intent is matched. - // Format: `projects//agent/sessions/-/contexts/`. - repeated Context output_contexts = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates whether to delete all contexts in the current - // session when this intent is matched. - bool reset_contexts = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of parameters associated with the intent. - repeated Parameter parameters = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The collection of rich messages corresponding to the - // `Response` field in the Dialogflow console. - repeated Message messages = 14; - - // Optional. The list of platforms for which the first responses will be - // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). - repeated Message.Platform default_response_platforms = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The unique identifier of the root intent in the chain of - // followup intents. It identifies the correct followup intents chain for - // this intent. - // - // Format: `projects//agent/intents/`. - string root_followup_intent_name = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The unique identifier of the parent intent in the - // chain of followup intents. You can set this field when creating an intent, - // for example with [CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent] or - // [BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents], in order to make this - // intent a followup intent. - // - // It identifies the parent followup intent. - // Format: `projects//agent/intents/`. - string parent_followup_intent_name = 17 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Information about all followup intents that have this intent as - // a direct or indirect parent. We populate this field only in the output. - repeated FollowupIntentInfo followup_intent_info = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents]. -message ListIntentsRequest { - // Required. The agent to list all intents from. - // Format: `projects//agent`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Intent" - } - ]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 3; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 4; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 5; -} - -// The response message for [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents]. -message ListIntentsResponse { - // The list of agent intents. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated Intent intents = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [Intents.GetIntent][google.cloud.dialogflow.v2beta1.Intents.GetIntent]. -message GetIntentRequest { - // Required. The name of the intent. - // Supported formats: - // - // - `projects//agent/intents/` - // - `projects//locations//agent/intents/` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Intent" - } - ]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 3; -} - -// The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent]. -message CreateIntentRequest { - // Required. The agent to create a intent for. - // Supported formats: - // - // - `projects//agent` - // - `projects//locations//agent` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Intent" - } - ]; - - // Required. The intent to create. - Intent intent = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 4; -} - -// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent]. -message UpdateIntentRequest { - // Required. The intent to update. - Intent intent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 4; -} - -// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2beta1.Intents.DeleteIntent]. -message DeleteIntentRequest { - // Required. The name of the intent to delete. If this intent has direct or - // indirect followup intents, we also delete them. - // - // Supported formats: - // - // - `projects//agent/intents/` - // - `projects//locations//agent/intents/` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Intent" - } - ]; -} - -// The request message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]. -message BatchUpdateIntentsRequest { - // Required. The name of the agent to update or create intents in. - // Supported formats: - // - // - `projects//agent` - // - `projects//locations//agent` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Intent" - } - ]; - - // Required. The source of the intent batch. - // - // For each intent in the batch: - // - // * If `name` is specified, we update an existing intent. - // * If `name` is not specified, we create a new intent. - oneof intent_batch { - // The URI to a Google Cloud Storage file containing intents to update or - // create. The file format can either be a serialized proto (of IntentBatch - // type) or JSON object. Note: The URI must start with "gs://". - string intent_batch_uri = 2; - - // The collection of intents to update or create. - IntentBatch intent_batch_inline = 3; - } - - // Optional. The language used to access language-specific data. - // If not specified, the agent's default language is used. - // For more information, see - // [Multilingual intent and entity - // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 5; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 6; -} - -// The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]. -message BatchUpdateIntentsResponse { - // The collection of updated or created intents. - repeated Intent intents = 1; -} - -// The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents]. -message BatchDeleteIntentsRequest { - // Required. The name of the agent to delete all entities types for. - // Supported formats: - // - // - `projects//agent` - // - `projects//locations//agent` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Intent" - } - ]; - - // Required. The collection of intents to delete. Only intent `name` must be - // filled in. - repeated Intent intents = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// This message is a wrapper around a collection of intents. -message IntentBatch { - // A collection of intents. - repeated Intent intents = 1; -} - -// Represents the options for views of an intent. -// An intent can be a sizable object. Therefore, we provide a resource view that -// does not return training phrases in the response by default. -enum IntentView { - // Training phrases field is not populated in the response. - INTENT_VIEW_UNSPECIFIED = 0; - - // All fields are populated. - INTENT_VIEW_FULL = 1; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/knowledge_base.proto b/google/cloud/dialogflow_v2beta1/proto/knowledge_base.proto deleted file mode 100644 index fe50073bc..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/knowledge_base.proto +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "KnowledgeBaseProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [KnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBase]. -service KnowledgeBases { - 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 knowledge bases of the specified agent. - // - // Note: The `projects.agent.knowledgeBases` resource is deprecated; - // only use `projects.knowledgeBases`. - rpc ListKnowledgeBases(ListKnowledgeBasesRequest) returns (ListKnowledgeBasesResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*}/knowledgeBases" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*}/knowledgeBases" - } - additional_bindings { - get: "/v2beta1/{parent=projects/*/agent}/knowledgeBases" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified knowledge base. - // - // Note: The `projects.agent.knowledgeBases` resource is deprecated; - // only use `projects.knowledgeBases`. - rpc GetKnowledgeBase(GetKnowledgeBaseRequest) returns (KnowledgeBase) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/knowledgeBases/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*}" - } - additional_bindings { - get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a knowledge base. - // - // Note: The `projects.agent.knowledgeBases` resource is deprecated; - // only use `projects.knowledgeBases`. - rpc CreateKnowledgeBase(CreateKnowledgeBaseRequest) returns (KnowledgeBase) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/knowledgeBases" - body: "knowledge_base" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*}/knowledgeBases" - body: "knowledge_base" - } - additional_bindings { - post: "/v2beta1/{parent=projects/*/agent}/knowledgeBases" - body: "knowledge_base" - } - }; - option (google.api.method_signature) = "parent,knowledge_base"; - } - - // Deletes the specified knowledge base. - // - // Note: The `projects.agent.knowledgeBases` resource is deprecated; - // only use `projects.knowledgeBases`. - rpc DeleteKnowledgeBase(DeleteKnowledgeBaseRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{name=projects/*/knowledgeBases/*}" - additional_bindings { - delete: "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*}" - } - additional_bindings { - delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Updates the specified knowledge base. - // - // Note: The `projects.agent.knowledgeBases` resource is deprecated; - // only use `projects.knowledgeBases`. - rpc UpdateKnowledgeBase(UpdateKnowledgeBaseRequest) returns (KnowledgeBase) { - option (google.api.http) = { - patch: "/v2beta1/{knowledge_base.name=projects/*/knowledgeBases/*}" - body: "knowledge_base" - additional_bindings { - patch: "/v2beta1/{knowledge_base.name=projects/*/locations/*/knowledgeBases/*}" - body: "knowledge_base" - } - additional_bindings { - patch: "/v2beta1/{knowledge_base.name=projects/*/agent/knowledgeBases/*}" - body: "knowledge_base" - } - }; - option (google.api.method_signature) = "knowledge_base,update_mask"; - option (google.api.method_signature) = "knowledge_base"; - } -} - -// A knowledge base represents a collection of knowledge documents that you -// provide to Dialogflow. Your knowledge documents contain information that may -// be useful during conversations with end-users. Some Dialogflow features use -// knowledge bases when looking for a response to an end-user input. -// -// For more information, see the [knowledge base -// guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). -// -// Note: The `projects.agent.knowledgeBases` resource is deprecated; -// only use `projects.knowledgeBases`. -message KnowledgeBase { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/KnowledgeBase" - pattern: "projects/{project}/knowledgeBases/{knowledge_base}" - pattern: "projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}" - }; - - // The knowledge base resource name. - // The name must be empty when creating a knowledge base. - // Format: `projects//locations//knowledgeBases/`. - string name = 1; - - // Required. The display name of the knowledge base. The name must be 1024 - // bytes or less; otherwise, the creation request fails. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Language which represents the KnowledgeBase. When the KnowledgeBase is - // created/updated, this is populated for all non en-us languages. If not - // populated, the default language en-us applies. - string language_code = 4; -} - -// Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. -message ListKnowledgeBasesRequest { - // Required. The project to list of knowledge bases for. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; - - // The maximum number of items to return in a single page. By - // default 10 and at most 100. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request. - string page_token = 3; - - // The filter expression used to filter knowledge bases returned by the list - // method. The expression has the following syntax: - // - // [AND ] ... - // - // The following fields and operators are supported: - // - // * display_name with has(:) operator - // * language_code with equals(=) operator - // - // Examples: - // - // * 'language_code=en-us' matches knowledge bases with en-us language code. - // * 'display_name:articles' matches knowledge bases whose display name - // contains "articles". - // * 'display_name:"Best Articles"' matches knowledge bases whose display - // name contains "Best Articles". - // * 'language_code=en-gb AND display_name=articles' matches all knowledge - // bases whose display name contains "articles" and whose language code is - // "en-gb". - // - // Note: An empty filter string (i.e. "") is a no-op and will result in no - // filtering. - // - // For more information about filtering, see - // [API Filtering](https://aip.dev/160). - string filter = 4; -} - -// Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. -message ListKnowledgeBasesResponse { - // The list of knowledge bases. - repeated KnowledgeBase knowledge_bases = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.GetKnowledgeBase]. -message GetKnowledgeBaseRequest { - // Required. The name of the knowledge base to retrieve. - // Format `projects//locations//knowledgeBases/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; -} - -// Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.CreateKnowledgeBase]. -message CreateKnowledgeBaseRequest { - // Required. The project to create a knowledge base for. - // Format: `projects//locations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; - - // Required. The knowledge base to create. - KnowledgeBase knowledge_base = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.DeleteKnowledgeBase]. -message DeleteKnowledgeBaseRequest { - // Required. The name of the knowledge base to delete. - // Format: `projects//locations//knowledgeBases/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/KnowledgeBase" - } - ]; - - // Optional. Force deletes the knowledge base. When set to true, any documents - // in the knowledge base are also deleted. - bool force = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.UpdateKnowledgeBase]. -message UpdateKnowledgeBaseRequest { - // Required. The knowledge base to update. - KnowledgeBase knowledge_base = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Not specified means `update all`. - // Currently, only `display_name` can be updated, an InvalidArgument will be - // returned for attempting to update other fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/participant.proto b/google/cloud/dialogflow_v2beta1/proto/participant.proto deleted file mode 100644 index 39d0384ea..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/participant.proto +++ /dev/null @@ -1,1027 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/audio_config.proto"; -import "google/cloud/dialogflow/v2beta1/session.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ParticipantProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [Participants][google.cloud.dialogflow.v2beta1.Participant]. -service Participants { - 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"; - - // Creates a new participant in a conversation. - rpc CreateParticipant(CreateParticipantRequest) returns (Participant) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/conversations/*}/participants" - body: "participant" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants" - body: "participant" - } - }; - option (google.api.method_signature) = "parent,participant"; - } - - // Retrieves a conversation participant. - rpc GetParticipant(GetParticipantRequest) returns (Participant) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/conversations/*/participants/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/conversations/*/participants/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Returns the list of all participants in the specified conversation. - rpc ListParticipants(ListParticipantsRequest) returns (ListParticipantsResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*/conversations/*}/participants" - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Updates the specified participant. - rpc UpdateParticipant(UpdateParticipantRequest) returns (Participant) { - option (google.api.http) = { - patch: "/v2beta1/{participant.name=projects/*/conversations/*/participants/*}" - body: "participant" - additional_bindings { - patch: "/v2beta1/{participant.name=projects/*/locations/*/conversations/*/participants/*}" - body: "participant" - } - }; - option (google.api.method_signature) = "participant,update_mask"; - } - - // Adds a text (chat, for example), or audio (phone recording, for example) - // message from a participant into the conversation. - // - // Note: Always use agent versions for production traffic - // sent to virtual agents. See [Versions and - // environments(https://cloud.google.com/dialogflow/es/docs/agents-versions). - rpc AnalyzeContent(AnalyzeContentRequest) returns (AnalyzeContentResponse) { - option (google.api.http) = { - post: "/v2beta1/{participant=projects/*/conversations/*/participants/*}:analyzeContent" - body: "*" - additional_bindings { - post: "/v2beta1/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent" - body: "*" - } - }; - option (google.api.method_signature) = "participant,text_input"; - option (google.api.method_signature) = "participant,event_input"; - } - - // Gets suggested articles for a participant based on specific historical - // messages. - // - // Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated - // suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion - // based on the provided conversation context in the real time. - rpc SuggestArticles(SuggestArticlesRequest) returns (SuggestArticlesResponse) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets suggested faq answers for a participant based on specific historical - // messages. - rpc SuggestFaqAnswers(SuggestFaqAnswersRequest) returns (SuggestFaqAnswersResponse) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets smart replies for a participant based on specific historical - // messages. - rpc SuggestSmartReplies(SuggestSmartRepliesRequest) returns (SuggestSmartRepliesResponse) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestSmartReplies" - body: "*" - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestSmartReplies" - body: "*" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Deprecated: Use inline suggestion, event based suggestion or - // Suggestion* API instead. - // See [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name] for more - // details. - // Removal Date: 2020-09-01. - // - // Retrieves suggestions for live agents. - // - // This method should be used by human agent client software to fetch auto - // generated suggestions in real-time, while the conversation with an end user - // is in progress. The functionality is implemented in terms of the - // [list pagination](https://cloud.google.com/apis/design/design_patterns#list_pagination) - // design pattern. The client app should use the `next_page_token` field - // to fetch the next batch of suggestions. `suggestions` are sorted by - // `create_time` in descending order. - // To fetch latest suggestion, just set `page_size` to 1. - // To fetch new suggestions without duplication, send request with filter - // `create_time_epoch_microseconds > [first item's create_time of previous - // request]` and empty page_token. - rpc ListSuggestions(ListSuggestionsRequest) returns (ListSuggestionsResponse) { - option deprecated = true; - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions" - }; - } - - // Deprecated. use [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles] and [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers] instead. - // - // Gets suggestions for a participant based on specific historical - // messages. - // - // Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated - // suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion - // based on the provided conversation context in the real time. - rpc CompileSuggestion(CompileSuggestionRequest) returns (CompileSuggestionResponse) { - option deprecated = true; - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:compile" - body: "*" - }; - } -} - -// Represents a conversation participant (human agent, virtual agent, end-user). -message Participant { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Participant" - pattern: "projects/{project}/conversations/{conversation}/participants/{participant}" - pattern: "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}" - }; - - // Enumeration of the roles a participant can play in a conversation. - enum Role { - // Participant role not set. - ROLE_UNSPECIFIED = 0; - - // Participant is a human agent. - HUMAN_AGENT = 1; - - // Participant is an automated agent, such as a Dialogflow agent. - AUTOMATED_AGENT = 2; - - // Participant is an end user that has called or chatted with - // Dialogflow services. - END_USER = 3; - } - - // Optional. The unique identifier of this participant. - // Format: `projects//locations//conversations//participants/`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Immutable. The role this participant plays in the conversation. This field must be set - // during participant creation and is then immutable. - Role role = 2 [(google.api.field_behavior) = IMMUTABLE]; - - // Optional. Obfuscated user id that should be associated with the created participant. - // - // You can specify a user id as follows: - // - // 1. If you set this field in - // [CreateParticipantRequest][google.cloud.dialogflow.v2beta1.CreateParticipantRequest.participant] or - // [UpdateParticipantRequest][google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.participant], - // Dialogflow adds the obfuscated user id with the participant. - // - // 2. If you set this field in - // [AnalyzeContent][google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.obfuscated_external_user_id] or - // [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.obfuscated_external_user_id], - // Dialogflow will update [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2beta1.Participant.obfuscated_external_user_id]. - // - // Dialogflow uses this user id for following purposes: - // 1) Billing and measurement. If user with the same - // obfuscated_external_user_id is created in a later conversation, dialogflow - // will know it's the same user. 2) Agent assist suggestion personalization. - // For example, Dialogflow can use it to provide personalized smart reply - // suggestions for this user. - // - // Note: - // - // * Please never pass raw user ids to Dialogflow. Always obfuscate your user - // id first. - // * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a - // hash function like SHA-512. - // * The length of the user id must be <= 256 characters. - string obfuscated_external_user_id = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Represents a message posted into a conversation. -message Message { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/Message" - pattern: "projects/{project}/conversations/{conversation}/messages/{message}" - pattern: "projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}" - }; - - // Optional. The unique identifier of the message. - // Format: `projects//locations//conversations//messages/`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The message content. - string content = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The message language. - // This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - // language tag. Example: "en-US". - string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The participant that sends this message. - string participant = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The role of the participant. - Participant.Role participant_role = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the message was created in Contact Center AI. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The time when the message was sent. - google.protobuf.Timestamp send_time = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The annotation for the message. - MessageAnnotation message_annotation = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The sentiment analysis result for the message. - SentimentAnalysisResult sentiment_analysis = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for [Participants.CreateParticipant][google.cloud.dialogflow.v2beta1.Participants.CreateParticipant]. -message CreateParticipantRequest { - // Required. Resource identifier of the conversation adding the participant. - // Format: `projects//locations//conversations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Participant" - } - ]; - - // Required. The participant to create. - Participant participant = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [Participants.GetParticipant][google.cloud.dialogflow.v2beta1.Participants.GetParticipant]. -message GetParticipantRequest { - // Required. The name of the participant. Format: - // `projects//locations//conversations//participants/`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Participant" - } - ]; -} - -// The request message for [Participants.ListParticipants][google.cloud.dialogflow.v2beta1.Participants.ListParticipants]. -message ListParticipantsRequest { - // Required. The conversation to list all participants from. - // Format: `projects//locations//conversations/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/Participant" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [Participants.ListParticipants][google.cloud.dialogflow.v2beta1.Participants.ListParticipants]. -message ListParticipantsResponse { - // The list of participants. There is a maximum number of items - // returned based on the page_size field in the request. - repeated Participant participants = 1; - - // Token to retrieve the next page of results or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [Participants.UpdateParticipant][google.cloud.dialogflow.v2beta1.Participants.UpdateParticipant]. -message UpdateParticipantRequest { - // Required. The participant to update. - Participant participant = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The mask to specify which fields to update. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Represents the natural language speech audio to be played to the end user. -message OutputAudio { - // Required. Instructs the speech synthesizer how to generate the speech - // audio. - OutputAudioConfig config = 1; - - // Required. The natural language speech audio. - bytes audio = 2; -} - -// Represents a response from an automated agent. -message AutomatedAgentReply { - // Required. - oneof response { - // Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] call. - DetectIntentResponse detect_intent_response = 1; - } - - // Response messages from the automated agent. - repeated ResponseMessage response_messages = 3; - - // Info on the query match for the automated agent response. - oneof match { - // Name of the intent if an intent is matched for the query. - // For a V2 query, the value format is `projects//locations/ - // /agent/intents/`. - // For a V3 query, the value format is `projects//locations/ - // /agents//intents/`. - string intent = 4 [(google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Intent" - }]; - - // Event name if an event is triggered for the query. - string event = 5; - } - - // The collection of current Dialogflow CX agent session parameters at the - // time of this response. - google.protobuf.Struct cx_session_parameters = 6; -} - -// The type of Human Agent Assistant API suggestion to perform, and the maximum -// number of results to return for that type. Multiple `Feature` objects can -// be specified in the `features` list. -message SuggestionFeature { - // Defines the type of Human Agent Assistant feature. - enum Type { - // Unspecified feature type. - TYPE_UNSPECIFIED = 0; - - // Run article suggestion model. - ARTICLE_SUGGESTION = 1; - - // Run FAQ model. - FAQ = 2; - - // Run smart reply model. - SMART_REPLY = 3; - } - - // Type of Human Agent Assistant API feature to request. - Type type = 1; -} - -// The request message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent]. -message AnalyzeContentRequest { - // Required. The name of the participant this text comes from. - // Format: `projects//locations//conversations//participants/`. - string participant = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Participant" - } - ]; - - // Required. The input content. - oneof input { - // The natural language text to be processed. - TextInput text_input = 6; - - // An input event to send to Dialogflow. - EventInput event_input = 8; - } - - // Speech synthesis configuration. - // The speech synthesis settings for a virtual agent that may be configured - // for the associated conversation profile are not used when calling - // AnalyzeContent. If this configuration is not supplied, speech synthesis - // is disabled. - OutputAudioConfig reply_audio_config = 5; - - // Parameters for a Dialogflow virtual-agent query. - QueryParameters query_params = 9; - - // Optional. The send time of the message from end user or human agent's - // perspective. It is used for identifying the same message under one - // participant. - // - // Given two messages under the same participant: - // - If send time are different regardless of whether the content of the - // messages are exactly the same, the conversation will regard them as - // two distinct messages sent by the participant. - // - If send time is the same regardless of whether the content of the - // messages are exactly the same, the conversation will regard them as - // same message, and ignore the message received later. - // - // If the value is not provided, a new request will always be regarded as a - // new message without any de-duplication. - google.protobuf.Timestamp message_send_time = 10; - - // A unique identifier for this request. Restricted to 36 ASCII characters. - // A random UUID is recommended. - // This request is only idempotent if a `request_id` is provided. - string request_id = 11; -} - -// The message in the response that indicates the parameters of DTMF. -message DtmfParameters { - // Indicates whether DTMF input can be handled in the next request. - bool accepts_dtmf_input = 1; -} - -// The response message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent]. -message AnalyzeContentResponse { - // Output only. The output text content. - // This field is set if the automated agent responded with text to show to - // the user. - string reply_text = 1; - - // Optional. The audio data bytes encoded as specified in the request. - // This field is set if: - // - // - `reply_audio_config` was specified in the request, or - // - The automated agent responded with audio to play to the user. In such - // case, `reply_audio.config` contains settings used to synthesize the - // speech. - // - // In some scenarios, multiple output audio fields may be present in the - // response structure. In these cases, only the top-most-level audio output - // has content. - OutputAudio reply_audio = 2; - - // Optional. Only set if a Dialogflow automated agent has responded. - // Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] - // and [AutomatedAgentReply.detect_intent_response.output_audio_config][] - // are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.reply_audio] instead. - AutomatedAgentReply automated_agent_reply = 3; - - // Output only. Message analyzed by CCAI. - Message message = 5; - - // The suggestions for most recent human agent. The order is the same as - // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of - // [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config]. - repeated SuggestionResult human_agent_suggestion_results = 6; - - // The suggestions for end user. The order is the same as - // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of - // [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config]. - repeated SuggestionResult end_user_suggestion_results = 7; - - // Indicates the parameters of DTMF. - DtmfParameters dtmf_parameters = 9; -} - - -// Represents a part of a message possibly annotated with an entity. The part -// can be an entity or purely a part of the message between two entities or -// message start/end. -message AnnotatedMessagePart { - // Required. A part of a message possibly annotated with an entity. - string text = 1; - - // Optional. The [Dialogflow system entity - // type](https://cloud.google.com/dialogflow/docs/reference/system-entities) - // of this message part. If this is empty, Dialogflow could not annotate the - // phrase part with a system entity. - string entity_type = 2; - - // Optional. The [Dialogflow system entity formatted value - // ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of - // this message part. For example for a system entity of type - // `@sys.unit-currency`, this may contain: - //
-  // {
-  //   "amount": 5,
-  //   "currency": "USD"
-  // }
-  // 
- google.protobuf.Value formatted_value = 3; -} - -// Represents the result of annotation for the message. -message MessageAnnotation { - // Optional. The collection of annotated message parts ordered by their - // position in the message. You can recover the annotated message by - // concatenating [AnnotatedMessagePart.text]. - repeated AnnotatedMessagePart parts = 1; - - // Required. Indicates whether the text message contains entities. - bool contain_entities = 2; -} - -// Represents article answer. -message ArticleAnswer { - // The article title. - string title = 1; - - // The article URI. - string uri = 2; - - // Output only. Article snippets. - repeated string snippets = 3; - - // A map that contains metadata about the answer and the - // document from which it originates. - map metadata = 5; - - // The name of answer record, in the format of - // "projects//locations//answerRecords/" - string answer_record = 6; -} - -// Represents answer from "frequently asked questions". -message FaqAnswer { - // The piece of text from the `source` knowledge base document. - string answer = 1; - - // The system's confidence score that this Knowledge answer is a good match - // for this conversational query, range from 0.0 (completely uncertain) - // to 1.0 (completely certain). - float confidence = 2; - - // The corresponding FAQ question. - string question = 3; - - // Indicates which Knowledge Document this answer was extracted - // from. - // Format: `projects//locations//agent/knowledgeBases//documents/`. - string source = 4; - - // A map that contains metadata about the answer and the - // document from which it originates. - map metadata = 5; - - // The name of answer record, in the format of - // "projects//locations//answerRecords/" - string answer_record = 6; -} - -// Represents a smart reply answer. -message SmartReplyAnswer { - // The content of the reply. - string reply = 1; - - // Smart reply confidence. - // The system's confidence score that this reply is a good match for - // this conversation, as a value from 0.0 (completely uncertain) to 1.0 - // (completely certain). - float confidence = 2; - - // The name of answer record, in the format of - // "projects//locations//answerRecords/" - string answer_record = 3; -} - -// One response of different type of suggestion response which is used in -// the response of [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] and -// [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent], as well as [HumanAgentAssistantEvent][google.cloud.dialogflow.v2beta1.HumanAgentAssistantEvent]. -message SuggestionResult { - // Different type of suggestion response. - oneof suggestion_response { - // Error status if the request failed. - google.rpc.Status error = 1; - - // SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. - SuggestArticlesResponse suggest_articles_response = 2; - - // SuggestFaqAnswersResponse if request is for FAQ_ANSWER. - SuggestFaqAnswersResponse suggest_faq_answers_response = 3; - - // SuggestSmartRepliesResponse if request is for SMART_REPLY. - SuggestSmartRepliesResponse suggest_smart_replies_response = 4; - } -} - -// The request message for [Participants.SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles]. -message SuggestArticlesRequest { - // Required. The name of the participant to fetch suggestion for. - // Format: `projects//locations//conversations//participants/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Participant" - } - ]; - - // Optional. The name of the latest conversation message to compile suggestion - // for. If empty, it will be the latest message of the conversation. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Message" - } - ]; - - // Optional. Max number of messages prior to and including - // [latest_message][google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.latest_message] to use as context - // when compiling the suggestion. By default 20 and at most 50. - int32 context_size = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [Participants.SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles]. -message SuggestArticlesResponse { - // Output only. Articles ordered by score in descending order. - repeated ArticleAnswer article_answers = 1; - - // The name of the latest conversation message used to compile - // suggestion for. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2; - - // Number of messages prior to and including - // [latest_message][google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.latest_message] to compile the - // suggestion. It may be smaller than the - // [SuggestArticlesResponse.context_size][google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.context_size] field in the request if there - // aren't that many messages in the conversation. - int32 context_size = 3; -} - -// The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers]. -message SuggestFaqAnswersRequest { - // Required. The name of the participant to fetch suggestion for. - // Format: `projects//locations//conversations//participants/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Participant" - } - ]; - - // Optional. The name of the latest conversation message to compile suggestion - // for. If empty, it will be the latest message of the conversation. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Message" - } - ]; - - // Optional. Max number of messages prior to and including - // [latest_message] to use as context when compiling the - // suggestion. By default 20 and at most 50. - int32 context_size = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers]. -message SuggestFaqAnswersResponse { - // Output only. Answers extracted from FAQ documents. - repeated FaqAnswer faq_answers = 1; - - // The name of the latest conversation message used to compile - // suggestion for. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2; - - // Number of messages prior to and including - // [latest_message][google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.latest_message] to compile the - // suggestion. It may be smaller than the - // [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.context_size] field in the request if there - // aren't that many messages in the conversation. - int32 context_size = 3; -} - -// The request message for [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2beta1.Participants.SuggestSmartReplies]. -message SuggestSmartRepliesRequest { - // Required. The name of the participant to fetch suggestion for. - // Format: `projects//locations//conversations//participants/`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Participant" - } - ]; - - // The current natural language text segment to compile suggestion - // for. This provides a way for user to get follow up smart reply suggestion - // after a smart reply selection, without sending a text message. - TextInput current_text_input = 4; - - // The name of the latest conversation message to compile suggestion - // for. If empty, it will be the latest message of the conversation. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2 [(google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Message" - }]; - - // Optional. Max number of messages prior to and including - // [latest_message] to use as context when compiling the - // suggestion. By default 20 and at most 50. - int32 context_size = 3; -} - -// The response message for [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2beta1.Participants.SuggestSmartReplies]. -message SuggestSmartRepliesResponse { - // Output only. Multiple reply options provided by smart reply service. The - // order is based on the rank of the model prediction. - // The maximum number of the returned replies is set in SmartReplyConfig. - repeated SmartReplyAnswer smart_reply_answers = 1; - - // The name of the latest conversation message used to compile - // suggestion for. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2; - - // Number of messages prior to and including - // [latest_message][google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.latest_message] to compile the - // suggestion. It may be smaller than the - // [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.context_size] field in the request if there - // aren't that many messages in the conversation. - int32 context_size = 3; -} - -// Represents a suggestion for a human agent. -message Suggestion { - option deprecated = true; - - // Represents suggested article. - message Article { - // Output only. The article title. - string title = 1; - - // Output only. The article URI. - string uri = 2; - - // Output only. Article snippets. - repeated string snippets = 3; - - // Output only. A map that contains metadata about the answer and the - // document from which it originates. - map metadata = 5; - - // Output only. The name of answer record, in the format of - // "projects//locations//answerRecords/" - string answer_record = 6; - } - - // Represents suggested answer from "frequently asked questions". - message FaqAnswer { - // Output only. The piece of text from the `source` knowledge base document. - string answer = 1; - - // The system's confidence score that this Knowledge answer is a good match - // for this conversational query, range from 0.0 (completely uncertain) - // to 1.0 (completely certain). - float confidence = 2; - - // Output only. The corresponding FAQ question. - string question = 3; - - // Output only. Indicates which Knowledge Document this answer was extracted - // from. - // Format: `projects//locations//agent/knowledgeBases//documents/`. - string source = 4; - - // Output only. A map that contains metadata about the answer and the - // document from which it originates. - map metadata = 5; - - // Output only. The name of answer record, in the format of - // "projects//locations//answerRecords/" - string answer_record = 6; - } - - // Output only. The name of this suggestion. - // Format: - // `projects//locations//conversations//participants/*/suggestions/`. - string name = 1; - - // Output only. Articles ordered by score in descending order. - repeated Article articles = 2; - - // Output only. Answers extracted from FAQ documents. - repeated FaqAnswer faq_answers = 4; - - // Output only. The time the suggestion was created. - google.protobuf.Timestamp create_time = 5; - - // Output only. Latest message used as context to compile this suggestion. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 7; -} - -// The request message for [Participants.ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]. -message ListSuggestionsRequest { - option deprecated = true; - - // Required. The name of the participant to fetch suggestions for. - // Format: `projects//locations//conversations//participants/`. - string parent = 1; - - // Optional. The maximum number of items to return in a single page. The - // default value is 100; the maximum value is 1000. - int32 page_size = 2; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3; - - // Optional. Filter on suggestions fields. Currently predicates on - // `create_time` and `create_time_epoch_microseconds` are supported. - // `create_time` only support milliseconds accuracy. E.g., - // `create_time_epoch_microseconds > 1551790877964485` or - // `create_time > 2017-01-15T01:30:15.01Z` - // - // For more information about filtering, see - // [API Filtering](https://aip.dev/160). - string filter = 4; -} - -// The response message for [Participants.ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]. -message ListSuggestionsResponse { - option deprecated = true; - - // Required. The list of suggestions. There will be a maximum number of items - // returned based on the page_size field in the request. `suggestions` is - // sorted by `create_time` in descending order. - repeated Suggestion suggestions = 1; - - // Optional. Token to retrieve the next page of results or empty if there are - // no more results in the list. - string next_page_token = 2; -} - -// The request message for [Participants.CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]. -message CompileSuggestionRequest { - option deprecated = true; - - // Required. The name of the participant to fetch suggestion for. - // Format: `projects//locations//conversations//participants/`. - string parent = 1; - - // Optional. The name of the latest conversation message to compile suggestion - // for. If empty, it will be the latest message of the conversation. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2; - - // Optional. Max number of messages prior to and including - // [latest_message] to use as context when compiling the - // suggestion. If zero or less than zero, 20 is used. - int32 context_size = 3; -} - -// The response message for [Participants.CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]. -message CompileSuggestionResponse { - option deprecated = true; - - // The compiled suggestion. - Suggestion suggestion = 1; - - // The name of the latest conversation message used to compile - // suggestion for. - // - // Format: `projects//locations//conversations//messages/`. - string latest_message = 2; - - // Number of messages prior to and including - // [latest_message][google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.latest_message] - // to compile the suggestion. It may be smaller than the - // [CompileSuggestionRequest.context_size][google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.context_size] field in the request if - // there aren't that many messages in the conversation. - int32 context_size = 3; -} - -// Response messages from an automated agent. -message ResponseMessage { - // The text response message. - message Text { - // A collection of text responses. - repeated string text = 1; - } - - // Indicates that the conversation should be handed off to a human agent. - // - // Dialogflow only uses this to determine which conversations were handed off - // to a human agent for measurement purposes. What else to do with this signal - // is up to you and your handoff procedures. - // - // You may set this, for example: - // * In the entry fulfillment of a CX Page if entering the page indicates - // something went extremely wrong in the conversation. - // * In a webhook response when you determine that the customer issue can only - // be handled by a human. - message LiveAgentHandoff { - // Custom metadata for your handoff procedure. Dialogflow doesn't impose - // any structure on this. - google.protobuf.Struct metadata = 1; - } - - // Indicates that interaction with the Dialogflow agent has ended. - message EndInteraction { - - } - - // Required. The rich response message. - oneof message { - // Returns a text response. - Text text = 1; - - // Returns a response containing a custom, platform-specific payload. - google.protobuf.Struct payload = 2; - - // Hands off conversation to a live agent. - LiveAgentHandoff live_agent_handoff = 3; - - // A signal that indicates the interaction with the Dialogflow agent has - // ended. - EndInteraction end_interaction = 4; - } -} diff --git a/google/cloud/dialogflow_v2beta1/proto/session.proto b/google/cloud/dialogflow_v2beta1/proto/session.proto deleted file mode 100644 index bd53acafe..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/session.proto +++ /dev/null @@ -1,796 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/agent.proto"; -import "google/cloud/dialogflow/v2beta1/audio_config.proto"; -import "google/cloud/dialogflow/v2beta1/context.proto"; -import "google/cloud/dialogflow/v2beta1/gcs.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"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -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}/agent/sessions/{session}" - pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}" - pattern: "projects/{project}/locations/{location}/agent/sessions/{session}" -}; - -// A service used for session interactions. -// -// For more information, see the [API interactions -// guide](https://cloud.google.com/dialogflow/docs/api-overview). -service Sessions { - 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"; - - // Processes a natural language query and returns structured, actionable data - // as a result. This method is not idempotent, because it may cause contexts - // and session entity types to be updated, which in turn might affect - // results of future queries. - // - // Note: Always use agent versions for production traffic. - // See [Versions and - // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) { - option (google.api.http) = { - post: "/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent" - body: "*" - additional_bindings { - post: "/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent" - body: "*" - } - additional_bindings { - post: "/v2beta1/{session=projects/*/locations/*/agent/sessions/*}:detectIntent" - body: "*" - } - additional_bindings { - post: "/v2beta1/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent" - body: "*" - } - }; - option (google.api.method_signature) = "session,query_input"; - } - - // Processes a natural language query in audio format in a streaming fashion - // and returns structured, actionable data as a result. This method is only - // available via the gRPC API (not REST). - // - // Note: Always use agent versions for production traffic. - // See [Versions and - // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) { - } -} - -// The request to detect user's intent. -message DetectIntentRequest { - // Required. The name of the session this query is sent to. Supported formats: - // - `projects//agent/sessions/, - // - `projects//locations//agent/sessions/`, - // - `projects//agent/environments//users//sessions/`, - // - `projects//locations//agent/environments//users//sessions/`, - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment - // (`Environment ID` might be referred to as environment name at some places). - // If `User ID` is not specified, we are using "-". It's up to the API caller - // to choose an appropriate `Session ID` and `User Id`. They can be a random - // number or some type of user and session identifiers (preferably hashed). - // The length of the `Session ID` and `User ID` must not exceed 36 characters. - // For more information, see the [API interactions - // guide](https://cloud.google.com/dialogflow/docs/api-overview). - // - // Note: Always use agent versions for production traffic. - // See [Versions and - // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - string session = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Session" - } - ]; - - // The parameters of this query. - QueryParameters query_params = 2; - - // Required. The input specification. It can be set to: - // - // 1. an audio config - // which instructs the speech recognizer how to process the speech audio, - // - // 2. a conversational query in the form of text, or - // - // 3. an event that specifies which intent to trigger. - QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; - - // 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; - - // 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; -} - -// The message returned from the DetectIntent method. -message DetectIntentResponse { - // The unique identifier of the response. It can be used to - // locate a response in the training example set or for reporting issues. - string response_id = 1; - - // The selected results of the conversational query or event processing. - // See `alternative_query_results` for additional potential results. - QueryResult query_result = 2; - - // If Knowledge Connectors are enabled, there could be more than one result - // returned for a given query or event, and this field will contain all - // results except for the top one, which is captured in query_result. The - // alternative results are ordered by decreasing - // `QueryResult.intent_detection_confidence`. If Knowledge Connectors are - // disabled, this field will be empty until multiple responses for regular - // intents are supported, at which point those additional results will be - // surfaced here. - repeated QueryResult alternative_query_results = 5; - - // Specifies the status of the webhook request. - google.rpc.Status webhook_status = 3; - - // The audio data bytes encoded as specified in the request. - // Note: The output audio is generated based on the values of default platform - // text responses found in the `query_result.fulfillment_messages` field. If - // multiple default text responses exist, they will be concatenated when - // generating audio. If no default platform text responses exist, the - // generated audio content will be empty. - // - // In some scenarios, multiple output audio fields may be present in the - // response structure. In these cases, only the top-most-level audio output - // has content. - bytes output_audio = 4; - - // The config used by the speech synthesizer to generate the output audio. - OutputAudioConfig output_audio_config = 6; -} - -// Represents the parameters of the conversational query. -message QueryParameters { - // 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; - - // The geo location of this conversational query. - google.type.LatLng geo_location = 2; - - // The collection of contexts to be activated before this query is - // executed. - repeated Context contexts = 3; - - // Specifies whether to delete all contexts in the current session - // before the new ones are activated. - bool reset_contexts = 4; - - // 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; - - // This field can be used to pass custom data to your webhook. - // Arbitrary JSON objects are supported. - // If supplied, the value is used to populate the - // `WebhookRequest.original_detect_intent_request.payload` - // field sent to your webhook. - google.protobuf.Struct payload = 6; - - // KnowledgeBases to get alternative results from. If not set, the - // KnowledgeBases enabled in the agent (through UI) will be used. - // Format: `projects//knowledgeBases/`. - repeated string knowledge_base_names = 12; - - // Configures the type of sentiment analysis to perform. If not - // provided, sentiment analysis is not performed. - // Note: Sentiment Analysis is only currently available for Essentials Edition - // agents. - SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; - - // 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 along with the headers that - // have been configured through Dialogflow web console. The headers defined - // within this field will overwrite the headers configured through Dialogflow - // console if there is a conflict. Header names are case-insensitive. - // Google's specified headers are not allowed. Including: "Host", - // "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding", - // "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc. - map webhook_headers = 14; -} - -// Represents the query input. It can contain either: -// -// 1. An audio config which -// instructs the speech recognizer how to process the speech audio. -// -// 2. A conversational query in the form of text. -// -// 3. An event that specifies which intent to trigger. -message QueryInput { - // Required. The input specification. - oneof input { - // Instructs the speech recognizer how to process the speech audio. - InputAudioConfig audio_config = 1; - - // The natural language text to be processed. - TextInput text = 2; - - // The event to be processed. - EventInput event = 3; - - // The DTMF digits used to invoke intent and fill in parameter value. - TelephonyDtmfEvents dtmf = 4; - } -} - -// Represents the result of conversational query or event processing. -message QueryResult { - // The original conversational query text: - // - // - If natural language text was provided as input, `query_text` contains - // a copy of the input. - // - If natural language speech audio was provided as input, `query_text` - // contains the speech recognition result. If speech recognizer produced - // multiple alternatives, a particular one is picked. - // - If automatic spell correction is enabled, `query_text` will contain the - // corrected user input. - string query_text = 1; - - // The language that was triggered during intent detection. - // See [Language - // Support](https://cloud.google.com/dialogflow/docs/reference/language) - // for a list of the currently supported language codes. - string language_code = 15; - - // The Speech recognition confidence between 0.0 and 1.0. A higher number - // indicates an estimated greater likelihood that the recognized words are - // correct. The default of 0.0 is a sentinel value indicating that confidence - // was not set. - // - // This field is not guaranteed to be accurate or set. In particular this - // field isn't set for StreamingDetectIntent since the streaming endpoint has - // separate confidence estimates per portion of the audio in - // StreamingRecognitionResult. - float speech_recognition_confidence = 2; - - // The action name from the matched intent. - string action = 3; - - // The collection of extracted parameters. - // - // Depending on your protocol or client library language, this is a - // map, associative array, symbol table, dictionary, or JSON object - // composed of a collection of (MapKey, MapValue) pairs: - // - // - MapKey type: string - // - MapKey value: parameter name - // - MapValue type: - // - If parameter's entity type is a composite entity: map - // - Else: depending on parameter value type, could be one of string, - // number, boolean, null, list or map - // - MapValue value: - // - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - // - Else: parameter value - google.protobuf.Struct parameters = 4; - - // This field is set to: - // - // - `false` if the matched intent has required parameters and not all of - // the required parameter values have been collected. - // - `true` if all required parameter values have been collected, or if the - // matched intent doesn't contain any required parameters. - bool all_required_params_present = 5; - - // The text to be pronounced to the user or shown on the screen. - // Note: This is a legacy field, `fulfillment_messages` should be preferred. - string fulfillment_text = 6; - - // The collection of rich messages to present to the user. - repeated Intent.Message fulfillment_messages = 7; - - // If the query was fulfilled by a webhook call, this field is set to the - // value of the `source` field returned in the webhook response. - string webhook_source = 8; - - // If the query was fulfilled by a webhook call, this field is set to the - // value of the `payload` field returned in the webhook response. - google.protobuf.Struct webhook_payload = 9; - - // The collection of output contexts. If applicable, - // `output_contexts.parameters` contains entries with name - // `.original` containing the original parameter values - // before the query. - repeated Context output_contexts = 10; - - // The intent that matched the conversational query. Some, not - // all fields are filled in this message, including but not limited to: - // `name`, `display_name`, `end_interaction` and `is_fallback`. - Intent intent = 11; - - // The intent detection confidence. Values range from 0.0 - // (completely uncertain) to 1.0 (completely certain). - // This value is for informational purpose only and is only used to - // help match the best intent within the classification threshold. - // This value may change for the same end-user expression at any time due to a - // model retraining or change in implementation. - // If there are `multiple knowledge_answers` messages, this value is set to - // the greatest `knowledgeAnswers.match_confidence` value in the list. - float intent_detection_confidence = 12; - - // Free-form diagnostic information for the associated detect intent request. - // The fields of this data can change without notice, so you should not write - // code that depends on its structure. - // The data may contain: - // - // - webhook call latency - // - webhook errors - google.protobuf.Struct diagnostic_info = 14; - - // The sentiment analysis result, which depends on the - // `sentiment_analysis_request_config` specified in the request. - SentimentAnalysisResult sentiment_analysis_result = 17; - - // The result from Knowledge Connector (if any), ordered by decreasing - // `KnowledgeAnswers.match_confidence`. - KnowledgeAnswers knowledge_answers = 18; -} - -// Represents the result of querying a Knowledge base. -message KnowledgeAnswers { - // An answer from Knowledge Connector. - message Answer { - // Represents the system's confidence that this knowledge answer is a good - // match for this conversational query. - enum MatchConfidenceLevel { - // Not specified. - MATCH_CONFIDENCE_LEVEL_UNSPECIFIED = 0; - - // Indicates that the confidence is low. - LOW = 1; - - // Indicates our confidence is medium. - MEDIUM = 2; - - // Indicates our confidence is high. - HIGH = 3; - } - - // Indicates which Knowledge Document this answer was extracted from. - // Format: `projects//knowledgeBases//documents/`. - string source = 1 [(google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Document" - }]; - - // The corresponding FAQ question if the answer was extracted from a FAQ - // Document, empty otherwise. - string faq_question = 2; - - // The piece of text from the `source` knowledge base document that answers - // this conversational query. - string answer = 3; - - // The system's confidence level that this knowledge answer is a good match - // for this conversational query. - // NOTE: The confidence level for a given `` pair may change - // without notice, as it depends on models that are constantly being - // improved. However, it will change less frequently than the confidence - // score below, and should be preferred for referencing the quality of an - // answer. - MatchConfidenceLevel match_confidence_level = 4; - - // The system's confidence score that this Knowledge answer is a good match - // for this conversational query. - // The range is from 0.0 (completely uncertain) to 1.0 (completely certain). - // Note: The confidence score is likely to vary somewhat (possibly even for - // identical requests), as the underlying model is under constant - // improvement. It may be deprecated in the future. We recommend using - // `match_confidence_level` which should be generally more stable. - float match_confidence = 5; - } - - // A list of answers from Knowledge Connector. - repeated Answer answers = 1; -} - -// The top-level message sent by the client to the -// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent] method. -// -// Multiple request messages should be sent in order: -// -// 1. The first message must contain -// [session][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.session], -// [query_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_input] plus optionally -// [query_params][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_params]. If the client -// wants to receive an audio response, it should also contain -// [output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config]. -// The message must not contain -// [input_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input_audio]. -// 2. If [query_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_input] was set to -// [query_input.audio_config][google.cloud.dialogflow.v2beta1.InputAudioConfig], all subsequent -// messages must contain -// [input_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input_audio] to continue with -// Speech recognition. -// If you decide to rather detect an intent from text input after you -// already started Speech recognition, please send a message with -// [query_input.text][google.cloud.dialogflow.v2beta1.QueryInput.text]. -// -// However, note that: -// -// * Dialogflow will bill you for the audio duration so far. -// * Dialogflow discards all Speech recognition results in favor of the -// input text. -// * Dialogflow will use the language code from the first message. -// -// After you sent all input, you must half-close or abort the request stream. -message StreamingDetectIntentRequest { - // Required. The name of the session the query is sent to. - // Supported formats: - // - `projects//agent/sessions/, - // - `projects//locations//agent/sessions/`, - // - `projects//agent/environments//users//sessions/`, - // - `projects//locations//agent/environments//users//sessions/`, - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we are using "-". It's up to the API caller - // to choose an appropriate `Session ID` and `User Id`. They can be a random - // number or some type of user and session identifiers (preferably hashed). - // The length of the `Session ID` and `User ID` must not exceed 36 characters. - // - // For more information, see the [API interactions - // guide](https://cloud.google.com/dialogflow/docs/api-overview). - // - // Note: Always use agent versions for production traffic. - // See [Versions and - // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - string session = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Session" - } - ]; - - // The parameters of this query. - QueryParameters query_params = 2; - - // Required. The input specification. It can be set to: - // - // 1. an audio config which instructs the speech recognizer how to process - // the speech audio, - // - // 2. a conversational query in the form of text, or - // - // 3. an event that specifies which intent to trigger. - QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; - - // DEPRECATED. Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2beta1.InputAudioConfig.single_utterance] instead. - // 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 - // stopped or paused. In this case, once a detected intent is received, the - // client should close the stream and start a new request with a new stream as - // needed. - // This setting is ignored when `query_input` is a piece of text or an event. - bool single_utterance = 4 [deprecated = true]; - - // 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; - - // 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; -} - -// The top-level message returned from the -// `StreamingDetectIntent` method. -// -// Multiple response messages can be returned in order: -// -// 1. If the input was set to streaming audio, the first one or more messages -// contain `recognition_result`. Each `recognition_result` represents a more -// complete transcript of what the user said. The last `recognition_result` -// has `is_final` set to `true`. -// -// 2. The next message contains `response_id`, `query_result`, -// `alternative_query_results` and optionally `webhook_status` if a WebHook -// was called. -// -// 3. If `output_audio_config` was specified in the request or agent-level -// speech synthesizer is configured, all subsequent messages contain -// `output_audio` and `output_audio_config`. -message StreamingDetectIntentResponse { - // The unique identifier of the response. It can be used to - // locate a response in the training example set or for reporting issues. - string response_id = 1; - - // The result of speech recognition. - StreamingRecognitionResult recognition_result = 2; - - // The selected results of the conversational query or event processing. - // See `alternative_query_results` for additional potential results. - QueryResult query_result = 3; - - // If Knowledge Connectors are enabled, there could be more than one result - // returned for a given query or event, and this field will contain all - // results except for the top one, which is captured in query_result. The - // alternative results are ordered by decreasing - // `QueryResult.intent_detection_confidence`. If Knowledge Connectors are - // disabled, this field will be empty until multiple responses for regular - // intents are supported, at which point those additional results will be - // surfaced here. - repeated QueryResult alternative_query_results = 7; - - // Specifies the status of the webhook request. - google.rpc.Status webhook_status = 4; - - // The audio data bytes encoded as specified in the request. - // Note: The output audio is generated based on the values of default platform - // text responses found in the `query_result.fulfillment_messages` field. If - // multiple default text responses exist, they will be concatenated when - // generating audio. If no default platform text responses exist, the - // generated audio content will be empty. - // - // In some scenarios, multiple output audio fields may be present in the - // response structure. In these cases, only the top-most-level audio output - // has content. - bytes output_audio = 5; - - // The config used by the speech synthesizer to generate the output audio. - OutputAudioConfig output_audio_config = 6; -} - -// Contains a speech recognition result corresponding to a portion of the audio -// that is currently being processed or an indication that this is the end -// of the single requested utterance. -// -// Example: -// -// 1. transcript: "tube" -// -// 2. transcript: "to be a" -// -// 3. transcript: "to be" -// -// 4. transcript: "to be or not to be" -// is_final: true -// -// 5. transcript: " that's" -// -// 6. transcript: " that is" -// -// 7. message_type: `END_OF_SINGLE_UTTERANCE` -// -// 8. transcript: " that is the question" -// is_final: true -// -// Only two of the responses contain final results (#4 and #8 indicated by -// `is_final: true`). Concatenating these generates the full transcript: "to be -// or not to be that is the question". -// -// In each response we populate: -// -// * for `TRANSCRIPT`: `transcript` and possibly `is_final`. -// -// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`. -message StreamingRecognitionResult { - // Type of the response message. - enum MessageType { - // Not specified. Should never be used. - MESSAGE_TYPE_UNSPECIFIED = 0; - - // Message contains a (possibly partial) transcript. - TRANSCRIPT = 1; - - // Event indicates that the server has detected the end of the user's speech - // utterance and expects no additional speech. Therefore, the server will - // not process additional audio (although it may subsequently return - // additional results). The client should stop sending additional audio - // data, half-close the gRPC connection, and wait for any additional results - // until the server closes the gRPC connection. This message is only sent if - // `single_utterance` was set to `true`, and is not used otherwise. - END_OF_SINGLE_UTTERANCE = 2; - } - - // Type of the result message. - MessageType message_type = 1; - - // Transcript text representing the words that the user spoke. - // Populated if and only if `message_type` = `TRANSCRIPT`. - string transcript = 2; - - // If `false`, the `StreamingRecognitionResult` represents an - // interim result that may change. If `true`, the recognizer will not return - // any further hypotheses about this piece of the audio. May only be populated - // for `message_type` = `TRANSCRIPT`. - bool is_final = 3; - - // The Speech confidence between 0.0 and 1.0 for the current portion of audio. - // A higher number indicates an estimated greater likelihood that the - // recognized words are correct. The default of 0.0 is a sentinel value - // indicating that confidence was not set. - // - // This field is typically only provided if `is_final` is true and you should - // not rely on it being accurate or even set. - float confidence = 4; - - // An estimate of the likelihood that the speech recognizer will - // not change its guess about this interim recognition result: - // - // * If the value is unspecified or 0.0, Dialogflow didn't compute the - // stability. In particular, Dialogflow will only provide stability for - // `TRANSCRIPT` results with `is_final = false`. - // * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely - // unstable and 1.0 means completely stable. - float stability = 6; - - // Word-specific information for the words recognized by Speech in - // [transcript][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and - // [InputAudioConfig.enable_word_info] is set. - repeated SpeechWordInfo speech_word_info = 7; - - // Time offset of the end of this Speech recognition result relative to the - // beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. - google.protobuf.Duration speech_end_offset = 8; - - // DTMF digits. Populated if and only if `message_type` = `DTMF_DIGITS`. - TelephonyDtmfEvents dtmf_digits = 5; -} - -// Represents the natural language text to be processed. -message TextInput { - // Required. The UTF-8 encoded natural language text to be processed. - // Text length must not exceed 256 characters. - string text = 1; - - // Required. The language of this conversational query. See [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 = 2; -} - -// Events allow for matching intents by event name instead of the natural -// language input. For instance, input `` can trigger a personalized welcome response. -// The parameter `name` may be used by the agent in the response: -// `"Hello #welcome_event.name! What can I do for you today?"`. -message EventInput { - // Required. The unique identifier of the event. - string name = 1; - - // The collection of parameters associated with the event. - // - // Depending on your protocol or client library language, this is a - // map, associative array, symbol table, dictionary, or JSON object - // composed of a collection of (MapKey, MapValue) pairs: - // - // - MapKey type: string - // - MapKey value: parameter name - // - MapValue type: - // - If parameter's entity type is a composite entity: map - // - Else: depending on parameter value type, could be one of string, - // number, boolean, null, list or map - // - MapValue value: - // - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - // - Else: parameter value - google.protobuf.Struct parameters = 2; - - // Required. The language of this query. See [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; -} - -// Configures the types of sentiment analysis to perform. -message SentimentAnalysisRequestConfig { - // 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; -} - -// The result of sentiment analysis. Sentiment analysis inspects user input -// and identifies the prevailing subjective opinion, especially to determine a -// user's attitude as positive, negative, or neutral. -// For [Participants.DetectIntent][], it needs to be configured in -// [DetectIntentRequest.query_params][google.cloud.dialogflow.v2beta1.DetectIntentRequest.query_params]. For -// [Participants.StreamingDetectIntent][], it needs to be configured in -// [StreamingDetectIntentRequest.query_params][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_params]. -// And for [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] and -// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent], it needs to be configured in -// [ConversationProfile.human_agent_assistant_config][google.cloud.dialogflow.v2beta1.ConversationProfile.human_agent_assistant_config] -message SentimentAnalysisResult { - // The sentiment analysis result for `query_text`. - Sentiment query_text_sentiment = 1; -} - -// The sentiment, such as positive/negative feeling or association, for a unit -// of analysis, such as the query text. -message Sentiment { - // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive - // sentiment). - float score = 1; - - // A non-negative number in the [0, +inf) range, which represents the absolute - // magnitude of sentiment, regardless of score (positive or negative). - float magnitude = 2; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto b/google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto deleted file mode 100644 index c692a6b94..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -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/v2beta1/entity_type.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "SessionEntityTypeProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityType]. -service SessionEntityTypes { - 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 session entity types in the specified session. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes" - additional_bindings { - get: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" - } - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes" - } - additional_bindings { - get: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the specified session entity type. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - } - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" - } - additional_bindings { - get: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a session entity type. - // - // If the specified session entity type already exists, overrides the - // session entity type. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes" - body: "session_entity_type" - additional_bindings { - post: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" - body: "session_entity_type" - } - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes" - body: "session_entity_type" - } - additional_bindings { - post: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes" - body: "session_entity_type" - } - }; - option (google.api.method_signature) = "parent,session_entity_type"; - } - - // Updates the specified session entity type. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) { - option (google.api.http) = { - patch: "/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}" - body: "session_entity_type" - additional_bindings { - patch: "/v2beta1/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - body: "session_entity_type" - } - additional_bindings { - patch: "/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" - body: "session_entity_type" - } - additional_bindings { - patch: "/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - body: "session_entity_type" - } - }; - option (google.api.method_signature) = "session_entity_type"; - option (google.api.method_signature) = "session_entity_type,update_mask"; - } - - // Deletes the specified session entity type. - // - // This method doesn't work with Google Assistant integration. - // Contact Dialogflow support if you need to use session entities - // with Google Assistant integration. - rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}" - additional_bindings { - delete: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - } - additional_bindings { - delete: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" - } - additional_bindings { - delete: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// A session represents a conversation between a Dialogflow agent and an -// end-user. You can create special entities, called session entities, during a -// session. Session entities can extend or replace custom entity types and only -// exist during the session that they were created for. All session data, -// including session entities, is stored by Dialogflow for 20 minutes. -// -// For more information, see the [session entity -// guide](https://cloud.google.com/dialogflow/docs/entities-session). -message SessionEntityType { - option (google.api.resource) = { - type: "dialogflow.googleapis.com/SessionEntityType" - pattern: "projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}" - pattern: "projects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type}" - pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}" - }; - - // The types of modifications for a session entity type. - enum EntityOverrideMode { - // Not specified. This value should be never used. - ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; - - // The collection of session entities overrides the collection of entities - // in the corresponding custom entity type. - ENTITY_OVERRIDE_MODE_OVERRIDE = 1; - - // The collection of session entities extends the collection of entities in - // the corresponding custom entity type. - // - // Note: Even in this override mode calls to `ListSessionEntityTypes`, - // `GetSessionEntityType`, `CreateSessionEntityType` and - // `UpdateSessionEntityType` only return the additional entities added in - // this session entity type. If you want to get the supplemented list, - // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType] on the custom entity type - // and merge. - ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; - } - - // Required. The unique identifier of this session entity type. Supported - // formats: - // - `projects//agent/sessions//entityTypes/` - // - `projects//locations//agent/sessions//entityTypes/` - // - `projects//agent/environments//users//sessions//entityTypes/` - // - `projects//locations//agent/environments/ - // /users//sessions//entityTypes/` - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - // `` must be the display name of an existing entity - // type in the same agent that will be overridden or supplemented. - string name = 1; - - // Required. Indicates whether the additional data should override or - // supplement the custom entity type definition. - EntityOverrideMode entity_override_mode = 2; - - // Required. The collection of entities associated with this session entity - // type. - repeated EntityType.Entity entities = 3; -} - -// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes]. -message ListSessionEntityTypesRequest { - // Required. The session to list all session entity types from. - // Supported formats: - // - `projects//agent/sessions/, - // - `projects//locations//agent/sessions/`, - // - `projects//agent/environments//users//sessions/`, - // - `projects//locations//agent/environments//users//sessions/`, - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/SessionEntityType" - } - ]; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 2; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes]. -message ListSessionEntityTypesResponse { - // The list of session entity types. There will be a maximum number of items - // returned based on the page_size field in the request. - repeated SessionEntityType session_entity_types = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType]. -message GetSessionEntityTypeRequest { - // Required. The name of the session entity type. Supported formats: - // - `projects//agent/sessions//entityTypes/` - // - `projects//locations//agent/sessions//entityTypes/` - // - `projects//agent/environments//users//sessions//entityTypes/` - // - `projects//locations//agent/environments/ - // /users//sessions//entityTypes/` - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/SessionEntityType" - } - ]; -} - -// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType]. -message CreateSessionEntityTypeRequest { - // Required. The session to create a session entity type for. - // Supported formats: - // - `projects//agent/sessions/, - // - `projects//locations//agent/sessions/`, - // - `projects//agent/environments//users//sessions/`, - // - `projects//locations//agent/environments//users//sessions/`, - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dialogflow.googleapis.com/SessionEntityType" - } - ]; - - // Required. The session entity type to create. - SessionEntityType session_entity_type = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType]. -message UpdateSessionEntityTypeRequest { - // Required. The session entity type to update. - SessionEntityType session_entity_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2; -} - -// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType]. -message DeleteSessionEntityTypeRequest { - // Required. The name of the entity type to delete. - // Supported formats: - // - `projects//agent/sessions//entityTypes/` - // - `projects//locations//agent/sessions//entityTypes/` - // - `projects//agent/environments//users//sessions//entityTypes/` - // - `projects//locations//agent/environments/ - // /users//sessions//entityTypes/` - // - // If `Location ID` is not specified we assume default 'us' location. If - // `Environment ID` is not specified, we assume default 'draft' environment. - // If `User ID` is not specified, we assume default '-' user. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/SessionEntityType" - } - ]; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/validation_result.proto b/google/cloud/dialogflow_v2beta1/proto/validation_result.proto deleted file mode 100644 index 82352ad08..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/validation_result.proto +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ValidationResultProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// Represents a single validation error. -message ValidationError { - // Represents a level of severity. - enum Severity { - // Not specified. This value should never be used. - SEVERITY_UNSPECIFIED = 0; - - // The agent doesn't follow Dialogflow best practices. - INFO = 1; - - // The agent may not behave as expected. - WARNING = 2; - - // The agent may experience partial failures. - ERROR = 3; - - // The agent may completely fail. - CRITICAL = 4; - } - - // The severity of the error. - Severity severity = 1; - - // The names of the entries that the error is associated with. - // Format: - // - // - "projects//agent", if the error is associated with the entire - // agent. - // - "projects//agent/intents/", if the error is - // associated with certain intents. - // - "projects//agent/intents//trainingPhrases/", if the - // error is associated with certain intent training phrases. - // - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. - // - "projects//agent/entities/", if the error is - // associated with certain entities. - repeated string entries = 3; - - // The detailed error messsage. - string error_message = 4; -} - -// Represents the output of agent validation. -message ValidationResult { - // Contains all validation errors. - repeated ValidationError validation_errors = 1; -} diff --git a/google/cloud/dialogflow_v2beta1/proto/webhook.proto b/google/cloud/dialogflow_v2beta1/proto/webhook.proto deleted file mode 100644 index 64c7efda7..000000000 --- a/google/cloud/dialogflow_v2beta1/proto/webhook.proto +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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"; - -package google.cloud.dialogflow.v2beta1; - -import "google/cloud/dialogflow/v2beta1/context.proto"; -import "google/cloud/dialogflow/v2beta1/intent.proto"; -import "google/cloud/dialogflow/v2beta1/session.proto"; -import "google/cloud/dialogflow/v2beta1/session_entity_type.proto"; -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "WebhookProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// The request message for a webhook call. -message WebhookRequest { - // The unique identifier of detectIntent request session. - // Can be used to identify end-user inside webhook implementation. - // Supported formats: - // - `projects//agent/sessions/, - // - `projects//locations//agent/sessions/`, - // - `projects//agent/environments//users//sessions/`, - // - `projects//locations//agent/environments//users//sessions/`, - string session = 4; - - // The unique identifier of the response. Contains the same value as - // `[Streaming]DetectIntentResponse.response_id`. - string response_id = 1; - - // The result of the conversational query or event processing. Contains the - // same value as `[Streaming]DetectIntentResponse.query_result`. - QueryResult query_result = 2; - - // Alternative query results from KnowledgeService. - repeated QueryResult alternative_query_results = 5; - - // Optional. The contents of the original request that was passed to - // `[Streaming]DetectIntent` call. - OriginalDetectIntentRequest original_detect_intent_request = 3; -} - -// The response message for a webhook call. -// -// This response is validated by the Dialogflow server. If validation fails, -// an error will be returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow.v2beta1.QueryResult.diagnostic_info] field. -// Setting JSON fields to an empty value with the wrong type is a common error. -// To avoid this error: -// -// - Use `""` for empty strings -// - Use `{}` or `null` for empty objects -// - Use `[]` or `null` for empty arrays -// -// For more information, see the -// [Protocol Buffers Language -// Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). -message WebhookResponse { - // Optional. The text response message intended for the end-user. - // It is recommended to use `fulfillment_messages.text.text[0]` instead. - // When provided, Dialogflow uses this field to populate - // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller. - string fulfillment_text = 1; - - // Optional. The rich response messages intended for the end-user. - // When provided, Dialogflow uses this field to populate - // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller. - repeated Intent.Message fulfillment_messages = 2; - - // Optional. A custom field used to identify the webhook source. - // Arbitrary strings are supported. - // When provided, Dialogflow uses this field to populate - // [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller. - string source = 3; - - // Optional. This field can be used to pass custom data from your webhook to the - // integration or API caller. Arbitrary JSON objects are supported. - // When provided, Dialogflow uses this field to populate - // [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller. - // This field is also used by the - // [Google Assistant - // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) - // for rich response messages. - // See the format definition at [Google Assistant Dialogflow webhook - // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) - google.protobuf.Struct payload = 4; - - // Optional. The collection of output contexts that will overwrite currently - // active contexts for the session and reset their lifespans. - // When provided, Dialogflow uses this field to populate - // [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller. - repeated Context output_contexts = 5; - - // Optional. Invokes the supplied events. - // When this field is set, Dialogflow ignores the `fulfillment_text`, - // `fulfillment_messages`, and `payload` fields. - EventInput followup_event_input = 6; - - // Indicates that a live agent should be brought in to handle the - // interaction with the user. In most cases, when you set this flag to true, - // you would also want to set end_interaction to true as well. Default is - // false. - bool live_agent_handoff = 7; - - // Optional. Indicates that this intent ends an interaction. Some integrations - // (e.g., Actions on Google or Dialogflow phone gateway) use this information - // to close interaction with an end user. Default is false. - bool end_interaction = 8; - - // Optional. Additional session entity types to replace or extend developer - // entity types with. The entity synonyms apply to all languages and persist - // for the session. Setting this data from a webhook overwrites - // the session entity types that have been set using `detectIntent`, - // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods. - repeated SessionEntityType session_entity_types = 10; -} - -// Represents the contents of the original request that was passed to -// the `[Streaming]DetectIntent` call. -message OriginalDetectIntentRequest { - // The source of this request, e.g., `google`, `facebook`, `slack`. It is set - // by Dialogflow-owned servers. - string source = 1; - - // Optional. The version of the protocol used for this request. - // This field is AoG-specific. - string version = 2; - - // Optional. This field is set to the value of the `QueryParameters.payload` - // field passed in the request. Some integrations that query a Dialogflow - // agent may provide additional information in the payload. - // - // In particular, for the Dialogflow Phone Gateway integration, this field has - // the form: - //
{
-  //  "telephony": {
-  //    "caller_id": "+18558363987"
-  //  }
-  // }
- // Note: The caller ID field (`caller_id`) will be redacted for Trial - // Edition agents and populated with the caller ID in [E.164 - // format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. - google.protobuf.Struct payload = 3; -}