yandex-cloud 2025.4.14

Generated gRPC clients for the Yandex Cloud API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
/// Defines a chunking strategy where chunks are created with a fixed maximum chunk size and an overlap between consecutive chunks.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StaticChunkingStrategy {
    /// The maximum number of tokens allowed in a single chunk.
    /// Constraints: must be within the range [100, 2048].
    /// Default value: 800
    #[prost(int64, tag = "1")]
    pub max_chunk_size_tokens: i64,
    /// The number of tokens that should overlap between consecutive chunks.
    /// This allows for some context from the previous chunk to be included in the next chunk.
    /// Constraints: must be less than or equal to half of `max_chunk_size_tokens`.
    /// Default value: 400
    #[prost(int64, tag = "2")]
    pub chunk_overlap_tokens: i64,
}
/// Defines a general strategy for chunking text into smaller segments.
/// Currently, only StaticChunkingStrategy is supported.
#[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>,
}
/// Nested message and enum types in `ChunkingStrategy`.
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 {
    /// Technique for averaging relevance scores from different indices. Default is ARITHMETIC
    #[prost(
        enumeration = "mean_combination_strategy::MeanEvaluationTechnique",
        tag = "1"
    )]
    pub mean_evaluation_technique: i32,
    /// Weights used for evaluating the weighted mean of relevance scores. The sum of the values must equal 1.0
    /// If not provided, all scores are given equal weight
    #[prost(double, repeated, tag = "2")]
    pub weights: ::prost::alloc::vec::Vec<f64>,
}
/// Nested message and enum types in `MeanCombinationStrategy`.
pub mod mean_combination_strategy {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum MeanEvaluationTechnique {
        Unspecified = 0,
        /// <https://en.wikipedia.org/wiki/Arithmetic_mean>
        Arithmetic = 1,
        /// <https://en.wikipedia.org/wiki/Geometric_mean>
        Geometric = 2,
        /// <https://en.wikipedia.org/wiki/Harmonic_mean>
        Harmonic = 3,
    }
    impl MeanEvaluationTechnique {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        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",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        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,
            }
        }
    }
}
/// <https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf>
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReciprocalRankFusionCombinationStrategy {
    /// The parameter k for RRFscore. Default is 60
    #[prost(message, optional, tag = "1")]
    pub k: ::core::option::Option<i64>,
}
/// Combination strategy for merging rankings from different indices
#[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>,
}
/// Nested message and enum types in `CombinationStrategy`.
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),
    }
}
/// Configuration for the NgramTokenizer, which splits text into overlapping character sequences (n-grams) of specified lengths.
///
/// Example:
/// Input text: `hello`
/// min_gram = 2, max_gram = 3
///
/// Generated tokens:
/// * For n = 2 (2-character n-grams): `he`, `el`, `ll`, `lo`
/// * For n = 3 (3-character n-grams): `hel`, `ell`, `llo`
///
/// Final tokens: `[he, el, ll, lo, hel, ell, llo]`
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NgramTokenizer {
    /// Minimum length of characters in a gram. Defaults to 3
    #[prost(message, optional, tag = "1")]
    pub min_gram: ::core::option::Option<i64>,
    /// Maximum length of characters in a gram. Defaults to 4
    #[prost(message, optional, tag = "2")]
    pub max_gram: ::core::option::Option<i64>,
}
/// Normalization strategy for relevance scores from different indices
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NormalizationStrategy {
    Unspecified = 0,
    /// <https://en.wikipedia.org/wiki/Feature_scaling#Rescaling_(min-max_normalization>)
    MinMax = 1,
    /// <https://en.wikipedia.org/wiki/Cosine_similarity#L2-normalized_Euclidean_distance>
    L2 = 2,
}
impl NormalizationStrategy {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            NormalizationStrategy::Unspecified => "NORMALIZATION_STRATEGY_UNSPECIFIED",
            NormalizationStrategy::MinMax => "MIN_MAX",
            NormalizationStrategy::L2 => "L2",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    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,
        }
    }
}
/// Represents a search index used to store and query data, either using traditional keyword-based text search or vector-based search mechanisms.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchIndex {
    /// Unique identifier of the search index.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// ID of the folder that the search index belongs to.
    #[prost(string, tag = "2")]
    pub folder_id: ::prost::alloc::string::String,
    /// Name of the search index.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// Description of the search index.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// Identifier of the subject who created this search index.
    #[prost(string, tag = "5")]
    pub created_by: ::prost::alloc::string::String,
    /// Timestamp representing when the search index was created.
    #[prost(message, optional, tag = "6")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    /// Identifier of the subject who last updated this search index.
    #[prost(string, tag = "7")]
    pub updated_by: ::prost::alloc::string::String,
    /// Timestamp representing the last time this search index was updated.
    #[prost(message, optional, tag = "8")]
    pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
    /// Configuration for the expiration of the search index, defining when and how the search index will expire.
    #[prost(message, optional, tag = "9")]
    pub expiration_config: ::core::option::Option<
        super::super::super::common::ExpirationConfig,
    >,
    /// Timestamp representing when the search index will expire.
    #[prost(message, optional, tag = "10")]
    pub expires_at: ::core::option::Option<::prost_types::Timestamp>,
    /// Set of key-value pairs that can be used to organize and categorize the search index.
    #[prost(map = "string, string", tag = "11")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Type of the search index. It can be either a traditional keyword-based text search or a vector-based search.
    #[prost(oneof = "search_index::IndexType", tags = "12, 13, 14")]
    pub index_type: ::core::option::Option<search_index::IndexType>,
}
/// Nested message and enum types in `SearchIndex`.
pub mod search_index {
    /// Type of the search index. It can be either a traditional keyword-based text search or a vector-based search.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum IndexType {
        /// Keyword-based text search index configuration.
        /// This type of index is used for traditional text search, where documents are indexed based on their keywords.
        #[prost(message, tag = "12")]
        TextSearchIndex(super::TextSearchIndex),
        /// Vector-based search index configuration.
        /// This type is used for vector search, where documents are indexed using vector embeddings.
        #[prost(message, tag = "13")]
        VectorSearchIndex(super::VectorSearchIndex),
        /// Hybrid (vector-based + keyword-based) search index configuration
        /// This type is used for hybrid search, where documents are indexed using both keyword-based and vector-based search mechanisms.
        #[prost(message, tag = "14")]
        HybridSearchIndex(super::HybridSearchIndex),
    }
}
/// Defines the configuration for a traditional keyword-based text search index.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextSearchIndex {
    /// Chunking strategy used to split text into smaller chunks before indexing.
    /// In the case of text search, tokens are individual text characters.
    #[prost(message, optional, tag = "1")]
    pub chunking_strategy: ::core::option::Option<ChunkingStrategy>,
    /// Tokenizer type used for text search. The tokenizer determines how the
    /// input text is broken down into tokens before indexing.
    /// If not specified, the default tokenizer configuration is applied.
    #[prost(oneof = "text_search_index::TextTokenizer", tags = "2")]
    pub text_tokenizer: ::core::option::Option<text_search_index::TextTokenizer>,
}
/// Nested message and enum types in `TextSearchIndex`.
pub mod text_search_index {
    /// Tokenizer type used for text search. The tokenizer determines how the
    /// input text is broken down into tokens before indexing.
    /// If not specified, the default tokenizer configuration is applied.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum TextTokenizer {
        /// Tokenizer that generates n-grams.
        #[prost(message, tag = "2")]
        NgramTokenizer(super::NgramTokenizer),
    }
}
/// Defines the configuration for a vector-based search index. This type uses embeddings to represent documents and queries.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorSearchIndex {
    /// The [ID of the model](/docs/foundation-models/concepts/embeddings) to be used for obtaining document text embeddings.
    #[prost(string, tag = "1")]
    pub doc_embedder_uri: ::prost::alloc::string::String,
    /// The [ID of the model](/docs/foundation-models/concepts/embeddings) to be used for obtaining query text embeddings.
    #[prost(string, tag = "2")]
    pub query_embedder_uri: ::prost::alloc::string::String,
    /// Chunking strategy used to split text into smaller chunks before indexing.
    /// In the case of vector search, tokens are produced by the tokenizer from the embedding model.
    #[prost(message, optional, tag = "3")]
    pub chunking_strategy: ::core::option::Option<ChunkingStrategy>,
}
/// Defines the configuration for a hybrid (vector-based + keyword-based) search index. This type uses both embeddings and keyword-based search to represent documents and queries.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HybridSearchIndex {
    /// Configuration for a traditional keyword-based text search index.
    #[prost(message, optional, tag = "1")]
    pub text_search_index: ::core::option::Option<TextSearchIndex>,
    /// Configuration for a vector-based search index.
    #[prost(message, optional, tag = "2")]
    pub vector_search_index: ::core::option::Option<VectorSearchIndex>,
    /// Common chunking strategy that applies to both text and vector search indexes.
    /// If provided, it overrides the individual chunking strategies in both `text_search_index` and `vector_search_index`.
    /// In this case, both text and vector search will use token-based chunking, where tokens are produced by the tokenizer of the embedding model.
    #[prost(message, optional, tag = "3")]
    pub chunking_strategy: ::core::option::Option<ChunkingStrategy>,
    /// Normalization strategy for relevance scores from different indices. Default is MIN_MAX_STRATEGY
    #[prost(enumeration = "NormalizationStrategy", tag = "4")]
    pub normalization_strategy: i32,
    /// Combination strategy for merging rankings from different indices. Default is arithmetic mean
    #[prost(message, optional, tag = "5")]
    pub combination_strategy: ::core::option::Option<CombinationStrategy>,
}
/// Represents a file that has been indexed within a search index.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchIndexFile {
    /// Unique identifier of the file that was used for indexing.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// ID of the search index that contains this file.
    #[prost(string, tag = "2")]
    pub search_index_id: ::prost::alloc::string::String,
    /// Identifier of the subject who created the file in the search index.
    #[prost(string, tag = "3")]
    pub created_by: ::prost::alloc::string::String,
    /// Timestamp representing when the file was created.
    #[prost(message, optional, tag = "4")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
/// Request message for creating multiple files within a search index.
#[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,
}
/// Response message for the BatchCreate operation.
#[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>,
}
/// Request message for retrieving a file from a search index.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSearchIndexFileRequest {
    /// ID of the file to retrieve.
    #[prost(string, tag = "1")]
    pub file_id: ::prost::alloc::string::String,
    /// ID of the search index that contains the file.
    #[prost(string, tag = "2")]
    pub search_index_id: ::prost::alloc::string::String,
}
/// Request message for listing files in a specific search index.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSearchIndexFilesRequest {
    /// ID of the search index whose files will be listed.
    #[prost(string, tag = "1")]
    pub search_index_id: ::prost::alloc::string::String,
    /// Maximum number of files to return per page.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Token to retrieve the next page of results.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response message for the list operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSearchIndexFilesResponse {
    /// List of files in the specified search index.
    #[prost(message, repeated, tag = "1")]
    pub files: ::prost::alloc::vec::Vec<SearchIndexFile>,
    /// Token to retrieve the next page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
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;
    /// SearchIndexFileService provides operations for managing files within search indexes.
    #[derive(Debug, Clone)]
    pub struct SearchIndexFileServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl SearchIndexFileServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        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),
            )
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Creates multiple files within a search index in [asynchronous mode](/docs/foundation-models/concepts/#working-mode).
        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
        }
        /// Retrieves details of a specific file that has been indexed within a search index.
        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
        }
        /// List files that are indexed within a specific search index.
        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
        }
    }
}
/// Request to create a new search index.
#[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,
    /// List of file IDs to be indexed.
    #[prost(string, repeated, tag = "2")]
    pub file_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Name of the search index.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// Description of the search index.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// Expiration configuration for the search index.
    #[prost(message, optional, tag = "5")]
    pub expiration_config: ::core::option::Option<
        super::super::super::common::ExpirationConfig,
    >,
    /// Set of key-value pairs to label the search index.
    #[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>,
}
/// Nested message and enum types in `CreateSearchIndexRequest`.
pub mod create_search_index_request {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum IndexType {
        /// Configuration for a traditional keyword-based text search index.
        #[prost(message, tag = "7")]
        TextSearchIndex(super::TextSearchIndex),
        /// Configuration for a vector-based search index using embeddings.
        #[prost(message, tag = "8")]
        VectorSearchIndex(super::VectorSearchIndex),
        /// Configuration for a hybrid (vector-based + keyword-based) search index.
        #[prost(message, tag = "9")]
        HybridSearchIndex(super::HybridSearchIndex),
    }
}
/// Request message for retrieving a search index by ID.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSearchIndexRequest {
    /// ID of the search index to retrieve.
    #[prost(string, tag = "1")]
    pub search_index_id: ::prost::alloc::string::String,
}
/// Request message for updating an existing search index.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSearchIndexRequest {
    /// ID of the search index to update.
    #[prost(string, tag = "1")]
    pub search_index_id: ::prost::alloc::string::String,
    /// Field mask specifying which fields to update.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// New name for the search index.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// New description for the search index.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// New expiration configuration for the search index.
    #[prost(message, optional, tag = "5")]
    pub expiration_config: ::core::option::Option<
        super::super::super::common::ExpirationConfig,
    >,
    /// New set of labels for the search index.
    #[prost(map = "string, string", tag = "6")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Request message for deleting a search index by ID.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSearchIndexRequest {
    /// ID of the search index to delete.
    #[prost(string, tag = "1")]
    pub search_index_id: ::prost::alloc::string::String,
}
/// Response message for the delete operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSearchIndexResponse {}
/// Request message for listing search indexes in a specific folder.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSearchIndicesRequest {
    /// Folder ID from which to list search indexes.
    #[prost(string, tag = "1")]
    pub folder_id: ::prost::alloc::string::String,
    /// Maximum number of threads to return per page.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Token to retrieve the next page of results.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response message for the list operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSearchIndicesResponse {
    /// List of search indexes in the specified folder.
    #[prost(message, repeated, tag = "1")]
    pub indices: ::prost::alloc::vec::Vec<SearchIndex>,
    /// Token to retrieve the next page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
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;
    /// SearchIndexService provides operations for managing search indexes.
    #[derive(Debug, Clone)]
    pub struct SearchIndexServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl SearchIndexServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        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))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Create a new search index in [asynchronous mode](/docs/foundation-models/concepts/#working-mode).
        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
        }
        /// Retrieve details of a specific search index by its ID.
        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
        }
        /// Update an existing search index.
        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
        }
        /// Delete a search index by its ID.
        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
        }
        /// List search indexes in a specific folder.
        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
        }
    }
}