// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_feature_group::_update_feature_group_input::UpdateFeatureGroupInputBuilder;
pub use crate::operation::update_feature_group::_update_feature_group_output::UpdateFeatureGroupOutputBuilder;
impl crate::operation::update_feature_group::builders::UpdateFeatureGroupInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::update_feature_group::UpdateFeatureGroupOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_feature_group::UpdateFeatureGroupError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.update_feature_group();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `UpdateFeatureGroup`.
///
/// <p>Updates the feature group by either adding features or updating the online store configuration. Use one of the following request parameters at a time while using the <code>UpdateFeatureGroup</code> API.</p>
/// <p>You can add features for your feature group using the <code>FeatureAdditions</code> request parameter. Features cannot be removed from a feature group.</p>
/// <p>You can update the online store configuration by using the <code>OnlineStoreConfig</code> request parameter. If a <code>TtlDuration</code> is specified, the default <code>TtlDuration</code> applies for all records added to the feature group <i>after the feature group is updated</i>. If a record level <code>TtlDuration</code> exists from using the <code>PutRecord</code> API, the record level <code>TtlDuration</code> applies to that record instead of the default <code>TtlDuration</code>. To remove the default <code>TtlDuration</code> from an existing feature group, use the <code>UpdateFeatureGroup</code> API and set the <code>TtlDuration</code> <code>Unit</code> and <code>Value</code> to <code>null</code>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateFeatureGroupFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::update_feature_group::builders::UpdateFeatureGroupInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::update_feature_group::UpdateFeatureGroupOutput,
crate::operation::update_feature_group::UpdateFeatureGroupError,
> for UpdateFeatureGroupFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::update_feature_group::UpdateFeatureGroupOutput,
crate::operation::update_feature_group::UpdateFeatureGroupError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl UpdateFeatureGroupFluentBuilder {
/// Creates a new `UpdateFeatureGroupFluentBuilder`.
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 UpdateFeatureGroup as a reference.
pub fn as_input(&self) -> &crate::operation::update_feature_group::builders::UpdateFeatureGroupInputBuilder {
&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::update_feature_group::UpdateFeatureGroupOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_feature_group::UpdateFeatureGroupError,
::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::update_feature_group::UpdateFeatureGroup::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::update_feature_group::UpdateFeatureGroup::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::update_feature_group::UpdateFeatureGroupOutput,
crate::operation::update_feature_group::UpdateFeatureGroupError,
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 that you're updating.</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 that you're updating.</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 that you're updating.</p>
pub fn get_feature_group_name(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_feature_group_name()
}
///
/// Appends an item to `FeatureAdditions`.
///
/// To override the contents of this collection use [`set_feature_additions`](Self::set_feature_additions).
///
/// <p>Updates the feature group. Updating a feature group is an asynchronous operation. When you get an HTTP 200 response, you've made a valid request. It takes some time after you've made a valid request for Feature Store to update the feature group.</p>
pub fn feature_additions(mut self, input: crate::types::FeatureDefinition) -> Self {
self.inner = self.inner.feature_additions(input);
self
}
/// <p>Updates the feature group. Updating a feature group is an asynchronous operation. When you get an HTTP 200 response, you've made a valid request. It takes some time after you've made a valid request for Feature Store to update the feature group.</p>
pub fn set_feature_additions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FeatureDefinition>>) -> Self {
self.inner = self.inner.set_feature_additions(input);
self
}
/// <p>Updates the feature group. Updating a feature group is an asynchronous operation. When you get an HTTP 200 response, you've made a valid request. It takes some time after you've made a valid request for Feature Store to update the feature group.</p>
pub fn get_feature_additions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FeatureDefinition>> {
self.inner.get_feature_additions()
}
/// <p>Updates the feature group online store configuration.</p>
pub fn online_store_config(mut self, input: crate::types::OnlineStoreConfigUpdate) -> Self {
self.inner = self.inner.online_store_config(input);
self
}
/// <p>Updates the feature group online store configuration.</p>
pub fn set_online_store_config(mut self, input: ::std::option::Option<crate::types::OnlineStoreConfigUpdate>) -> Self {
self.inner = self.inner.set_online_store_config(input);
self
}
/// <p>Updates the feature group online store configuration.</p>
pub fn get_online_store_config(&self) -> &::std::option::Option<crate::types::OnlineStoreConfigUpdate> {
self.inner.get_online_store_config()
}
/// <p>The new throughput configuration for the feature group. You can switch between on-demand and provisioned modes or update the read / write capacity of provisioned feature groups. You can switch a feature group to on-demand only once in a 24 hour period.</p>
pub fn throughput_config(mut self, input: crate::types::ThroughputConfigUpdate) -> Self {
self.inner = self.inner.throughput_config(input);
self
}
/// <p>The new throughput configuration for the feature group. You can switch between on-demand and provisioned modes or update the read / write capacity of provisioned feature groups. You can switch a feature group to on-demand only once in a 24 hour period.</p>
pub fn set_throughput_config(mut self, input: ::std::option::Option<crate::types::ThroughputConfigUpdate>) -> Self {
self.inner = self.inner.set_throughput_config(input);
self
}
/// <p>The new throughput configuration for the feature group. You can switch between on-demand and provisioned modes or update the read / write capacity of provisioned feature groups. You can switch a feature group to on-demand only once in a 24 hour period.</p>
pub fn get_throughput_config(&self) -> &::std::option::Option<crate::types::ThroughputConfigUpdate> {
self.inner.get_throughput_config()
}
}