1// Copyright 2023 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.aiplatform.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/aiplatform/v1/feature.proto"; 24import "google/cloud/aiplatform/v1/feature_group.proto"; 25import "google/cloud/aiplatform/v1/featurestore_service.proto"; 26import "google/cloud/aiplatform/v1/operation.proto"; 27import "google/longrunning/operations.proto"; 28import "google/protobuf/empty.proto"; 29import "google/protobuf/field_mask.proto"; 30 31option csharp_namespace = "Google.Cloud.AIPlatform.V1"; 32option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; 33option java_multiple_files = true; 34option java_outer_classname = "FeatureRegistryServiceProto"; 35option java_package = "com.google.cloud.aiplatform.v1"; 36option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; 37option ruby_package = "Google::Cloud::AIPlatform::V1"; 38 39// The service that handles CRUD and List for resources for 40// FeatureRegistry. 41service FeatureRegistryService { 42 option (google.api.default_host) = "aiplatform.googleapis.com"; 43 option (google.api.oauth_scopes) = 44 "https://www.googleapis.com/auth/cloud-platform"; 45 46 // Creates a new FeatureGroup in a given project and location. 47 rpc CreateFeatureGroup(CreateFeatureGroupRequest) 48 returns (google.longrunning.Operation) { 49 option (google.api.http) = { 50 post: "/v1/{parent=projects/*/locations/*}/featureGroups" 51 body: "feature_group" 52 }; 53 option (google.api.method_signature) = 54 "parent,feature_group,feature_group_id"; 55 option (google.longrunning.operation_info) = { 56 response_type: "FeatureGroup" 57 metadata_type: "CreateFeatureGroupOperationMetadata" 58 }; 59 } 60 61 // Gets details of a single FeatureGroup. 62 rpc GetFeatureGroup(GetFeatureGroupRequest) returns (FeatureGroup) { 63 option (google.api.http) = { 64 get: "/v1/{name=projects/*/locations/*/featureGroups/*}" 65 }; 66 option (google.api.method_signature) = "name"; 67 } 68 69 // Lists FeatureGroups in a given project and location. 70 rpc ListFeatureGroups(ListFeatureGroupsRequest) 71 returns (ListFeatureGroupsResponse) { 72 option (google.api.http) = { 73 get: "/v1/{parent=projects/*/locations/*}/featureGroups" 74 }; 75 option (google.api.method_signature) = "parent"; 76 } 77 78 // Updates the parameters of a single FeatureGroup. 79 rpc UpdateFeatureGroup(UpdateFeatureGroupRequest) 80 returns (google.longrunning.Operation) { 81 option (google.api.http) = { 82 patch: "/v1/{feature_group.name=projects/*/locations/*/featureGroups/*}" 83 body: "feature_group" 84 }; 85 option (google.api.method_signature) = "feature_group,update_mask"; 86 option (google.longrunning.operation_info) = { 87 response_type: "FeatureGroup" 88 metadata_type: "UpdateFeatureGroupOperationMetadata" 89 }; 90 } 91 92 // Deletes a single FeatureGroup. 93 rpc DeleteFeatureGroup(DeleteFeatureGroupRequest) 94 returns (google.longrunning.Operation) { 95 option (google.api.http) = { 96 delete: "/v1/{name=projects/*/locations/*/featureGroups/*}" 97 }; 98 option (google.api.method_signature) = "name,force"; 99 option (google.longrunning.operation_info) = { 100 response_type: "google.protobuf.Empty" 101 metadata_type: "DeleteOperationMetadata" 102 }; 103 } 104 105 // Creates a new Feature in a given FeatureGroup. 106 rpc CreateFeature(CreateFeatureRequest) 107 returns (google.longrunning.Operation) { 108 option (google.api.http) = { 109 post: "/v1/{parent=projects/*/locations/*/featureGroups/*}/features" 110 body: "feature" 111 }; 112 option (google.api.method_signature) = "parent,feature,feature_id"; 113 option (google.longrunning.operation_info) = { 114 response_type: "Feature" 115 metadata_type: "CreateFeatureOperationMetadata" 116 }; 117 } 118 119 // Gets details of a single Feature. 120 rpc GetFeature(GetFeatureRequest) returns (Feature) { 121 option (google.api.http) = { 122 get: "/v1/{name=projects/*/locations/*/featureGroups/*/features/*}" 123 }; 124 option (google.api.method_signature) = "name"; 125 } 126 127 // Lists Features in a given FeatureGroup. 128 rpc ListFeatures(ListFeaturesRequest) returns (ListFeaturesResponse) { 129 option (google.api.http) = { 130 get: "/v1/{parent=projects/*/locations/*/featureGroups/*}/features" 131 }; 132 option (google.api.method_signature) = "parent"; 133 } 134 135 // Updates the parameters of a single Feature. 136 rpc UpdateFeature(UpdateFeatureRequest) 137 returns (google.longrunning.Operation) { 138 option (google.api.http) = { 139 patch: "/v1/{feature.name=projects/*/locations/*/featureGroups/*/features/*}" 140 body: "feature" 141 }; 142 option (google.api.method_signature) = "feature,update_mask"; 143 option (google.longrunning.operation_info) = { 144 response_type: "Feature" 145 metadata_type: "UpdateFeatureOperationMetadata" 146 }; 147 } 148 149 // Deletes a single Feature. 150 rpc DeleteFeature(DeleteFeatureRequest) 151 returns (google.longrunning.Operation) { 152 option (google.api.http) = { 153 delete: "/v1/{name=projects/*/locations/*/featureGroups/*/features/*}" 154 }; 155 option (google.api.method_signature) = "name"; 156 option (google.longrunning.operation_info) = { 157 response_type: "google.protobuf.Empty" 158 metadata_type: "DeleteOperationMetadata" 159 }; 160 } 161} 162 163// Request message for 164// [FeatureRegistryService.CreateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeatureGroup]. 165message CreateFeatureGroupRequest { 166 // Required. The resource name of the Location to create FeatureGroups. 167 // Format: 168 // `projects/{project}/locations/{location}'` 169 string parent = 1 [ 170 (google.api.field_behavior) = REQUIRED, 171 (google.api.resource_reference) = { 172 child_type: "aiplatform.googleapis.com/FeatureGroup" 173 } 174 ]; 175 176 // Required. The FeatureGroup to create. 177 FeatureGroup feature_group = 2 [(google.api.field_behavior) = REQUIRED]; 178 179 // Required. The ID to use for this FeatureGroup, which will become the final 180 // component of the FeatureGroup's resource name. 181 // 182 // This value may be up to 60 characters, and valid characters are 183 // `[a-z0-9_]`. The first character cannot be a number. 184 // 185 // The value must be unique within the project and location. 186 string feature_group_id = 3 [(google.api.field_behavior) = REQUIRED]; 187} 188 189// Request message for 190// [FeatureRegistryService.GetFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeatureGroup]. 191message GetFeatureGroupRequest { 192 // Required. The name of the FeatureGroup resource. 193 string name = 1 [ 194 (google.api.field_behavior) = REQUIRED, 195 (google.api.resource_reference) = { 196 type: "aiplatform.googleapis.com/FeatureGroup" 197 } 198 ]; 199} 200 201// Request message for 202// [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups]. 203message ListFeatureGroupsRequest { 204 // Required. The resource name of the Location to list FeatureGroups. 205 // Format: 206 // `projects/{project}/locations/{location}` 207 string parent = 1 [ 208 (google.api.field_behavior) = REQUIRED, 209 (google.api.resource_reference) = { 210 child_type: "aiplatform.googleapis.com/FeatureGroup" 211 } 212 ]; 213 214 // Lists the FeatureGroups that match the filter expression. The 215 // following fields are supported: 216 // 217 // * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. 218 // Values must be 219 // in RFC 3339 format. 220 // * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. 221 // Values must be 222 // in RFC 3339 format. 223 // * `labels`: Supports key-value equality and key presence. 224 // 225 // Examples: 226 // 227 // * `create_time > "2020-01-01" OR update_time > "2020-01-01"` 228 // FeatureGroups created or updated after 2020-01-01. 229 // * `labels.env = "prod"` 230 // FeatureGroups with label "env" set to "prod". 231 string filter = 2; 232 233 // The maximum number of FeatureGroups to return. The service may return 234 // fewer than this value. If unspecified, at most 100 FeatureGroups will 235 // be returned. The maximum value is 100; any value greater than 100 will be 236 // coerced to 100. 237 int32 page_size = 3; 238 239 // A page token, received from a previous 240 // [FeatureGroupAdminService.ListFeatureGroups][] call. 241 // Provide this to retrieve the subsequent page. 242 // 243 // When paginating, all other parameters provided to 244 // [FeatureGroupAdminService.ListFeatureGroups][] must 245 // match the call that provided the page token. 246 string page_token = 4; 247 248 // A comma-separated list of fields to order by, sorted in ascending order. 249 // Use "desc" after a field name for descending. 250 // Supported Fields: 251 // 252 // * `create_time` 253 // * `update_time` 254 string order_by = 5; 255} 256 257// Response message for 258// [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups]. 259message ListFeatureGroupsResponse { 260 // The FeatureGroups matching the request. 261 repeated FeatureGroup feature_groups = 1; 262 263 // A token, which can be sent as 264 // [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.page_token] 265 // to retrieve the next page. If this field is omitted, there are no 266 // subsequent pages. 267 string next_page_token = 2; 268} 269 270// Request message for 271// [FeatureRegistryService.UpdateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeatureGroup]. 272message UpdateFeatureGroupRequest { 273 // Required. The FeatureGroup's `name` field is used to identify the 274 // FeatureGroup to be updated. Format: 275 // `projects/{project}/locations/{location}/featureGroups/{feature_group}` 276 FeatureGroup feature_group = 1 [(google.api.field_behavior) = REQUIRED]; 277 278 // Field mask is used to specify the fields to be overwritten in the 279 // FeatureGroup resource by the update. 280 // The fields specified in the update_mask are relative to the resource, not 281 // the full request. A field will be overwritten if it is in the mask. If the 282 // user does not provide a mask then only the non-empty fields present in the 283 // request will be overwritten. Set the update_mask to `*` to override all 284 // fields. 285 // 286 // Updatable fields: 287 // 288 // * `labels` 289 google.protobuf.FieldMask update_mask = 2; 290} 291 292// Request message for 293// [FeatureRegistryService.DeleteFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeatureGroup]. 294message DeleteFeatureGroupRequest { 295 // Required. The name of the FeatureGroup to be deleted. 296 // Format: 297 // `projects/{project}/locations/{location}/featureGroups/{feature_group}` 298 string name = 1 [ 299 (google.api.field_behavior) = REQUIRED, 300 (google.api.resource_reference) = { 301 type: "aiplatform.googleapis.com/FeatureGroup" 302 } 303 ]; 304 305 // If set to true, any Features under this FeatureGroup 306 // will also be deleted. (Otherwise, the request will only work if the 307 // FeatureGroup has no Features.) 308 bool force = 2; 309} 310 311// Details of operations that perform create FeatureGroup. 312message CreateFeatureGroupOperationMetadata { 313 // Operation metadata for FeatureGroup. 314 GenericOperationMetadata generic_metadata = 1; 315} 316 317// Details of operations that perform update FeatureGroup. 318message UpdateFeatureGroupOperationMetadata { 319 // Operation metadata for FeatureGroup. 320 GenericOperationMetadata generic_metadata = 1; 321} 322 323// Details of operations that perform create FeatureGroup. 324message CreateRegistryFeatureOperationMetadata { 325 // Operation metadata for Feature. 326 GenericOperationMetadata generic_metadata = 1; 327} 328 329// Details of operations that perform update Feature. 330message UpdateFeatureOperationMetadata { 331 // Operation metadata for Feature Update. 332 GenericOperationMetadata generic_metadata = 1; 333} 334