Skip to content

Commit

Permalink
feat: support acl-based and blended search
Browse files Browse the repository at this point in the history
feat: support chunk-based document search
feat: support search adaptor based search
feat: support batch documents purge with GCS input
feat: add document processing config services
feat: add serving config services
feat: add billing estimation services
feat: add suggestion deny list import/purge services
docs: keep the API doc up-to-date with recent changes

PiperOrigin-RevId: 614160461
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 9, 2024
1 parent 6500290 commit b553626
Show file tree
Hide file tree
Showing 29 changed files with 1,749 additions and 75 deletions.
51 changes: 39 additions & 12 deletions google/cloud/discoveryengine/v1alpha/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,47 @@
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.

# buildifier: disable=load-on-top

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
# buildifier: disable=same-origin-load
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "discoveryengine_proto",
srcs = [
"acl_config.proto",
"acl_config_service.proto",
"chunk.proto",
"chunk_service.proto",
"common.proto",
"completion.proto",
"completion_service.proto",
"conversation.proto",
"conversational_search_service.proto",
"data_store.proto",
"data_store_service.proto",
"document.proto",
"document_processing_config.proto",
"document_service.proto",
"engine.proto",
"engine_service.proto",
"estimate_billing_service.proto",
"import_config.proto",
"purge_config.proto",
"recommendation_service.proto",
"schema.proto",
"schema_service.proto",
"search_service.proto",
"search_tuning_service.proto",
"serving_config.proto",
"serving_config_service.proto",
"site_search_engine.proto",
"site_search_engine_service.proto",
"user_event.proto",
Expand All @@ -64,14 +76,15 @@ proto_library_with_info(
name = "discoveryengine_proto_with_info",
deps = [
":discoveryengine_proto",
"//google/cloud/location:location_proto",
"//google/cloud:common_resources_proto",
"//google/cloud/location:location_proto",
],
)

##############################################################################
# Java
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
Expand Down Expand Up @@ -100,8 +113,8 @@ java_gapic_library(
rest_numeric_enums = True,
service_yaml = "discoveryengine_v1alpha.yaml",
test_deps = [
"//google/cloud/location:location_java_grpc",
":discoveryengine_java_grpc",
"//google/cloud/location:location_java_grpc",
],
transport = "grpc+rest",
deps = [
Expand All @@ -114,6 +127,10 @@ java_gapic_library(
java_gapic_test(
name = "discoveryengine_java_gapic_test_suite",
test_classes = [
"com.google.cloud.discoveryengine.v1alpha.AclConfigServiceClientHttpJsonTest",
"com.google.cloud.discoveryengine.v1alpha.AclConfigServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.ChunkServiceClientHttpJsonTest",
"com.google.cloud.discoveryengine.v1alpha.ChunkServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.CompletionServiceClientHttpJsonTest",
"com.google.cloud.discoveryengine.v1alpha.CompletionServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClientHttpJsonTest",
Expand All @@ -124,6 +141,8 @@ java_gapic_test(
"com.google.cloud.discoveryengine.v1alpha.DocumentServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.EngineServiceClientHttpJsonTest",
"com.google.cloud.discoveryengine.v1alpha.EngineServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.EstimateBillingServiceClientHttpJsonTest",
"com.google.cloud.discoveryengine.v1alpha.EstimateBillingServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.RecommendationServiceClientHttpJsonTest",
"com.google.cloud.discoveryengine.v1alpha.RecommendationServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.SchemaServiceClientHttpJsonTest",
Expand All @@ -132,6 +151,8 @@ java_gapic_test(
"com.google.cloud.discoveryengine.v1alpha.SearchServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.SearchTuningServiceClientHttpJsonTest",
"com.google.cloud.discoveryengine.v1alpha.SearchTuningServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.ServingConfigServiceClientHttpJsonTest",
"com.google.cloud.discoveryengine.v1alpha.ServingConfigServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceClientHttpJsonTest",
"com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceClientTest",
"com.google.cloud.discoveryengine.v1alpha.UserEventServiceClientHttpJsonTest",
Expand All @@ -143,19 +164,20 @@ java_gapic_test(
# Open Source Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-discoveryengine-v1alpha-java",
include_samples = True,
transport = "grpc+rest",
deps = [
":discoveryengine_java_gapic",
":discoveryengine_java_grpc",
":discoveryengine_java_proto",
":discoveryengine_proto",
],
include_samples = True,
)

##############################################################################
# Go
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
Expand Down Expand Up @@ -204,16 +226,17 @@ go_gapic_assembly_pkg(
name = "gapi-cloud-discoveryengine-v1alpha-go",
deps = [
":discoveryengine_go_gapic",
":discoveryengine_go_gapic_srcjar-test.srcjar",
":discoveryengine_go_gapic_srcjar-metadata.srcjar",
":discoveryengine_go_gapic_srcjar-snippets.srcjar",
":discoveryengine_go_gapic_srcjar-test.srcjar",
":discoveryengine_go_proto",
],
)

##############################################################################
# Python
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"py_gapic_assembly_pkg",
Expand All @@ -228,7 +251,8 @@ py_gapic_library(
rest_numeric_enums = True,
service_yaml = "discoveryengine_v1alpha.yaml",
transport = "grpc+rest",
deps = [],
deps = [
],
)

py_test(
Expand All @@ -252,6 +276,7 @@ py_gapic_assembly_pkg(
##############################################################################
# PHP
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
Expand All @@ -268,8 +293,8 @@ php_gapic_library(
name = "discoveryengine_php_gapic",
srcs = [":discoveryengine_proto_with_info"],
grpc_service_config = "discoveryengine_grpc_service_config.json",
rest_numeric_enums = True,
migration_mode = "NEW_SURFACE_ONLY",
rest_numeric_enums = True,
service_yaml = "discoveryengine_v1alpha.yaml",
transport = "grpc+rest",
deps = [
Expand All @@ -289,6 +314,7 @@ php_gapic_assembly_pkg(
##############################################################################
# Node.js
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
Expand Down Expand Up @@ -319,10 +345,11 @@ nodejs_gapic_assembly_pkg(
##############################################################################
# Ruby
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_gapic_assembly_pkg",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_grpc_library",
"ruby_proto_library",
)
Expand All @@ -341,9 +368,7 @@ ruby_grpc_library(
ruby_cloud_gapic_library(
name = "discoveryengine_ruby_gapic",
srcs = [":discoveryengine_proto_with_info"],
extra_protoc_parameters = [
"ruby-cloud-gem-name=google-cloud-discoveryengine-v1alpha",
],
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-discoveryengine-v1alpha"],
grpc_service_config = "discoveryengine_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "discoveryengine_v1alpha.yaml",
Expand All @@ -367,6 +392,7 @@ ruby_gapic_assembly_pkg(
##############################################################################
# C#
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
Expand All @@ -377,7 +403,6 @@ load(

csharp_proto_library(
name = "discoveryengine_csharp_proto",
extra_opts = [],
deps = [":discoveryengine_proto"],
)

Expand All @@ -394,6 +419,7 @@ csharp_gapic_library(
grpc_service_config = "discoveryengine_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "discoveryengine_v1alpha.yaml",
transport = "grpc+rest",
deps = [
":discoveryengine_csharp_grpc",
":discoveryengine_csharp_proto",
Expand All @@ -413,6 +439,7 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
Expand Down
49 changes: 49 additions & 0 deletions google/cloud/discoveryengine/v1alpha/acl_config.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.discoveryengine.v1alpha;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/discoveryengine/v1alpha/common.proto";

option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
option java_multiple_files = true;
option java_outer_classname = "AclConfigProto";
option java_package = "com.google.cloud.discoveryengine.v1alpha";
option objc_class_prefix = "DISCOVERYENGINE";
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";

// Access Control Configuration.
message AclConfig {
option (google.api.resource) = {
type: "discoveryengine.googleapis.com/AclConfig"
pattern: "projects/{project}/locations/{location}/aclConfig"
};

// Immutable. The full resource name of the acl configuration.
// Format:
// `projects/{project}/locations/{location}/aclConfig`.
//
// This field must be a UTF-8 encoded string with a length limit of 1024
// characters.
string name = 1 [(google.api.field_behavior) = IMMUTABLE];

// Identity provider config.
IdpConfig idp_config = 2;
}
79 changes: 79 additions & 0 deletions google/cloud/discoveryengine/v1alpha/acl_config_service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.discoveryengine.v1alpha;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/discoveryengine/v1alpha/acl_config.proto";

option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
option java_multiple_files = true;
option java_outer_classname = "AclConfigServiceProto";
option java_package = "com.google.cloud.discoveryengine.v1alpha";
option objc_class_prefix = "DISCOVERYENGINE";
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";

// Service for managing Acl Configuration.
service AclConfigService {
option (google.api.default_host) = "discoveryengine.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// Default Acl Configuration for use in a location of a customer's project.
// Updates will only reflect to new data stores. Existing data stores will
// still use the old value.
rpc UpdateAclConfig(UpdateAclConfigRequest) returns (AclConfig) {
option (google.api.http) = {
patch: "/v1alpha/{acl_config.name=projects/*/locations/*/aclConfig}"
body: "acl_config"
};
}

// Gets the [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig].
rpc GetAclConfig(GetAclConfigRequest) returns (AclConfig) {
option (google.api.http) = {
get: "/v1alpha/{name=projects/*/locations/*/aclConfig}"
};
option (google.api.method_signature) = "name";
}
}

// Request message for GetAclConfigRequest method.
message GetAclConfigRequest {
// Required. Resource name of
// [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig], such as
// `projects/*/locations/*/aclConfig`.
//
// If the caller does not have permission to access the
// [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig], regardless of
// whether or not it exists, a PERMISSION_DENIED error is returned.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "discoveryengine.googleapis.com/AclConfig"
}
];
}

// Request message for UpdateAclConfig method.
message UpdateAclConfigRequest {
AclConfig acl_config = 1 [(google.api.field_behavior) = REQUIRED];
}

0 comments on commit b553626

Please sign in to comment.