aws-sdk-sagemakerfeaturestoreruntime 1.102.0

AWS SDK for Amazon SageMaker Feature Store Runtime
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::delete_record::_delete_record_input::DeleteRecordInputBuilder;

pub use crate::operation::delete_record::_delete_record_output::DeleteRecordOutputBuilder;

impl crate::operation::delete_record::builders::DeleteRecordInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::delete_record::DeleteRecordOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::delete_record::DeleteRecordError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.delete_record();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `DeleteRecord`.
///
/// <p>Deletes a <code>Record</code> from a <code>FeatureGroup</code> in the <code>OnlineStore</code>. Feature Store supports both <code>SoftDelete</code> and <code>HardDelete</code>. For <code>SoftDelete</code> (default), feature columns are set to <code>null</code> and the record is no longer retrievable by <code>GetRecord</code> or <code>BatchGetRecord</code>. For <code>HardDelete</code>, the complete <code>Record</code> is removed from the <code>OnlineStore</code>. In both cases, Feature Store appends the deleted record marker to the <code>OfflineStore</code>. The deleted record marker is a record with the same <code>RecordIdentifer</code> as the original, but with <code>is_deleted</code> value set to <code>True</code>, <code>EventTime</code> set to the delete input <code>EventTime</code>, and other feature values set to <code>null</code>.</p>
/// <p>Note that the <code>EventTime</code> specified in <code>DeleteRecord</code> should be set later than the <code>EventTime</code> of the existing record in the <code>OnlineStore</code> for that <code>RecordIdentifer</code>. If it is not, the deletion does not occur:</p>
/// <ul>
/// <li>
/// <p>For <code>SoftDelete</code>, the existing (not deleted) record remains in the <code>OnlineStore</code>, though the delete record marker is still written to the <code>OfflineStore</code>.</p></li>
/// <li>
/// <p><code>HardDelete</code> returns <code>EventTime</code>: <code>400 ValidationException</code> to indicate that the delete operation failed. No delete record marker is written to the <code>OfflineStore</code>.</p></li>
/// </ul>
/// <p>When a record is deleted from the <code>OnlineStore</code>, the deleted record marker is appended to the <code>OfflineStore</code>. If you have the Iceberg table format enabled for your <code>OfflineStore</code>, you can remove all history of a record from the <code>OfflineStore</code> using Amazon Athena or Apache Spark. For information on how to hard delete a record from the <code>OfflineStore</code> with the Iceberg table format enabled, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/feature-store-delete-records-offline-store.html#feature-store-delete-records-offline-store">Delete records from the offline store</a>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct DeleteRecordFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::delete_record::builders::DeleteRecordInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::delete_record::DeleteRecordOutput,
        crate::operation::delete_record::DeleteRecordError,
    > for DeleteRecordFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::delete_record::DeleteRecordOutput,
            crate::operation::delete_record::DeleteRecordError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl DeleteRecordFluentBuilder {
    /// Creates a new `DeleteRecordFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the DeleteRecord as a reference.
    pub fn as_input(&self) -> &crate::operation::delete_record::builders::DeleteRecordInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::delete_record::DeleteRecordOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::delete_record::DeleteRecordError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::delete_record::DeleteRecord::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::delete_record::DeleteRecord::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::delete_record::DeleteRecordOutput,
        crate::operation::delete_record::DeleteRecordError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the feature group to delete the record from.</p>
    pub fn feature_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.feature_group_name(input.into());
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the feature group to delete the record from.</p>
    pub fn set_feature_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_feature_group_name(input);
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the feature group to delete the record from.</p>
    pub fn get_feature_group_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_feature_group_name()
    }
    /// <p>The value for the <code>RecordIdentifier</code> that uniquely identifies the record, in string format.</p>
    pub fn record_identifier_value_as_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.record_identifier_value_as_string(input.into());
        self
    }
    /// <p>The value for the <code>RecordIdentifier</code> that uniquely identifies the record, in string format.</p>
    pub fn set_record_identifier_value_as_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_record_identifier_value_as_string(input);
        self
    }
    /// <p>The value for the <code>RecordIdentifier</code> that uniquely identifies the record, in string format.</p>
    pub fn get_record_identifier_value_as_string(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_record_identifier_value_as_string()
    }
    /// <p>Timestamp indicating when the deletion event occurred. <code>EventTime</code> can be used to query data at a certain point in time.</p>
    pub fn event_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.event_time(input.into());
        self
    }
    /// <p>Timestamp indicating when the deletion event occurred. <code>EventTime</code> can be used to query data at a certain point in time.</p>
    pub fn set_event_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_event_time(input);
        self
    }
    /// <p>Timestamp indicating when the deletion event occurred. <code>EventTime</code> can be used to query data at a certain point in time.</p>
    pub fn get_event_time(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_event_time()
    }
    ///
    /// Appends an item to `TargetStores`.
    ///
    /// To override the contents of this collection use [`set_target_stores`](Self::set_target_stores).
    ///
    /// <p>A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the <code>FeatureGroup</code>.</p>
    pub fn target_stores(mut self, input: crate::types::TargetStore) -> Self {
        self.inner = self.inner.target_stores(input);
        self
    }
    /// <p>A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the <code>FeatureGroup</code>.</p>
    pub fn set_target_stores(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetStore>>) -> Self {
        self.inner = self.inner.set_target_stores(input);
        self
    }
    /// <p>A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the <code>FeatureGroup</code>.</p>
    pub fn get_target_stores(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetStore>> {
        self.inner.get_target_stores()
    }
    /// <p>The name of the deletion mode for deleting the record. By default, the deletion mode is set to <code>SoftDelete</code>.</p>
    pub fn deletion_mode(mut self, input: crate::types::DeletionMode) -> Self {
        self.inner = self.inner.deletion_mode(input);
        self
    }
    /// <p>The name of the deletion mode for deleting the record. By default, the deletion mode is set to <code>SoftDelete</code>.</p>
    pub fn set_deletion_mode(mut self, input: ::std::option::Option<crate::types::DeletionMode>) -> Self {
        self.inner = self.inner.set_deletion_mode(input);
        self
    }
    /// <p>The name of the deletion mode for deleting the record. By default, the deletion mode is set to <code>SoftDelete</code>.</p>
    pub fn get_deletion_mode(&self) -> &::std::option::Option<crate::types::DeletionMode> {
        self.inner.get_deletion_mode()
    }
}