#[non_exhaustive]pub struct RetrieveContextsRequest {
pub parent: String,
pub query: Option<RagQuery>,
pub data_source: Option<DataSource>,
/* private fields */
}Available on crate feature
vertex-rag-service only.Expand description
Request message for VertexRagService.RetrieveContexts.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The resource name of the Location from which to retrieve
RagContexts. The users must have permission to make a call in the project.
Format:
projects/{project}/locations/{location}.
query: Option<RagQuery>Required. Single RAG retrieve query.
data_source: Option<DataSource>Data Source to retrieve contexts.
Implementations§
Source§impl RetrieveContextsRequest
impl RetrieveContextsRequest
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_or_clear_query<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_query<T>(self, v: Option<T>) -> Self
Sourcepub fn set_data_source<T: Into<Option<DataSource>>>(self, v: T) -> Self
pub fn set_data_source<T: Into<Option<DataSource>>>(self, v: T) -> Self
Sets the value of data_source.
Note that all the setters affecting data_source are mutually
exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::retrieve_contexts_request::VertexRagStore;
let x = RetrieveContextsRequest::new().set_data_source(Some(
google_cloud_aiplatform_v1::model::retrieve_contexts_request::DataSource::VertexRagStore(VertexRagStore::default().into())));Sourcepub fn vertex_rag_store(&self) -> Option<&Box<VertexRagStore>>
pub fn vertex_rag_store(&self) -> Option<&Box<VertexRagStore>>
The value of data_source
if it holds a VertexRagStore, None if the field is not set or
holds a different branch.
Sourcepub fn set_vertex_rag_store<T: Into<Box<VertexRagStore>>>(self, v: T) -> Self
pub fn set_vertex_rag_store<T: Into<Box<VertexRagStore>>>(self, v: T) -> Self
Sets the value of data_source
to hold a VertexRagStore.
Note that all the setters affecting data_source are
mutually exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::retrieve_contexts_request::VertexRagStore;
let x = RetrieveContextsRequest::new().set_vertex_rag_store(VertexRagStore::default()/* use setters */);
assert!(x.vertex_rag_store().is_some());Trait Implementations§
Source§impl Clone for RetrieveContextsRequest
impl Clone for RetrieveContextsRequest
Source§fn clone(&self) -> RetrieveContextsRequest
fn clone(&self) -> RetrieveContextsRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetrieveContextsRequest
impl Debug for RetrieveContextsRequest
Source§impl Default for RetrieveContextsRequest
impl Default for RetrieveContextsRequest
Source§fn default() -> RetrieveContextsRequest
fn default() -> RetrieveContextsRequest
Returns the “default value” for a type. Read more
Source§impl Message for RetrieveContextsRequest
impl Message for RetrieveContextsRequest
Source§impl PartialEq for RetrieveContextsRequest
impl PartialEq for RetrieveContextsRequest
impl StructuralPartialEq for RetrieveContextsRequest
Auto Trait Implementations§
impl Freeze for RetrieveContextsRequest
impl RefUnwindSafe for RetrieveContextsRequest
impl Send for RetrieveContextsRequest
impl Sync for RetrieveContextsRequest
impl Unpin for RetrieveContextsRequest
impl UnwindSafe for RetrieveContextsRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more