Skip to content

Commit

Permalink
feat: [dialogflow-cx] added agent level route group (#4528)
Browse files Browse the repository at this point in the history
* feat: added agent level route group
feat: added flow import strategy

PiperOrigin-RevId: 555319706

Source-Link: googleapis/googleapis@2eec4fc

Source-Link: googleapis/googleapis-gen@ef19273
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6ImVmMTkyNzMzZTJiNzQzNGE1ZTQ0MmY5YTVlODJjZTA4ODAzNzdmYmYifQ==

* feat: added agent level route group
feat: added flow import strategy

PiperOrigin-RevId: 555341760

Source-Link: googleapis/googleapis@713b3e7

Source-Link: googleapis/googleapis-gen@7d3c46c
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6IjdkM2M0NmNiN2Q4MjM5M2I0YTU4M2VhODVhNDViOWI0ODM2Mjk1OTYifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Aug 11, 2023
1 parent e122185 commit 79da1cb
Show file tree
Hide file tree
Showing 125 changed files with 15,150 additions and 6,708 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ message SpeechToTextSettings {
// Types][google.cloud.dialogflow.cx.v3.EntityType],
// [Flows][google.cloud.dialogflow.cx.v3.Flow],
// [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment],
// [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the
// conversation flows..
// [Webhooks][google.cloud.dialogflow.cx.v3.Webhook],
// [TransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
// and so on to manage the conversation flows.
message Agent {
option (google.api.resource) = {
type: "dialogflow.googleapis.com/Agent"
Expand All @@ -198,7 +199,7 @@ message Agent {
// The GitHub repository URI related to the agent.
string repository_uri = 2;

// The branch of GitHub repository tracked for this agent.
// The branch of the GitHub repository tracked for this agent.
string tracking_branch = 3;

// The access token used to authenticate the access to the GitHub
Expand Down Expand Up @@ -473,7 +474,7 @@ message ExportAgentResponse {
bytes agent_content = 2;

// Commit SHA of the git push. This field is populated if
// `git_destination` are specified in
// `git_destination` is specified in
// [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
string commit_sha = 3;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ 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/cx/v3/import_strategy.proto";
import "google/cloud/dialogflow/cx/v3/page.proto";
import "google/cloud/dialogflow/cx/v3/validation_message.proto";
import "google/longrunning/operations.proto";
Expand Down Expand Up @@ -308,7 +309,10 @@ message Flow {
// defined in the page have higher priority than those defined in the flow.
//
// Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
// groups.
repeated string transition_route_groups = 15
[(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/TransitionRouteGroup"
Expand Down Expand Up @@ -582,6 +586,22 @@ message ImportFlowRequest {

// Flow import mode. If not specified, `KEEP` is assumed.
ImportOption import_option = 4;

// Optional. Specifies the import strategy used when resolving resource
// conflicts.
FlowImportStrategy flow_import_strategy = 5
[(google.api.field_behavior) = OPTIONAL];
}

// The flow import strategy used for resource conflict resolution associated
// with an [ImportFlowRequest][google.cloud.dialogflow.cx.v3.ImportFlowRequest].
message FlowImportStrategy {
// Optional. Import strategy for resource conflict resolution, applied
// globally throughout the flow. It will be applied for all display name
// conflicts in the imported content. If not specified, 'CREATE_NEW' is
// assumed.
ImportStrategy global_import_strategy = 1
[(google.api.field_behavior) = OPTIONAL];
}

// The response message for
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright 2023 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.cx.v3;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb";
option java_multiple_files = true;
option java_outer_classname = "ImportStrategyProto";
option java_package = "com.google.cloud.dialogflow.cx.v3";
option objc_class_prefix = "DF";

// Import strategies for the conflict resolution of resources (i.e. intents,
// entities, and webhooks) with identical display names during import
// operations.
enum ImportStrategy {
// Unspecified. Treated as 'CREATE_NEW'.
IMPORT_STRATEGY_UNSPECIFIED = 0;

// Create a new resource with a numeric suffix appended to the end of the
// existing display name.
IMPORT_STRATEGY_CREATE_NEW = 1;

// Replace existing resource with incoming resource in the content to be
// imported.
IMPORT_STRATEGY_REPLACE = 2;

// Keep existing resource and discard incoming resource in the content to be
// imported.
IMPORT_STRATEGY_KEEP = 3;

// Combine existing and incoming resources when a conflict is encountered.
IMPORT_STRATEGY_MERGE = 4;

// Throw error if a conflict is encountered.
IMPORT_STRATEGY_THROW_ERROR = 5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ message Page {
// intent, then the first group in the ordered list takes precedence.
//
// Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
// groups.
repeated string transition_route_groups = 11
[(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/TransitionRouteGroup"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,27 @@ message ResponseMessage {
}
}

// Represents different response types.
enum ResponseType {
// Not specified.
RESPONSE_TYPE_UNSPECIFIED = 0;

// The response is from an [entry
// prompt][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] in the
// page.
ENTRY_PROMPT = 1;

// The response is from [form-filling
// prompt][google.cloud.dialogflow.cx.v3.Form.Parameter.fill_behavior] in
// the page.
PARAMETER_PROMPT = 2;

// The response is from a [transition
// route][google.cloud.dialogflow.cx.v3.TransitionRoute] or an [event
// handler][EventHandler] in the page or flow or transition route group.
HANDLER_PROMPT = 3;
}

// Required. The rich response message.
oneof message {
// Returns a text response.
Expand Down Expand Up @@ -226,6 +247,9 @@ message ResponseMessage {
TelephonyTransferCall telephony_transfer_call = 18;
}

// Response type.
ResponseType response_type = 4;

// The channel which the response is associated with. Clients can specify the
// channel via
// [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,15 +607,15 @@ message QueryParameters {

// Represents the query input. It can contain one of:
//
// 1. A conversational query in the form of text.
// 1. A conversational query in the form of text.
//
// 2. An intent query that specifies which intent to trigger.
// 2. An intent query that specifies which intent to trigger.
//
// 3. Natural language speech audio to be processed.
// 3. Natural language speech audio to be processed.
//
// 4. An event to be triggered.
// 4. An event to be triggered.
//
// 5. DTMF digits to invoke an intent and fill in parameter value.
// 5. DTMF digits to invoke an intent and fill in parameter value.
message QueryInput {
// Required. The input specification.
oneof input {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ service TransitionRouteGroups {
returns (ListTransitionRouteGroupsResponse) {
option (google.api.http) = {
get: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
additional_bindings {
get: "/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups"
}
};
option (google.api.method_signature) = "parent";
}
Expand All @@ -56,6 +59,9 @@ service TransitionRouteGroups {
returns (TransitionRouteGroup) {
option (google.api.http) = {
get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
additional_bindings {
get: "/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}"
}
};
option (google.api.method_signature) = "name";
}
Expand All @@ -72,6 +78,10 @@ service TransitionRouteGroups {
option (google.api.http) = {
post: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
body: "transition_route_group"
additional_bindings {
post: "/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups"
body: "transition_route_group"
}
};
option (google.api.method_signature) = "parent,transition_route_group";
}
Expand All @@ -87,6 +97,10 @@ service TransitionRouteGroups {
option (google.api.http) = {
patch: "/v3/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
body: "transition_route_group"
additional_bindings {
patch: "/v3/{transition_route_group.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}"
body: "transition_route_group"
}
};
option (google.api.method_signature) = "transition_route_group,update_mask";
}
Expand All @@ -101,25 +115,32 @@ service TransitionRouteGroups {
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
additional_bindings {
delete: "/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}"
}
};
option (google.api.method_signature) = "name";
}
}

// An TransitionRouteGroup represents a group of
// A TransitionRouteGroup represents a group of
// [`TransitionRoutes`][google.cloud.dialogflow.cx.v3.TransitionRoute] to be
// used by a [Page][google.cloud.dialogflow.cx.v3.Page].
message TransitionRouteGroup {
option (google.api.resource) = {
type: "dialogflow.googleapis.com/TransitionRouteGroup"
pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}"
pattern: "projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}"
plural: "transitionRouteGroups"
singular: "transitionRouteGroup"
};

// The unique identifier of the transition route group.
// [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup]
// populates the name automatically. Format: `projects/<Project
// ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow
// ID>/transitionRouteGroups/<Transition Route Group ID>`.
// ID>/transitionRouteGroups/<Transition Route Group ID>`
// .
string name = 1;

// Required. The human-readable name of the transition route group, unique
Expand All @@ -136,7 +157,8 @@ message TransitionRouteGroup {
message ListTransitionRouteGroupsRequest {
// Required. The flow to list all transition route groups for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>`.
// ID>/flows/<Flow ID>`
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -187,7 +209,9 @@ message GetTransitionRouteGroupRequest {
// Required. The name of the
// [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
// ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/transitionRouteGroups/<Transition Route Group ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -216,7 +240,9 @@ message CreateTransitionRouteGroupRequest {
// Required. The flow to create an
// [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
// for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>`.
// ID>/flows/<Flow ID>`
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`
// for agent-level groups.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -273,7 +299,8 @@ message DeleteTransitionRouteGroupRequest {
// [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
// to delete. Format: `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition
// Route Group ID>`.
// Route Group ID>` or `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ message SpeechToTextSettings {
// Types][google.cloud.dialogflow.cx.v3beta1.EntityType],
// [Flows][google.cloud.dialogflow.cx.v3beta1.Flow],
// [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment],
// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage
// the conversation flows..
// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook],
// [TransitionRouteGroups][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
// and so on to manage the conversation flows.
message Agent {
option (google.api.resource) = {
type: "dialogflow.googleapis.com/Agent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ 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/cx/v3beta1/import_strategy.proto";
import "google/cloud/dialogflow/cx/v3beta1/page.proto";
import "google/cloud/dialogflow/cx/v3beta1/validation_message.proto";
import "google/longrunning/operations.proto";
Expand Down Expand Up @@ -308,7 +309,10 @@ message Flow {
// defined in the page have higher priority than those defined in the flow.
//
// Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
// groups.
repeated string transition_route_groups = 15
[(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/TransitionRouteGroup"
Expand Down Expand Up @@ -582,6 +586,24 @@ message ImportFlowRequest {

// Flow import mode. If not specified, `KEEP` is assumed.
ImportOption import_option = 4;

// Optional. Specifies the import strategy used when resolving resource
// conflicts.
FlowImportStrategy flow_import_strategy = 5
[(google.api.field_behavior) = OPTIONAL];
}

// The flow import strategy used for resource conflict resolution associated
// with an
// [ImportFlowRequest][google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest].
message FlowImportStrategy {
// Optional. Global flow import strategy for resource conflict resolution. The
// import Import strategy for resource conflict resolution, applied globally
// throughout the flow. It will be applied for all
// display name conflicts in the imported content. If not specified,
// 'CREATE_NEW' is assumed.
ImportStrategy global_import_strategy = 1
[(google.api.field_behavior) = OPTIONAL];
}

// The response message for
Expand Down
Loading

0 comments on commit 79da1cb

Please sign in to comment.