xref: /aosp_15_r20/external/googleapis/google/cloud/discoveryengine/v1/engine.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.discoveryengine.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/discoveryengine/v1/common.proto";
22import "google/protobuf/timestamp.proto";
23
24option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
25option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
26option java_multiple_files = true;
27option java_outer_classname = "EngineProto";
28option java_package = "com.google.cloud.discoveryengine.v1";
29option objc_class_prefix = "DISCOVERYENGINE";
30option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
31option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
32
33// Metadata that describes the training and serving parameters of an
34// [Engine][google.cloud.discoveryengine.v1.Engine].
35message Engine {
36  option (google.api.resource) = {
37    type: "discoveryengine.googleapis.com/Engine"
38    pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}"
39  };
40
41  // Configurations for a Search Engine.
42  message SearchEngineConfig {
43    // The search feature tier of this engine.
44    //
45    // Different tiers might have different
46    // pricing. To learn more, check the pricing documentation.
47    //
48    // Defaults to
49    // [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1.SearchTier.SEARCH_TIER_STANDARD]
50    // if not specified.
51    SearchTier search_tier = 1;
52
53    // The add-on that this search engine enables.
54    repeated SearchAddOn search_add_ons = 2;
55  }
56
57  // Configurations for a Chat Engine.
58  message ChatEngineConfig {
59    // Configurations for generating a Dialogflow agent.
60    //
61    // Note that these configurations are one-time consumed by
62    // and passed to Dialogflow service. It means they cannot be retrieved using
63    // [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine]
64    // or
65    // [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines]
66    // API after engine creation.
67    message AgentCreationConfig {
68      // Name of the company, organization or other entity that the agent
69      // represents. Used for knowledge connector LLM prompt and for knowledge
70      // search.
71      string business = 1;
72
73      // Required. The default language of the agent as a language tag.
74      // See [Language
75      // Support](https://cloud.google.com/dialogflow/docs/reference/language)
76      // for a list of the currently supported language codes.
77      string default_language_code = 2;
78
79      // Required. The time zone of the agent from the [time zone
80      // database](https://www.iana.org/time-zones), e.g., America/New_York,
81      // Europe/Paris.
82      string time_zone = 3 [(google.api.field_behavior) = REQUIRED];
83
84      // Agent location for Agent creation, supported values: global/us/eu.
85      // If not provided, us Engine will create Agent using us-central-1 by
86      // default; eu Engine will create Agent using eu-west-1 by default.
87      string location = 4;
88    }
89
90    // The configurationt generate the Dialogflow agent that is associated to
91    // this Engine.
92    //
93    // Note that these configurations are one-time consumed by
94    // and passed to Dialogflow service. It means they cannot be retrieved using
95    // [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine]
96    // or
97    // [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines]
98    // API after engine creation.
99    AgentCreationConfig agent_creation_config = 1;
100
101    // The resource name of an exist Dialogflow agent to link to this Chat
102    // Engine. Customers can either provide `agent_creation_config` to create
103    // agent or provide an agent name that links the agent with the Chat engine.
104    //
105    // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
106    // ID>`.
107    //
108    // Note that the `dialogflow_agent_to_link` are one-time consumed by and
109    // passed to Dialogflow service. It means they cannot be retrieved using
110    // [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine]
111    // or
112    // [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines]
113    // API after engine creation. Use
114    // [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1.Engine.ChatEngineMetadata.dialogflow_agent]
115    // for actual agent association after Engine is created.
116    string dialogflow_agent_to_link = 2;
117  }
118
119  // Common configurations for an Engine.
120  message CommonConfig {
121    // Immutable. The name of the company, business or entity that is associated
122    // with the engine. Setting this may help improve LLM related features.
123    string company_name = 1 [(google.api.field_behavior) = IMMUTABLE];
124  }
125
126  // Additional information of a Chat Engine.
127  // Fields in this message are output only.
128  message ChatEngineMetadata {
129    // The resource name of a Dialogflow agent, that this Chat Engine refers
130    // to.
131    //
132    // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
133    // ID>`.
134    string dialogflow_agent = 1;
135  }
136
137  // Additional config specs that defines the behavior of the engine.
138  oneof engine_config {
139    // Configurations for the Chat Engine. Only applicable if
140    // [solution_type][google.cloud.discoveryengine.v1.Engine.solution_type] is
141    // [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT].
142    ChatEngineConfig chat_engine_config = 11;
143
144    // Configurations for the Search Engine. Only applicable if
145    // [solution_type][google.cloud.discoveryengine.v1.Engine.solution_type] is
146    // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH].
147    SearchEngineConfig search_engine_config = 13;
148  }
149
150  // Engine metadata to monitor the status of the engine.
151  oneof engine_metadata {
152    // Output only. Additional information of the Chat Engine. Only applicable
153    // if [solution_type][google.cloud.discoveryengine.v1.Engine.solution_type]
154    // is
155    // [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT].
156    ChatEngineMetadata chat_engine_metadata = 12
157        [(google.api.field_behavior) = OUTPUT_ONLY];
158  }
159
160  // Immutable. The fully qualified resource name of the engine.
161  //
162  // This field must be a UTF-8 encoded string with a length limit of 1024
163  // characters.
164  //
165  // Format:
166  // `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`
167  // engine should be 1-63 characters, and valid characters are
168  // /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
169  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
170
171  // Required. The display name of the engine. Should be human readable. UTF-8
172  // encoded string with limit of 1024 characters.
173  string display_name = 2 [(google.api.field_behavior) = REQUIRED];
174
175  // Output only. Timestamp the Recommendation Engine was created at.
176  google.protobuf.Timestamp create_time = 3
177      [(google.api.field_behavior) = OUTPUT_ONLY];
178
179  // Output only. Timestamp the Recommendation Engine was last updated.
180  google.protobuf.Timestamp update_time = 4
181      [(google.api.field_behavior) = OUTPUT_ONLY];
182
183  // The data stores associated with this engine.
184  //
185  // For
186  // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]
187  // and
188  // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
189  // type of engines, they can only associate with at most one data store.
190  //
191  // If [solution_type][google.cloud.discoveryengine.v1.Engine.solution_type] is
192  // [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT],
193  // multiple [DataStore][google.cloud.discoveryengine.v1.DataStore]s in the
194  // same [Collection][google.cloud.discoveryengine.v1.Collection] can be
195  // associated here.
196  //
197  // Note that when used in
198  // [CreateEngineRequest][google.cloud.discoveryengine.v1.CreateEngineRequest],
199  // one DataStore id must be provided as the system will use it for necessary
200  // initializations.
201  repeated string data_store_ids = 5;
202
203  // Required. The solutions of the engine.
204  SolutionType solution_type = 6 [(google.api.field_behavior) = REQUIRED];
205
206  // The industry vertical that the engine registers.
207  // The restriction of the Engine industry vertical is based on
208  // [DataStore][google.cloud.discoveryengine.v1.DataStore]: If unspecified,
209  // default to `GENERIC`. Vertical on Engine has to match vertical of the
210  // DataStore liniked to the engine.
211  IndustryVertical industry_vertical = 16;
212
213  // Common config spec that specifies the metadata of the engine.
214  CommonConfig common_config = 15;
215}
216