aws_sdk_connect/operation/create_rule/
builders.rspub use crate::operation::create_rule::_create_rule_output::CreateRuleOutputBuilder;
pub use crate::operation::create_rule::_create_rule_input::CreateRuleInputBuilder;
impl crate::operation::create_rule::builders::CreateRuleInputBuilder {
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::create_rule::CreateRuleOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_rule::CreateRuleError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.create_rule();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateRuleFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::create_rule::builders::CreateRuleInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::create_rule::CreateRuleOutput,
crate::operation::create_rule::CreateRuleError,
> for CreateRuleFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::create_rule::CreateRuleOutput,
crate::operation::create_rule::CreateRuleError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl CreateRuleFluentBuilder {
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,
}
}
pub fn as_input(&self) -> &crate::operation::create_rule::builders::CreateRuleInputBuilder {
&self.inner
}
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::create_rule::CreateRuleOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_rule::CreateRuleError,
::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::create_rule::CreateRule::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::create_rule::CreateRule::orchestrate(&runtime_plugins, input).await
}
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::create_rule::CreateRuleOutput,
crate::operation::create_rule::CreateRuleError,
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
}
pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.instance_id(input.into());
self
}
pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_instance_id()
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_name()
}
pub fn trigger_event_source(mut self, input: crate::types::RuleTriggerEventSource) -> Self {
self.inner = self.inner.trigger_event_source(input);
self
}
pub fn set_trigger_event_source(mut self, input: ::std::option::Option<crate::types::RuleTriggerEventSource>) -> Self {
self.inner = self.inner.set_trigger_event_source(input);
self
}
pub fn get_trigger_event_source(&self) -> &::std::option::Option<crate::types::RuleTriggerEventSource> {
self.inner.get_trigger_event_source()
}
pub fn function(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.function(input.into());
self
}
pub fn set_function(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_function(input);
self
}
pub fn get_function(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_function()
}
pub fn actions(mut self, input: crate::types::RuleAction) -> Self {
self.inner = self.inner.actions(input);
self
}
pub fn set_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RuleAction>>) -> Self {
self.inner = self.inner.set_actions(input);
self
}
pub fn get_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RuleAction>> {
self.inner.get_actions()
}
pub fn publish_status(mut self, input: crate::types::RulePublishStatus) -> Self {
self.inner = self.inner.publish_status(input);
self
}
pub fn set_publish_status(mut self, input: ::std::option::Option<crate::types::RulePublishStatus>) -> Self {
self.inner = self.inner.set_publish_status(input);
self
}
pub fn get_publish_status(&self) -> &::std::option::Option<crate::types::RulePublishStatus> {
self.inner.get_publish_status()
}
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_client_token()
}
}