pub use crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::_generate_random_bytes_output::GenerateRandomBytesOutputBuilder;
pub use crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::_generate_random_bytes_input::GenerateRandomBytesInputBuilder;
impl GenerateRandomBytesInputBuilder {
pub async fn send_with(
self,
client: &crate::deps::aws_cryptography_primitives::client::Client,
) -> ::std::result::Result<
::aws_smithy_types::Blob,
crate::deps::aws_cryptography_primitives::types::error::Error,
> {
let mut fluent_builder = client.generate_random_bytes();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct GenerateRandomBytesFluentBuilder {
client: crate::deps::aws_cryptography_primitives::client::Client,
pub(crate) inner: crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesInputBuilder,
}
impl GenerateRandomBytesFluentBuilder {
pub(crate) fn new(client: crate::deps::aws_cryptography_primitives::client::Client) -> Self {
Self {
client,
inner: ::std::default::Default::default(),
}
}
pub fn as_input(&self) -> &crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::builders::GenerateRandomBytesInputBuilder{
&self.inner
}
pub async fn send(
self,
) -> ::std::result::Result<
::aws_smithy_types::Blob,
crate::deps::aws_cryptography_primitives::types::error::Error,
> {
let input = self
.inner
.build()
.map_err(|mut e| {
let msg = format!("{:?}", e);
crate::deps::aws_cryptography_primitives::types::error::Error::OpaqueWithText {
obj: ::dafny_runtime::Object::from_ref(&mut e as &mut ::dafny_runtime::DynAny),
objMessage: msg,
}
})?;
crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytes::send(&self.client, input).await
}
#[allow(missing_docs)]
pub fn length(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self {
self.inner = self.inner.length(input.into());
self
}
#[allow(missing_docs)]
pub fn set_length(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self {
self.inner = self.inner.set_length(input);
self
}
#[allow(missing_docs)]
pub fn get_length(&self) -> &::std::option::Option<::std::primitive::i32> {
self.inner.get_length()
}
}