pub struct Builder { /* private fields */ }Expand description
A builder for InsufficientDeliveryPolicyException.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_message(self, input: Option<String>) -> Self
pub fn set_message(self, input: Option<String>) -> Self
Error executing the command
Examples found in repository?
src/json_deser.rs (lines 4695-4701)
4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724
pub(crate) fn deser_structure_crate_error_insufficient_delivery_policy_exception_json_err(
value: &[u8],
mut builder: crate::error::insufficient_delivery_policy_exception::Builder,
) -> Result<
crate::error::insufficient_delivery_policy_exception::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"message" => {
builder = builder.set_message(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}sourcepub fn build(self) -> InsufficientDeliveryPolicyException
pub fn build(self) -> InsufficientDeliveryPolicyException
Consumes the builder and constructs a InsufficientDeliveryPolicyException.
Examples found in repository?
src/operation_deser.rs (line 5838)
5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946
pub fn parse_put_delivery_channel_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::PutDeliveryChannelOutput,
crate::error::PutDeliveryChannelError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::PutDeliveryChannelError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::PutDeliveryChannelError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InsufficientDeliveryPolicyException" => crate::error::PutDeliveryChannelError { meta: generic, kind: crate::error::PutDeliveryChannelErrorKind::InsufficientDeliveryPolicyException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::insufficient_delivery_policy_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_insufficient_delivery_policy_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutDeliveryChannelError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidDeliveryChannelNameException" => crate::error::PutDeliveryChannelError { meta: generic, kind: crate::error::PutDeliveryChannelErrorKind::InvalidDeliveryChannelNameException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_delivery_channel_name_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_delivery_channel_name_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutDeliveryChannelError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidS3KeyPrefixException" => crate::error::PutDeliveryChannelError { meta: generic, kind: crate::error::PutDeliveryChannelErrorKind::InvalidS3KeyPrefixException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_s3_key_prefix_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_s3_key_prefix_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutDeliveryChannelError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidS3KmsKeyArnException" => crate::error::PutDeliveryChannelError { meta: generic, kind: crate::error::PutDeliveryChannelErrorKind::InvalidS3KmsKeyArnException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_s3_kms_key_arn_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_s3_kms_key_arn_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutDeliveryChannelError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidSNSTopicARNException" => crate::error::PutDeliveryChannelError { meta: generic, kind: crate::error::PutDeliveryChannelErrorKind::InvalidSnsTopicArnException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_sns_topic_arn_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_sns_topic_arn_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutDeliveryChannelError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"MaxNumberOfDeliveryChannelsExceededException" => crate::error::PutDeliveryChannelError { meta: generic, kind: crate::error::PutDeliveryChannelErrorKind::MaxNumberOfDeliveryChannelsExceededException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::max_number_of_delivery_channels_exceeded_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_max_number_of_delivery_channels_exceeded_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutDeliveryChannelError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"NoAvailableConfigurationRecorderException" => crate::error::PutDeliveryChannelError { meta: generic, kind: crate::error::PutDeliveryChannelErrorKind::NoAvailableConfigurationRecorderException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::no_available_configuration_recorder_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_no_available_configuration_recorder_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutDeliveryChannelError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"NoSuchBucketException" => crate::error::PutDeliveryChannelError { meta: generic, kind: crate::error::PutDeliveryChannelErrorKind::NoSuchBucketException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::no_such_bucket_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_no_such_bucket_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutDeliveryChannelError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::PutDeliveryChannelError::generic(generic)
})
}