#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PurgeDocumentsRequest
impl Debug for PurgeDocumentsRequest
Source§impl Default for PurgeDocumentsRequest
impl Default for PurgeDocumentsRequest
Source§fn default() -> PurgeDocumentsRequest
fn default() -> PurgeDocumentsRequest
Source§impl Message for PurgeDocumentsRequest
impl Message for PurgeDocumentsRequest
Source§impl PartialEq for PurgeDocumentsRequest
impl PartialEq for PurgeDocumentsRequest
impl StructuralPartialEq for PurgeDocumentsRequest
Auto Trait Implementations§
impl Freeze for PurgeDocumentsRequest
impl RefUnwindSafe for PurgeDocumentsRequest
impl Send for PurgeDocumentsRequest
impl Sync for PurgeDocumentsRequest
impl Unpin for PurgeDocumentsRequest
impl UnsafeUnpin for PurgeDocumentsRequest
impl UnwindSafe for PurgeDocumentsRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request