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.v1alpha; 18 19import "google/api/resource.proto"; 20 21option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; 22option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; 23option java_multiple_files = true; 24option java_outer_classname = "CommonProto"; 25option java_package = "com.google.cloud.discoveryengine.v1alpha"; 26option objc_class_prefix = "DISCOVERYENGINE"; 27option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; 28option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; 29option (google.api.resource_definition) = { 30 type: "discoveryengine.googleapis.com/Branch" 31 pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}" 32 pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}" 33}; 34option (google.api.resource_definition) = { 35 type: "discoveryengine.googleapis.com/Collection" 36 pattern: "projects/{project}/locations/{location}/collections/{collection}" 37}; 38option (google.api.resource_definition) = { 39 type: "discoveryengine.googleapis.com/Location" 40 pattern: "projects/{project}/locations/{location}" 41}; 42option (google.api.resource_definition) = { 43 type: "discoveryengine.googleapis.com/GroundingConfig" 44 pattern: "projects/{project}/locations/{location}/groundingConfigs/{grounding_config}" 45}; 46option (google.api.resource_definition) = { 47 type: "discoveryengine.googleapis.com/RankingConfig" 48 pattern: "projects/{project}/locations/{location}/rankingConfigs/{ranking_config}" 49}; 50option (google.api.resource_definition) = { 51 type: "healthcare.googleapis.com/FhirStore" 52 pattern: "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}" 53}; 54 55// The industry vertical associated with the 56// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. 57enum IndustryVertical { 58 // Value used when unset. 59 INDUSTRY_VERTICAL_UNSPECIFIED = 0; 60 61 // The generic vertical for documents that are not specific to any industry 62 // vertical. 63 GENERIC = 1; 64 65 // The media industry vertical. 66 MEDIA = 2; 67 68 // The healthcare FHIR vertical. 69 HEALTHCARE_FHIR = 7; 70} 71 72// The type of solution. 73enum SolutionType { 74 // Default value. 75 SOLUTION_TYPE_UNSPECIFIED = 0; 76 77 // Used for Recommendations AI. 78 SOLUTION_TYPE_RECOMMENDATION = 1; 79 80 // Used for Discovery Search. 81 SOLUTION_TYPE_SEARCH = 2; 82 83 // Used for use cases related to the Generative AI agent. 84 SOLUTION_TYPE_CHAT = 3; 85 86 // Used for use cases related to the Generative Chat agent. 87 // It's used for Generative chat engine only, the associated data stores 88 // must enrolled with `SOLUTION_TYPE_CHAT` solution. 89 SOLUTION_TYPE_GENERATIVE_CHAT = 4; 90} 91 92// Tiers of search features. Different tiers might have different 93// pricing. To learn more, check the pricing documentation. 94enum SearchTier { 95 // Default value when the enum is unspecified. This is invalid to use. 96 SEARCH_TIER_UNSPECIFIED = 0; 97 98 // Standard tier. 99 SEARCH_TIER_STANDARD = 1; 100 101 // Enterprise tier. 102 SEARCH_TIER_ENTERPRISE = 2; 103} 104 105// Add-on that provides additional functionality for search. 106enum SearchAddOn { 107 // Default value when the enum is unspecified. This is invalid to use. 108 SEARCH_ADD_ON_UNSPECIFIED = 0; 109 110 // Large language model add-on. 111 SEARCH_ADD_ON_LLM = 1; 112} 113 114// A floating point interval. 115message Interval { 116 // The lower bound of the interval. If neither of the min fields are 117 // set, then the lower bound is negative infinity. 118 // 119 // This field must be not larger than max. 120 // Otherwise, an `INVALID_ARGUMENT` error is returned. 121 oneof min { 122 // Inclusive lower bound. 123 double minimum = 1; 124 125 // Exclusive lower bound. 126 double exclusive_minimum = 2; 127 } 128 129 // The upper bound of the interval. If neither of the max fields are 130 // set, then the upper bound is positive infinity. 131 // 132 // This field must be not smaller than min. 133 // Otherwise, an `INVALID_ARGUMENT` error is returned. 134 oneof max { 135 // Inclusive upper bound. 136 double maximum = 3; 137 138 // Exclusive upper bound. 139 double exclusive_maximum = 4; 140 } 141} 142 143// A custom attribute that is not explicitly modeled in a resource, e.g. 144// [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent]. 145message CustomAttribute { 146 // The textual values of this custom attribute. For example, `["yellow", 147 // "green"]` when the key is "color". 148 // 149 // Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is 150 // returned. 151 // 152 // Exactly one of 153 // [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text] 154 // or 155 // [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers] 156 // should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. 157 repeated string text = 1; 158 159 // The numerical values of this custom attribute. For example, `[2.3, 15.4]` 160 // when the key is "lengths_cm". 161 // 162 // Exactly one of 163 // [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text] 164 // or 165 // [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers] 166 // should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. 167 repeated double numbers = 2; 168} 169 170// Information of an end user. 171message UserInfo { 172 // Highly recommended for logged-in users. Unique identifier for logged-in 173 // user, such as a user name. Don't set for anonymous users. 174 // 175 // Always use a hashed value for this ID. 176 // 177 // Don't set the field to the same fixed ID for different users. This mixes 178 // the event history of those users together, which results in degraded 179 // model quality. 180 // 181 // The field must be a UTF-8 encoded string with a length limit of 128 182 // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. 183 string user_id = 1; 184 185 // User agent as included in the HTTP header. 186 // 187 // The field must be a UTF-8 encoded string with a length limit of 1,000 188 // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. 189 // 190 // This should not be set when using the client side event reporting with 191 // GTM or JavaScript tag in 192 // [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent] 193 // or if 194 // [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request] 195 // is set. 196 string user_agent = 2; 197} 198 199// Defines embedding config, used for bring your own embeddings feature. 200message EmbeddingConfig { 201 // Full field path in the schema mapped as embedding field. 202 string field_path = 1; 203} 204 205// Double list. 206message DoubleList { 207 // Double values. 208 repeated double values = 1; 209} 210 211// Defines guided search spec. 212message GuidedSearchSpec { 213 // Whether or not to enable and include refinement attributes in gudied search 214 // result. 215 bool enable_refinement_attributes = 1; 216 217 // Whether or not to enable and include related questions in search response. 218 bool enable_related_questions = 2; 219 220 // Max number of related questions to be returned. The valid range is [1, 5]. 221 // If enable_related_questions is true, the default value is 3. 222 int32 max_related_questions = 3; 223} 224 225// Defines custom fine tuning spec. 226message CustomFineTuningSpec { 227 // Whether or not to enable and include custom fine tuned search adaptor 228 // model. 229 bool enable_search_adaptor = 1; 230} 231 232// Identity Provider Config. 233message IdpConfig { 234 // Third party IDP Config. 235 message ExternalIdpConfig { 236 // Workforce pool name. 237 // Example: "locations/global/workforcePools/pool_id" 238 string workforce_pool_name = 1; 239 } 240 241 // Identity Provider Type. 242 enum IdpType { 243 // Default value. ACL search not enabled. 244 IDP_TYPE_UNSPECIFIED = 0; 245 246 // Google 1P provider. 247 GSUITE = 1; 248 249 // Third party provider. 250 THIRD_PARTY = 2; 251 } 252 253 // Identity provider type configured. 254 IdpType idp_type = 1; 255 256 // External Identity provider config. 257 ExternalIdpConfig external_idp_config = 2; 258} 259 260// Principal identifier of a user or a group. 261message Principal { 262 // Union field principal. Principal can be a user or a group. 263 oneof principal { 264 // User identifier. 265 // For Google Workspace user account, user_id should be the google workspace 266 // user email. 267 // For non-google identity provider user account, user_id is the mapped user 268 // identifier configured during the workforcepool config. 269 string user_id = 1; 270 271 // Group identifier. 272 // For Google Workspace user account, group_id should be the google 273 // workspace group email. 274 // For non-google identity provider user account, group_id is the mapped 275 // group identifier configured during the workforcepool config. 276 string group_id = 2; 277 } 278} 279