#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StaticChunkingStrategy {
#[prost(int64, tag = "1")]
pub max_chunk_size_tokens: i64,
#[prost(int64, tag = "2")]
pub chunk_overlap_tokens: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChunkingStrategy {
#[prost(oneof = "chunking_strategy::Strategy", tags = "1")]
pub strategy: ::core::option::Option<chunking_strategy::Strategy>,
}
pub mod chunking_strategy {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Strategy {
#[prost(message, tag = "1")]
StaticStrategy(super::StaticChunkingStrategy),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MeanCombinationStrategy {
#[prost(
enumeration = "mean_combination_strategy::MeanEvaluationTechnique",
tag = "1"
)]
pub mean_evaluation_technique: i32,
#[prost(double, repeated, tag = "2")]
pub weights: ::prost::alloc::vec::Vec<f64>,
}
pub mod mean_combination_strategy {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum MeanEvaluationTechnique {
Unspecified = 0,
Arithmetic = 1,
Geometric = 2,
Harmonic = 3,
}
impl MeanEvaluationTechnique {
pub fn as_str_name(&self) -> &'static str {
match self {
MeanEvaluationTechnique::Unspecified => {
"MEAN_EVALUATION_TECHNIQUE_UNSPECIFIED"
}
MeanEvaluationTechnique::Arithmetic => "ARITHMETIC",
MeanEvaluationTechnique::Geometric => "GEOMETRIC",
MeanEvaluationTechnique::Harmonic => "HARMONIC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MEAN_EVALUATION_TECHNIQUE_UNSPECIFIED" => Some(Self::Unspecified),
"ARITHMETIC" => Some(Self::Arithmetic),
"GEOMETRIC" => Some(Self::Geometric),
"HARMONIC" => Some(Self::Harmonic),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReciprocalRankFusionCombinationStrategy {
#[prost(message, optional, tag = "1")]
pub k: ::core::option::Option<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CombinationStrategy {
#[prost(oneof = "combination_strategy::Strategy", tags = "1, 2")]
pub strategy: ::core::option::Option<combination_strategy::Strategy>,
}
pub mod combination_strategy {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Strategy {
#[prost(message, tag = "1")]
MeanCombination(super::MeanCombinationStrategy),
#[prost(message, tag = "2")]
RrfCombination(super::ReciprocalRankFusionCombinationStrategy),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NgramTokenizer {
#[prost(message, optional, tag = "1")]
pub min_gram: ::core::option::Option<i64>,
#[prost(message, optional, tag = "2")]
pub max_gram: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NormalizationStrategy {
Unspecified = 0,
MinMax = 1,
L2 = 2,
}
impl NormalizationStrategy {
pub fn as_str_name(&self) -> &'static str {
match self {
NormalizationStrategy::Unspecified => "NORMALIZATION_STRATEGY_UNSPECIFIED",
NormalizationStrategy::MinMax => "MIN_MAX",
NormalizationStrategy::L2 => "L2",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NORMALIZATION_STRATEGY_UNSPECIFIED" => Some(Self::Unspecified),
"MIN_MAX" => Some(Self::MinMax),
"L2" => Some(Self::L2),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchIndex {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub created_by: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "7")]
pub updated_by: ::prost::alloc::string::String,
#[prost(message, optional, tag = "8")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "9")]
pub expiration_config: ::core::option::Option<
super::super::super::common::ExpirationConfig,
>,
#[prost(message, optional, tag = "10")]
pub expires_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "11")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "search_index::IndexType", tags = "12, 13, 14")]
pub index_type: ::core::option::Option<search_index::IndexType>,
}
pub mod search_index {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum IndexType {
#[prost(message, tag = "12")]
TextSearchIndex(super::TextSearchIndex),
#[prost(message, tag = "13")]
VectorSearchIndex(super::VectorSearchIndex),
#[prost(message, tag = "14")]
HybridSearchIndex(super::HybridSearchIndex),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextSearchIndex {
#[prost(message, optional, tag = "1")]
pub chunking_strategy: ::core::option::Option<ChunkingStrategy>,
#[prost(oneof = "text_search_index::TextTokenizer", tags = "2")]
pub text_tokenizer: ::core::option::Option<text_search_index::TextTokenizer>,
}
pub mod text_search_index {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TextTokenizer {
#[prost(message, tag = "2")]
NgramTokenizer(super::NgramTokenizer),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorSearchIndex {
#[prost(string, tag = "1")]
pub doc_embedder_uri: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub query_embedder_uri: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub chunking_strategy: ::core::option::Option<ChunkingStrategy>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HybridSearchIndex {
#[prost(message, optional, tag = "1")]
pub text_search_index: ::core::option::Option<TextSearchIndex>,
#[prost(message, optional, tag = "2")]
pub vector_search_index: ::core::option::Option<VectorSearchIndex>,
#[prost(message, optional, tag = "3")]
pub chunking_strategy: ::core::option::Option<ChunkingStrategy>,
#[prost(enumeration = "NormalizationStrategy", tag = "4")]
pub normalization_strategy: i32,
#[prost(message, optional, tag = "5")]
pub combination_strategy: ::core::option::Option<CombinationStrategy>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchIndexFile {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub search_index_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub created_by: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateSearchIndexFileRequest {
#[prost(string, repeated, tag = "1")]
pub file_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub search_index_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateSearchIndexFileResponse {
#[prost(message, repeated, tag = "1")]
pub files: ::prost::alloc::vec::Vec<SearchIndexFile>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSearchIndexFileRequest {
#[prost(string, tag = "1")]
pub file_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub search_index_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSearchIndexFilesRequest {
#[prost(string, tag = "1")]
pub search_index_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSearchIndexFilesResponse {
#[prost(message, repeated, tag = "1")]
pub files: ::prost::alloc::vec::Vec<SearchIndexFile>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
pub mod search_index_file_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SearchIndexFileServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl SearchIndexFileServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> SearchIndexFileServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> SearchIndexFileServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
SearchIndexFileServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn batch_create(
&mut self,
request: impl tonic::IntoRequest<super::BatchCreateSearchIndexFileRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.ai.assistants.v1.searchindex.SearchIndexFileService/BatchCreate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.ai.assistants.v1.searchindex.SearchIndexFileService",
"BatchCreate",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetSearchIndexFileRequest>,
) -> std::result::Result<
tonic::Response<super::SearchIndexFile>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.ai.assistants.v1.searchindex.SearchIndexFileService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.ai.assistants.v1.searchindex.SearchIndexFileService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListSearchIndexFilesRequest>,
) -> std::result::Result<
tonic::Response<super::ListSearchIndexFilesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.ai.assistants.v1.searchindex.SearchIndexFileService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.ai.assistants.v1.searchindex.SearchIndexFileService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSearchIndexRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub file_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub expiration_config: ::core::option::Option<
super::super::super::common::ExpirationConfig,
>,
#[prost(map = "string, string", tag = "6")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "create_search_index_request::IndexType", tags = "7, 8, 9")]
pub index_type: ::core::option::Option<create_search_index_request::IndexType>,
}
pub mod create_search_index_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum IndexType {
#[prost(message, tag = "7")]
TextSearchIndex(super::TextSearchIndex),
#[prost(message, tag = "8")]
VectorSearchIndex(super::VectorSearchIndex),
#[prost(message, tag = "9")]
HybridSearchIndex(super::HybridSearchIndex),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSearchIndexRequest {
#[prost(string, tag = "1")]
pub search_index_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSearchIndexRequest {
#[prost(string, tag = "1")]
pub search_index_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub expiration_config: ::core::option::Option<
super::super::super::common::ExpirationConfig,
>,
#[prost(map = "string, string", tag = "6")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSearchIndexRequest {
#[prost(string, tag = "1")]
pub search_index_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSearchIndexResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSearchIndicesRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSearchIndicesResponse {
#[prost(message, repeated, tag = "1")]
pub indices: ::prost::alloc::vec::Vec<SearchIndex>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
pub mod search_index_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SearchIndexServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl SearchIndexServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> SearchIndexServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> SearchIndexServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
SearchIndexServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateSearchIndexRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetSearchIndexRequest>,
) -> std::result::Result<tonic::Response<super::SearchIndex>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateSearchIndexRequest>,
) -> std::result::Result<tonic::Response<super::SearchIndex>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteSearchIndexRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteSearchIndexResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListSearchIndicesRequest>,
) -> std::result::Result<
tonic::Response<super::ListSearchIndicesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.ai.assistants.v1.searchindex.SearchIndexService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
}
}