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.v1beta; 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/v1beta/serving_config.proto"; 24import "google/protobuf/field_mask.proto"; 25 26option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; 27option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; 28option java_multiple_files = true; 29option java_outer_classname = "ServingConfigServiceProto"; 30option java_package = "com.google.cloud.discoveryengine.v1beta"; 31option objc_class_prefix = "DISCOVERYENGINE"; 32option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; 33option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; 34 35// Service for operations related to 36// [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]. 37service ServingConfigService { 38 option (google.api.default_host) = "discoveryengine.googleapis.com"; 39 option (google.api.oauth_scopes) = 40 "https://www.googleapis.com/auth/cloud-platform"; 41 42 // Updates a ServingConfig. 43 // 44 // Returns a NOT_FOUND error if the ServingConfig does not exist. 45 rpc UpdateServingConfig(UpdateServingConfigRequest) returns (ServingConfig) { 46 option (google.api.http) = { 47 patch: "/v1beta/{serving_config.name=projects/*/locations/*/dataStores/*/servingConfigs/*}" 48 body: "serving_config" 49 additional_bindings { 50 patch: "/v1beta/{serving_config.name=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}" 51 body: "serving_config" 52 } 53 additional_bindings { 54 patch: "/v1beta/{serving_config.name=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}" 55 body: "serving_config" 56 } 57 }; 58 option (google.api.method_signature) = "serving_config,update_mask"; 59 } 60 61 // Gets a ServingConfig. 62 // 63 // Returns a NotFound error if the ServingConfig does not exist. 64 rpc GetServingConfig(GetServingConfigRequest) returns (ServingConfig) { 65 option (google.api.http) = { 66 get: "/v1beta/{name=projects/*/locations/*/dataStores/*/servingConfigs/*}" 67 additional_bindings { 68 get: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}" 69 } 70 additional_bindings { 71 get: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}" 72 } 73 }; 74 option (google.api.method_signature) = "name"; 75 } 76 77 // Lists all ServingConfigs linked to this dataStore. 78 rpc ListServingConfigs(ListServingConfigsRequest) 79 returns (ListServingConfigsResponse) { 80 option (google.api.http) = { 81 get: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/servingConfigs" 82 additional_bindings { 83 get: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/servingConfigs" 84 } 85 additional_bindings { 86 get: "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/servingConfigs" 87 } 88 }; 89 option (google.api.method_signature) = "parent"; 90 } 91} 92 93// Request for UpdateServingConfig method. 94message UpdateServingConfigRequest { 95 // Required. The ServingConfig to update. 96 ServingConfig serving_config = 1 [(google.api.field_behavior) = REQUIRED]; 97 98 // Indicates which fields in the provided 99 // [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] to 100 // update. The following are NOT supported: 101 // 102 // * [ServingConfig.name][google.cloud.discoveryengine.v1beta.ServingConfig.name] 103 // 104 // If not set, all supported fields are updated. 105 google.protobuf.FieldMask update_mask = 2; 106} 107 108// Request for GetServingConfig method. 109message GetServingConfigRequest { 110 // Required. The resource name of the ServingConfig to get. Format: 111 // `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` 112 string name = 1 [ 113 (google.api.field_behavior) = REQUIRED, 114 (google.api.resource_reference) = { 115 type: "discoveryengine.googleapis.com/ServingConfig" 116 } 117 ]; 118} 119 120// Request for ListServingConfigs method. 121message ListServingConfigsRequest { 122 // Required. Full resource name of the parent resource. Format: 123 // `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` 124 string parent = 1 [ 125 (google.api.field_behavior) = REQUIRED, 126 (google.api.resource_reference) = { 127 child_type: "discoveryengine.googleapis.com/ServingConfig" 128 } 129 ]; 130 131 // Optional. Maximum number of results to return. If unspecified, defaults 132 // to 100. If a value greater than 100 is provided, at most 100 results are 133 // returned. 134 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 135 136 // Optional. A page token, received from a previous `ListServingConfigs` call. 137 // Provide this to retrieve the subsequent page. 138 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 139} 140 141// Response for ListServingConfigs method. 142message ListServingConfigsResponse { 143 // All the ServingConfigs for a given dataStore. 144 repeated ServingConfig serving_configs = 1; 145 146 // Pagination token, if not returned indicates the last page. 147 string next_page_token = 2; 148} 149