#[non_exhaustive]pub struct RagFile {
pub name: String,
pub display_name: String,
pub description: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub file_status: Option<FileStatus>,
pub rag_file_source: Option<RagFileSource>,
/* private fields */
}vertex-rag-data-service only.Expand description
A RagFile contains user data for chunking, embedding and indexing.
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.name: StringOutput only. The resource name of the RagFile.
display_name: StringRequired. The display name of the RagFile. The name can be up to 128 characters long and can consist of any UTF-8 characters.
description: StringOptional. The description of the RagFile.
create_time: Option<Timestamp>Output only. Timestamp when this RagFile was created.
update_time: Option<Timestamp>Output only. Timestamp when this RagFile was last updated.
file_status: Option<FileStatus>Output only. State of the RagFile.
rag_file_source: Option<RagFileSource>The origin location of the RagFile if it is imported from Google Cloud Storage or Google Drive.
Implementations§
Source§impl RagFile
impl RagFile
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = RagFile::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = RagFile::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = RagFile::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = RagFile::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = RagFile::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = RagFile::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_file_status<T>(self, v: T) -> Selfwhere
T: Into<FileStatus>,
pub fn set_file_status<T>(self, v: T) -> Selfwhere
T: Into<FileStatus>,
Sets the value of file_status.
§Example
use google_cloud_aiplatform_v1::model::FileStatus;
let x = RagFile::new().set_file_status(FileStatus::default()/* use setters */);Sourcepub fn set_or_clear_file_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<FileStatus>,
pub fn set_or_clear_file_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<FileStatus>,
Sets or clears the value of file_status.
§Example
use google_cloud_aiplatform_v1::model::FileStatus;
let x = RagFile::new().set_or_clear_file_status(Some(FileStatus::default()/* use setters */));
let x = RagFile::new().set_or_clear_file_status(None::<FileStatus>);Sourcepub fn set_rag_file_source<T: Into<Option<RagFileSource>>>(self, v: T) -> Self
pub fn set_rag_file_source<T: Into<Option<RagFileSource>>>(self, v: T) -> Self
Sets the value of rag_file_source.
Note that all the setters affecting rag_file_source are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::GcsSource;
let x = RagFile::new().set_rag_file_source(Some(
google_cloud_aiplatform_v1::model::rag_file::RagFileSource::GcsSource(GcsSource::default().into())));Sourcepub fn gcs_source(&self) -> Option<&Box<GcsSource>>
pub fn gcs_source(&self) -> Option<&Box<GcsSource>>
The value of rag_file_source
if it holds a GcsSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_source<T: Into<Box<GcsSource>>>(self, v: T) -> Self
pub fn set_gcs_source<T: Into<Box<GcsSource>>>(self, v: T) -> Self
Sets the value of rag_file_source
to hold a GcsSource.
Note that all the setters affecting rag_file_source are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::GcsSource;
let x = RagFile::new().set_gcs_source(GcsSource::default()/* use setters */);
assert!(x.gcs_source().is_some());
assert!(x.google_drive_source().is_none());
assert!(x.direct_upload_source().is_none());
assert!(x.slack_source().is_none());
assert!(x.jira_source().is_none());
assert!(x.share_point_sources().is_none());Sourcepub fn google_drive_source(&self) -> Option<&Box<GoogleDriveSource>>
pub fn google_drive_source(&self) -> Option<&Box<GoogleDriveSource>>
The value of rag_file_source
if it holds a GoogleDriveSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_google_drive_source<T: Into<Box<GoogleDriveSource>>>(
self,
v: T,
) -> Self
pub fn set_google_drive_source<T: Into<Box<GoogleDriveSource>>>( self, v: T, ) -> Self
Sets the value of rag_file_source
to hold a GoogleDriveSource.
Note that all the setters affecting rag_file_source are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::GoogleDriveSource;
let x = RagFile::new().set_google_drive_source(GoogleDriveSource::default()/* use setters */);
assert!(x.google_drive_source().is_some());
assert!(x.gcs_source().is_none());
assert!(x.direct_upload_source().is_none());
assert!(x.slack_source().is_none());
assert!(x.jira_source().is_none());
assert!(x.share_point_sources().is_none());Sourcepub fn direct_upload_source(&self) -> Option<&Box<DirectUploadSource>>
pub fn direct_upload_source(&self) -> Option<&Box<DirectUploadSource>>
The value of rag_file_source
if it holds a DirectUploadSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_direct_upload_source<T: Into<Box<DirectUploadSource>>>(
self,
v: T,
) -> Self
pub fn set_direct_upload_source<T: Into<Box<DirectUploadSource>>>( self, v: T, ) -> Self
Sets the value of rag_file_source
to hold a DirectUploadSource.
Note that all the setters affecting rag_file_source are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::DirectUploadSource;
let x = RagFile::new().set_direct_upload_source(DirectUploadSource::default()/* use setters */);
assert!(x.direct_upload_source().is_some());
assert!(x.gcs_source().is_none());
assert!(x.google_drive_source().is_none());
assert!(x.slack_source().is_none());
assert!(x.jira_source().is_none());
assert!(x.share_point_sources().is_none());Sourcepub fn slack_source(&self) -> Option<&Box<SlackSource>>
pub fn slack_source(&self) -> Option<&Box<SlackSource>>
The value of rag_file_source
if it holds a SlackSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_slack_source<T: Into<Box<SlackSource>>>(self, v: T) -> Self
pub fn set_slack_source<T: Into<Box<SlackSource>>>(self, v: T) -> Self
Sets the value of rag_file_source
to hold a SlackSource.
Note that all the setters affecting rag_file_source are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::SlackSource;
let x = RagFile::new().set_slack_source(SlackSource::default()/* use setters */);
assert!(x.slack_source().is_some());
assert!(x.gcs_source().is_none());
assert!(x.google_drive_source().is_none());
assert!(x.direct_upload_source().is_none());
assert!(x.jira_source().is_none());
assert!(x.share_point_sources().is_none());Sourcepub fn jira_source(&self) -> Option<&Box<JiraSource>>
pub fn jira_source(&self) -> Option<&Box<JiraSource>>
The value of rag_file_source
if it holds a JiraSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_jira_source<T: Into<Box<JiraSource>>>(self, v: T) -> Self
pub fn set_jira_source<T: Into<Box<JiraSource>>>(self, v: T) -> Self
Sets the value of rag_file_source
to hold a JiraSource.
Note that all the setters affecting rag_file_source are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::JiraSource;
let x = RagFile::new().set_jira_source(JiraSource::default()/* use setters */);
assert!(x.jira_source().is_some());
assert!(x.gcs_source().is_none());
assert!(x.google_drive_source().is_none());
assert!(x.direct_upload_source().is_none());
assert!(x.slack_source().is_none());
assert!(x.share_point_sources().is_none());The value of rag_file_source
if it holds a SharePointSources, None if the field is not set or
holds a different branch.
Sets the value of rag_file_source
to hold a SharePointSources.
Note that all the setters affecting rag_file_source are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::SharePointSources;
let x = RagFile::new().set_share_point_sources(SharePointSources::default()/* use setters */);
assert!(x.share_point_sources().is_some());
assert!(x.gcs_source().is_none());
assert!(x.google_drive_source().is_none());
assert!(x.direct_upload_source().is_none());
assert!(x.slack_source().is_none());
assert!(x.jira_source().is_none());