#[non_exhaustive]pub struct SearchDataObjectsRequest {
pub parent: String,
pub page_size: i32,
pub page_token: String,
pub search_type: Option<SearchType>,
/* private fields */
}Expand description
Request for performing a single search.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The resource name of the Collection for which to search.
Format: projects/{project}/locations/{location}/collections/{collection}
page_size: i32Optional. The standard list page size. Only supported for KNN. If not set, up to search_type.top_k results will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_token: StringOptional. The standard list page token. Typically obtained via SearchDataObjectsResponse.next_page_token of the previous DataObjectSearchService.SearchDataObjects call.
search_type: Option<SearchType>The query to search for.
Implementations§
Source§impl SearchDataObjectsRequest
impl SearchDataObjectsRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_page_size<T: Into<i32>>(self, v: T) -> Self
pub fn set_page_size<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_page_token<T: Into<String>>(self, v: T) -> Self
pub fn set_page_token<T: Into<String>>(self, v: T) -> Self
Sets the value of page_token.
§Example
let x = SearchDataObjectsRequest::new().set_page_token("example");Sourcepub fn set_search_type<T: Into<Option<SearchType>>>(self, v: T) -> Self
pub fn set_search_type<T: Into<Option<SearchType>>>(self, v: T) -> Self
Sets the value of search_type.
Note that all the setters affecting search_type are mutually
exclusive.
§Example
use google_cloud_vectorsearch_v1::model::VectorSearch;
let x = SearchDataObjectsRequest::new().set_search_type(Some(
google_cloud_vectorsearch_v1::model::search_data_objects_request::SearchType::VectorSearch(VectorSearch::default().into())));Sourcepub fn vector_search(&self) -> Option<&Box<VectorSearch>>
pub fn vector_search(&self) -> Option<&Box<VectorSearch>>
The value of search_type
if it holds a VectorSearch, None if the field is not set or
holds a different branch.
Sourcepub fn set_vector_search<T: Into<Box<VectorSearch>>>(self, v: T) -> Self
pub fn set_vector_search<T: Into<Box<VectorSearch>>>(self, v: T) -> Self
Sets the value of search_type
to hold a VectorSearch.
Note that all the setters affecting search_type are
mutually exclusive.
§Example
use google_cloud_vectorsearch_v1::model::VectorSearch;
let x = SearchDataObjectsRequest::new().set_vector_search(VectorSearch::default()/* use setters */);
assert!(x.vector_search().is_some());
assert!(x.semantic_search().is_none());
assert!(x.text_search().is_none());Sourcepub fn semantic_search(&self) -> Option<&Box<SemanticSearch>>
pub fn semantic_search(&self) -> Option<&Box<SemanticSearch>>
The value of search_type
if it holds a SemanticSearch, None if the field is not set or
holds a different branch.
Sourcepub fn set_semantic_search<T: Into<Box<SemanticSearch>>>(self, v: T) -> Self
pub fn set_semantic_search<T: Into<Box<SemanticSearch>>>(self, v: T) -> Self
Sets the value of search_type
to hold a SemanticSearch.
Note that all the setters affecting search_type are
mutually exclusive.
§Example
use google_cloud_vectorsearch_v1::model::SemanticSearch;
let x = SearchDataObjectsRequest::new().set_semantic_search(SemanticSearch::default()/* use setters */);
assert!(x.semantic_search().is_some());
assert!(x.vector_search().is_none());
assert!(x.text_search().is_none());Sourcepub fn text_search(&self) -> Option<&Box<TextSearch>>
pub fn text_search(&self) -> Option<&Box<TextSearch>>
The value of search_type
if it holds a TextSearch, None if the field is not set or
holds a different branch.
Sourcepub fn set_text_search<T: Into<Box<TextSearch>>>(self, v: T) -> Self
pub fn set_text_search<T: Into<Box<TextSearch>>>(self, v: T) -> Self
Sets the value of search_type
to hold a TextSearch.
Note that all the setters affecting search_type are
mutually exclusive.
§Example
use google_cloud_vectorsearch_v1::model::TextSearch;
let x = SearchDataObjectsRequest::new().set_text_search(TextSearch::default()/* use setters */);
assert!(x.text_search().is_some());
assert!(x.vector_search().is_none());
assert!(x.semantic_search().is_none());Trait Implementations§
Source§impl Clone for SearchDataObjectsRequest
impl Clone for SearchDataObjectsRequest
Source§fn clone(&self) -> SearchDataObjectsRequest
fn clone(&self) -> SearchDataObjectsRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more