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/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/discoveryengine/v1/engine.proto"; 24import "google/longrunning/operations.proto"; 25import "google/protobuf/empty.proto"; 26import "google/protobuf/field_mask.proto"; 27import "google/protobuf/timestamp.proto"; 28 29option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1"; 30option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb"; 31option java_multiple_files = true; 32option java_outer_classname = "EngineServiceProto"; 33option java_package = "com.google.cloud.discoveryengine.v1"; 34option objc_class_prefix = "DISCOVERYENGINE"; 35option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1"; 36option ruby_package = "Google::Cloud::DiscoveryEngine::V1"; 37 38// Service for managing [Engine][google.cloud.discoveryengine.v1.Engine] 39// configuration. 40service EngineService { 41 option (google.api.default_host) = "discoveryengine.googleapis.com"; 42 option (google.api.oauth_scopes) = 43 "https://www.googleapis.com/auth/cloud-platform"; 44 45 // Creates a [Engine][google.cloud.discoveryengine.v1.Engine]. 46 rpc CreateEngine(CreateEngineRequest) returns (google.longrunning.Operation) { 47 option (google.api.http) = { 48 post: "/v1/{parent=projects/*/locations/*/collections/*}/engines" 49 body: "engine" 50 }; 51 option (google.api.method_signature) = "parent,engine,engine_id"; 52 option (google.longrunning.operation_info) = { 53 response_type: "google.cloud.discoveryengine.v1.Engine" 54 metadata_type: "google.cloud.discoveryengine.v1.CreateEngineMetadata" 55 }; 56 } 57 58 // Deletes a [Engine][google.cloud.discoveryengine.v1.Engine]. 59 rpc DeleteEngine(DeleteEngineRequest) returns (google.longrunning.Operation) { 60 option (google.api.http) = { 61 delete: "/v1/{name=projects/*/locations/*/collections/*/engines/*}" 62 }; 63 option (google.api.method_signature) = "name"; 64 option (google.longrunning.operation_info) = { 65 response_type: "google.protobuf.Empty" 66 metadata_type: "google.cloud.discoveryengine.v1.DeleteEngineMetadata" 67 }; 68 } 69 70 // Updates an [Engine][google.cloud.discoveryengine.v1.Engine] 71 rpc UpdateEngine(UpdateEngineRequest) returns (Engine) { 72 option (google.api.http) = { 73 patch: "/v1/{engine.name=projects/*/locations/*/collections/*/engines/*}" 74 body: "engine" 75 }; 76 option (google.api.method_signature) = "engine,update_mask"; 77 } 78 79 // Gets a [Engine][google.cloud.discoveryengine.v1.Engine]. 80 rpc GetEngine(GetEngineRequest) returns (Engine) { 81 option (google.api.http) = { 82 get: "/v1/{name=projects/*/locations/*/collections/*/engines/*}" 83 }; 84 option (google.api.method_signature) = "name"; 85 } 86 87 // Lists all the [Engine][google.cloud.discoveryengine.v1.Engine]s associated 88 // with the project. 89 rpc ListEngines(ListEnginesRequest) returns (ListEnginesResponse) { 90 option (google.api.http) = { 91 get: "/v1/{parent=projects/*/locations/*/collections/*}/engines" 92 }; 93 option (google.api.method_signature) = "parent"; 94 } 95} 96 97// Request for 98// [EngineService.CreateEngine][google.cloud.discoveryengine.v1.EngineService.CreateEngine] 99// method. 100message CreateEngineRequest { 101 // Required. The parent resource name, such as 102 // `projects/{project}/locations/{location}/collections/{collection}`. 103 string parent = 1 [ 104 (google.api.field_behavior) = REQUIRED, 105 (google.api.resource_reference) = { 106 type: "discoveryengine.googleapis.com/Collection" 107 } 108 ]; 109 110 // Required. The [Engine][google.cloud.discoveryengine.v1.Engine] to create. 111 Engine engine = 2 [(google.api.field_behavior) = REQUIRED]; 112 113 // Required. The ID to use for the 114 // [Engine][google.cloud.discoveryengine.v1.Engine], which will become the 115 // final component of the [Engine][google.cloud.discoveryengine.v1.Engine]'s 116 // resource name. 117 // 118 // This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) 119 // standard with a length limit of 63 characters. Otherwise, an 120 // INVALID_ARGUMENT error is returned. 121 string engine_id = 3 [(google.api.field_behavior) = REQUIRED]; 122} 123 124// Metadata related to the progress of the 125// [EngineService.CreateEngine][google.cloud.discoveryengine.v1.EngineService.CreateEngine] 126// operation. This will be returned by the google.longrunning.Operation.metadata 127// field. 128message CreateEngineMetadata { 129 // Operation create time. 130 google.protobuf.Timestamp create_time = 1; 131 132 // Operation last update time. If the operation is done, this is also the 133 // finish time. 134 google.protobuf.Timestamp update_time = 2; 135} 136 137// Request message for 138// [EngineService.DeleteEngine][google.cloud.discoveryengine.v1.EngineService.DeleteEngine] 139// method. 140message DeleteEngineRequest { 141 // Required. Full resource name of 142 // [Engine][google.cloud.discoveryengine.v1.Engine], such as 143 // `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. 144 // 145 // If the caller does not have permission to delete the 146 // [Engine][google.cloud.discoveryengine.v1.Engine], regardless of whether or 147 // not it exists, a PERMISSION_DENIED error is returned. 148 // 149 // If the [Engine][google.cloud.discoveryengine.v1.Engine] to delete does not 150 // exist, a NOT_FOUND error is returned. 151 string name = 1 [ 152 (google.api.field_behavior) = REQUIRED, 153 (google.api.resource_reference) = { 154 type: "discoveryengine.googleapis.com/Engine" 155 } 156 ]; 157} 158 159// Metadata related to the progress of the 160// [EngineService.DeleteEngine][google.cloud.discoveryengine.v1.EngineService.DeleteEngine] 161// operation. This will be returned by the google.longrunning.Operation.metadata 162// field. 163message DeleteEngineMetadata { 164 // Operation create time. 165 google.protobuf.Timestamp create_time = 1; 166 167 // Operation last update time. If the operation is done, this is also the 168 // finish time. 169 google.protobuf.Timestamp update_time = 2; 170} 171 172// Request message for 173// [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] 174// method. 175message GetEngineRequest { 176 // Required. Full resource name of 177 // [Engine][google.cloud.discoveryengine.v1.Engine], such as 178 // `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. 179 string name = 1 [ 180 (google.api.field_behavior) = REQUIRED, 181 (google.api.resource_reference) = { 182 type: "discoveryengine.googleapis.com/Engine" 183 } 184 ]; 185} 186 187// Request message for 188// [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] 189// method. 190message ListEnginesRequest { 191 // Required. The parent resource name, such as 192 // `projects/{project}/locations/{location}/collections/{collection_id}`. 193 string parent = 1 [ 194 (google.api.field_behavior) = REQUIRED, 195 (google.api.resource_reference) = { 196 type: "discoveryengine.googleapis.com/Collection" 197 } 198 ]; 199 200 // Optional. Not supported. 201 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 202 203 // Optional. Not supported. 204 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 205 206 // Optional. Filter by solution type. For example: 207 // solution_type=SOLUTION_TYPE_SEARCH 208 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 209} 210 211// Response message for 212// [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] 213// method. 214message ListEnginesResponse { 215 // All the customer's [Engine][google.cloud.discoveryengine.v1.Engine]s. 216 repeated Engine engines = 1; 217 218 // Not supported. 219 string next_page_token = 2; 220} 221 222// Request message for 223// [EngineService.UpdateEngine][google.cloud.discoveryengine.v1.EngineService.UpdateEngine] 224// method. 225message UpdateEngineRequest { 226 // Required. The [Engine][google.cloud.discoveryengine.v1.Engine] to update. 227 // 228 // If the caller does not have permission to update the 229 // [Engine][google.cloud.discoveryengine.v1.Engine], regardless of whether or 230 // not it exists, a PERMISSION_DENIED error is returned. 231 // 232 // If the [Engine][google.cloud.discoveryengine.v1.Engine] to update does not 233 // exist, a NOT_FOUND error is returned. 234 Engine engine = 1 [(google.api.field_behavior) = REQUIRED]; 235 236 // Indicates which fields in the provided 237 // [Engine][google.cloud.discoveryengine.v1.Engine] to update. 238 // 239 // If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 240 // is returned. 241 google.protobuf.FieldMask update_mask = 2; 242} 243