pub use crate::operation::create_order::_create_order_output::CreateOrderOutputBuilder;
pub use crate::operation::create_order::_create_order_input::CreateOrderInputBuilder;
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateOrderFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::create_order::builders::CreateOrderInputBuilder,
}
impl CreateOrderFluentBuilder {
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
}
}
#[doc(hidden)]
pub async fn customize_middleware(
self,
) -> ::std::result::Result<
crate::client::customize::CustomizableOperation<
crate::operation::create_order::CreateOrder,
::aws_http::retry::AwsResponseRetryClassifier,
>,
::aws_smithy_http::result::SdkError<crate::operation::create_order::CreateOrderError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(::aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(::aws_smithy_http::result::SdkError::construction_failure)?;
::std::result::Result::Ok(crate::client::customize::CustomizableOperation {
handle,
operation,
})
}
#[doc(hidden)]
pub async fn send_middleware(
self,
) -> ::std::result::Result<
crate::operation::create_order::CreateOrderOutput,
::aws_smithy_http::result::SdkError<crate::operation::create_order::CreateOrderError>,
> {
let op = self
.inner
.build()
.map_err(::aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(::aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::create_order::CreateOrderOutput,
::aws_smithy_http::result::SdkError<crate::operation::create_order::CreateOrderError>,
> {
self.send_middleware().await
}
pub async fn customize(
self,
) -> ::std::result::Result<
crate::client::customize::CustomizableOperation<
crate::operation::create_order::CreateOrder,
::aws_http::retry::AwsResponseRetryClassifier,
>,
::aws_smithy_http::result::SdkError<crate::operation::create_order::CreateOrderError>,
> {
self.customize_middleware().await
}
pub fn outpost_identifier(
mut self,
input: impl ::std::convert::Into<::std::string::String>,
) -> Self {
self.inner = self.inner.outpost_identifier(input.into());
self
}
pub fn set_outpost_identifier(
mut self,
input: ::std::option::Option<::std::string::String>,
) -> Self {
self.inner = self.inner.set_outpost_identifier(input);
self
}
pub fn line_items(mut self, input: crate::types::LineItemRequest) -> Self {
self.inner = self.inner.line_items(input);
self
}
pub fn set_line_items(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::LineItemRequest>>,
) -> Self {
self.inner = self.inner.set_line_items(input);
self
}
pub fn payment_option(mut self, input: crate::types::PaymentOption) -> Self {
self.inner = self.inner.payment_option(input);
self
}
pub fn set_payment_option(
mut self,
input: ::std::option::Option<crate::types::PaymentOption>,
) -> Self {
self.inner = self.inner.set_payment_option(input);
self
}
pub fn payment_term(mut self, input: crate::types::PaymentTerm) -> Self {
self.inner = self.inner.payment_term(input);
self
}
pub fn set_payment_term(
mut self,
input: ::std::option::Option<crate::types::PaymentTerm>,
) -> Self {
self.inner = self.inner.set_payment_term(input);
self
}
}