#[non_exhaustive]pub struct PurgeDocumentsRequest {
pub parent: String,
pub filter: String,
pub error_config: Option<PurgeErrorConfig>,
pub force: bool,
pub source: Option<Source>,
/* private fields */
}document-service only.Expand description
Request message for DocumentService.PurgeDocuments method.
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 parent resource name, such as
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}.
filter: StringRequired. Filter matching documents to purge. Only currently supported
value is
* (all items).
error_config: Option<PurgeErrorConfig>The desired location of errors incurred during the purge.
force: boolActually performs the purge. If force is set to false, return the
expected purge count without deleting any documents.
source: Option<Source>The desired input source for the purging documents based on document IDs.
Implementations§
Source§impl PurgeDocumentsRequest
impl PurgeDocumentsRequest
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_filter<T: Into<String>>(self, v: T) -> Self
pub fn set_filter<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_error_config<T>(self, v: T) -> Selfwhere
T: Into<PurgeErrorConfig>,
pub fn set_error_config<T>(self, v: T) -> Selfwhere
T: Into<PurgeErrorConfig>,
Sets the value of error_config.
§Example
use google_cloud_discoveryengine_v1::model::PurgeErrorConfig;
let x = PurgeDocumentsRequest::new().set_error_config(PurgeErrorConfig::default()/* use setters */);Sourcepub fn set_or_clear_error_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<PurgeErrorConfig>,
pub fn set_or_clear_error_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<PurgeErrorConfig>,
Sets or clears the value of error_config.
§Example
use google_cloud_discoveryengine_v1::model::PurgeErrorConfig;
let x = PurgeDocumentsRequest::new().set_or_clear_error_config(Some(PurgeErrorConfig::default()/* use setters */));
let x = PurgeDocumentsRequest::new().set_or_clear_error_config(None::<PurgeErrorConfig>);Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::GcsSource;
let x = PurgeDocumentsRequest::new().set_source(Some(
google_cloud_discoveryengine_v1::model::purge_documents_request::Source::GcsSource(GcsSource::default().into())));Sourcepub fn gcs_source(&self) -> Option<&Box<GcsSource>>
pub fn gcs_source(&self) -> Option<&Box<GcsSource>>
The value of 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 source
to hold a GcsSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::GcsSource;
let x = PurgeDocumentsRequest::new().set_gcs_source(GcsSource::default()/* use setters */);
assert!(x.gcs_source().is_some());
assert!(x.inline_source().is_none());Sourcepub fn inline_source(&self) -> Option<&Box<InlineSource>>
pub fn inline_source(&self) -> Option<&Box<InlineSource>>
The value of source
if it holds a InlineSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_inline_source<T: Into<Box<InlineSource>>>(self, v: T) -> Self
pub fn set_inline_source<T: Into<Box<InlineSource>>>(self, v: T) -> Self
Sets the value of source
to hold a InlineSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::purge_documents_request::InlineSource;
let x = PurgeDocumentsRequest::new().set_inline_source(InlineSource::default()/* use setters */);
assert!(x.inline_source().is_some());
assert!(x.gcs_source().is_none());Trait Implementations§
Source§impl Clone for PurgeDocumentsRequest
impl Clone for PurgeDocumentsRequest
Source§fn clone(&self) -> PurgeDocumentsRequest
fn clone(&self) -> PurgeDocumentsRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more