1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_feature_group::_update_feature_group_output::UpdateFeatureGroupOutputBuilder;
pub use crate::operation::update_feature_group::_update_feature_group_input::UpdateFeatureGroupInputBuilder;
impl 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>.</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 `UpdateFeatureGroup`.
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 Into<crate::config::Builder>) -> Self {
self.set_config_override(Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: 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()
}
}