#[non_exhaustive]pub struct SharePointSource {
pub client_id: String,
pub client_secret: Option<ApiKeyConfig>,
pub tenant_id: String,
pub sharepoint_site_name: String,
pub file_id: String,
pub folder_source: Option<FolderSource>,
pub drive_source: Option<DriveSource>,
/* private fields */
}vertex-rag-data-service only.Expand description
An individual SharePointSource.
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.client_id: StringThe Application ID for the app registered in Microsoft Azure Portal. The application must also be configured with MS Graph permissions “Files.ReadAll”, “Sites.ReadAll” and BrowserSiteLists.Read.All.
client_secret: Option<ApiKeyConfig>The application secret for the app registered in Azure.
tenant_id: StringUnique identifier of the Azure Active Directory Instance.
The name of the SharePoint site to download from. This can be the site name or the site id.
file_id: StringOutput only. The SharePoint file id. Output only.
folder_source: Option<FolderSource>The SharePoint folder source. If not provided, uses “root”.
drive_source: Option<DriveSource>The SharePoint drive source.
Implementations§
pub fn new() -> Self
Sourcepub fn set_client_id<T: Into<String>>(self, v: T) -> Self
pub fn set_client_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_client_secret<T>(self, v: T) -> Selfwhere
T: Into<ApiKeyConfig>,
pub fn set_client_secret<T>(self, v: T) -> Selfwhere
T: Into<ApiKeyConfig>,
Sets the value of client_secret.
§Example
use google_cloud_aiplatform_v1::model::api_auth::ApiKeyConfig;
let x = SharePointSource::new().set_client_secret(ApiKeyConfig::default()/* use setters */);Sourcepub fn set_or_clear_client_secret<T>(self, v: Option<T>) -> Selfwhere
T: Into<ApiKeyConfig>,
pub fn set_or_clear_client_secret<T>(self, v: Option<T>) -> Selfwhere
T: Into<ApiKeyConfig>,
Sets or clears the value of client_secret.
§Example
use google_cloud_aiplatform_v1::model::api_auth::ApiKeyConfig;
let x = SharePointSource::new().set_or_clear_client_secret(Some(ApiKeyConfig::default()/* use setters */));
let x = SharePointSource::new().set_or_clear_client_secret(None::<ApiKeyConfig>);Sourcepub fn set_tenant_id<T: Into<String>>(self, v: T) -> Self
pub fn set_tenant_id<T: Into<String>>(self, v: T) -> Self
Sets the value of sharepoint_site_name.
§Example
let x = SharePointSource::new().set_sharepoint_site_name("example");Sourcepub fn set_file_id<T: Into<String>>(self, v: T) -> Self
pub fn set_file_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_folder_source<T: Into<Option<FolderSource>>>(self, v: T) -> Self
pub fn set_folder_source<T: Into<Option<FolderSource>>>(self, v: T) -> Self
Sets the value of folder_source.
Note that all the setters affecting folder_source are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::share_point_sources::share_point_source::FolderSource;
let x = SharePointSource::new().set_folder_source(Some(FolderSource::SharepointFolderPath("example".to_string())));The value of folder_source
if it holds a SharepointFolderPath, None if the field is not set or
holds a different branch.
Sets the value of folder_source
to hold a SharepointFolderPath.
Note that all the setters affecting folder_source are
mutually exclusive.
§Example
let x = SharePointSource::new().set_sharepoint_folder_path("example");
assert!(x.sharepoint_folder_path().is_some());
assert!(x.sharepoint_folder_id().is_none());The value of folder_source
if it holds a SharepointFolderId, None if the field is not set or
holds a different branch.
Sets the value of folder_source
to hold a SharepointFolderId.
Note that all the setters affecting folder_source are
mutually exclusive.
§Example
let x = SharePointSource::new().set_sharepoint_folder_id("example");
assert!(x.sharepoint_folder_id().is_some());
assert!(x.sharepoint_folder_path().is_none());Sourcepub fn set_drive_source<T: Into<Option<DriveSource>>>(self, v: T) -> Self
pub fn set_drive_source<T: Into<Option<DriveSource>>>(self, v: T) -> Self
Sets the value of drive_source.
Note that all the setters affecting drive_source are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::share_point_sources::share_point_source::DriveSource;
let x = SharePointSource::new().set_drive_source(Some(DriveSource::DriveName("example".to_string())));Sourcepub fn drive_name(&self) -> Option<&String>
pub fn drive_name(&self) -> Option<&String>
The value of drive_source
if it holds a DriveName, None if the field is not set or
holds a different branch.
Sourcepub fn set_drive_name<T: Into<String>>(self, v: T) -> Self
pub fn set_drive_name<T: Into<String>>(self, v: T) -> Self
Sets the value of drive_source
to hold a DriveName.
Note that all the setters affecting drive_source are
mutually exclusive.
§Example
let x = SharePointSource::new().set_drive_name("example");
assert!(x.drive_name().is_some());
assert!(x.drive_id().is_none());Sourcepub fn drive_id(&self) -> Option<&String>
pub fn drive_id(&self) -> Option<&String>
The value of drive_source
if it holds a DriveId, None if the field is not set or
holds a different branch.
Sourcepub fn set_drive_id<T: Into<String>>(self, v: T) -> Self
pub fn set_drive_id<T: Into<String>>(self, v: T) -> Self
Sets the value of drive_source
to hold a DriveId.
Note that all the setters affecting drive_source are
mutually exclusive.
§Example
let x = SharePointSource::new().set_drive_id("example");
assert!(x.drive_id().is_some());
assert!(x.drive_name().is_none());Trait Implementations§
Source§fn clone(&self) -> SharePointSource
fn clone(&self) -> SharePointSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more