use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto::xml::error::*;
use rusoto_core::proto::xml::util::{
characters, deserialize_elements, end_element, find_start_element, peek_at_name, skip_tree,
start_element,
};
use rusoto_core::proto::xml::util::{Next, Peek, XmlParseError, XmlResponse};
use rusoto_core::signature::SignedRequest;
use serde_urlencoded;
use std::str::FromStr;
use xml::reader::ParserConfig;
use xml::EventReader;
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddHeaderAction {
pub header_name: String,
pub header_value: String,
}
struct AddHeaderActionDeserializer;
impl AddHeaderActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AddHeaderAction, XmlParseError> {
deserialize_elements::<_, AddHeaderAction, _>(tag_name, stack, |name, stack, obj| {
match name {
"HeaderName" => {
obj.header_name = HeaderNameDeserializer::deserialize("HeaderName", stack)?;
}
"HeaderValue" => {
obj.header_value = HeaderValueDeserializer::deserialize("HeaderValue", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AddHeaderActionSerializer;
impl AddHeaderActionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddHeaderAction) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "HeaderName"), &obj.header_name);
params.put(&format!("{}{}", prefix, "HeaderValue"), &obj.header_value);
}
}
struct AddressDeserializer;
impl AddressDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AddressListDeserializer;
impl AddressListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(AddressDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AddressListSerializer;
impl AddressListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct AmazonResourceNameDeserializer;
impl AmazonResourceNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct BehaviorOnMXFailureDeserializer;
impl BehaviorOnMXFailureDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Body {
pub html: Option<Content>,
pub text: Option<Content>,
}
struct BodySerializer;
impl BodySerializer {
fn serialize(params: &mut Params, name: &str, obj: &Body) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.html {
ContentSerializer::serialize(params, &format!("{}{}", prefix, "Html"), field_value);
}
if let Some(ref field_value) = obj.text {
ContentSerializer::serialize(params, &format!("{}{}", prefix, "Text"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BounceAction {
pub message: String,
pub sender: String,
pub smtp_reply_code: String,
pub status_code: Option<String>,
pub topic_arn: Option<String>,
}
struct BounceActionDeserializer;
impl BounceActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<BounceAction, XmlParseError> {
deserialize_elements::<_, BounceAction, _>(tag_name, stack, |name, stack, obj| {
match name {
"Message" => {
obj.message = BounceMessageDeserializer::deserialize("Message", stack)?;
}
"Sender" => {
obj.sender = AddressDeserializer::deserialize("Sender", stack)?;
}
"SmtpReplyCode" => {
obj.smtp_reply_code =
BounceSmtpReplyCodeDeserializer::deserialize("SmtpReplyCode", stack)?;
}
"StatusCode" => {
obj.status_code = Some(BounceStatusCodeDeserializer::deserialize(
"StatusCode",
stack,
)?);
}
"TopicArn" => {
obj.topic_arn = Some(AmazonResourceNameDeserializer::deserialize(
"TopicArn", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct BounceActionSerializer;
impl BounceActionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &BounceAction) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Message"), &obj.message);
params.put(&format!("{}{}", prefix, "Sender"), &obj.sender);
params.put(
&format!("{}{}", prefix, "SmtpReplyCode"),
&obj.smtp_reply_code,
);
if let Some(ref field_value) = obj.status_code {
params.put(&format!("{}{}", prefix, "StatusCode"), &field_value);
}
if let Some(ref field_value) = obj.topic_arn {
params.put(&format!("{}{}", prefix, "TopicArn"), &field_value);
}
}
}
struct BounceMessageDeserializer;
impl BounceMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct BounceSmtpReplyCodeDeserializer;
impl BounceSmtpReplyCodeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct BounceStatusCodeDeserializer;
impl BounceStatusCodeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BouncedRecipientInfo {
pub bounce_type: Option<String>,
pub recipient: String,
pub recipient_arn: Option<String>,
pub recipient_dsn_fields: Option<RecipientDsnFields>,
}
struct BouncedRecipientInfoSerializer;
impl BouncedRecipientInfoSerializer {
fn serialize(params: &mut Params, name: &str, obj: &BouncedRecipientInfo) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.bounce_type {
params.put(&format!("{}{}", prefix, "BounceType"), &field_value);
}
params.put(&format!("{}{}", prefix, "Recipient"), &obj.recipient);
if let Some(ref field_value) = obj.recipient_arn {
params.put(&format!("{}{}", prefix, "RecipientArn"), &field_value);
}
if let Some(ref field_value) = obj.recipient_dsn_fields {
RecipientDsnFieldsSerializer::serialize(
params,
&format!("{}{}", prefix, "RecipientDsnFields"),
field_value,
);
}
}
}
struct BouncedRecipientInfoListSerializer;
impl BouncedRecipientInfoListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<BouncedRecipientInfo>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
BouncedRecipientInfoSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BulkEmailDestination {
pub destination: Destination,
pub replacement_tags: Option<Vec<MessageTag>>,
pub replacement_template_data: Option<String>,
}
struct BulkEmailDestinationSerializer;
impl BulkEmailDestinationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &BulkEmailDestination) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
DestinationSerializer::serialize(
params,
&format!("{}{}", prefix, "Destination"),
&obj.destination,
);
if let Some(ref field_value) = obj.replacement_tags {
MessageTagListSerializer::serialize(
params,
&format!("{}{}", prefix, "ReplacementTags"),
field_value,
);
}
if let Some(ref field_value) = obj.replacement_template_data {
params.put(
&format!("{}{}", prefix, "ReplacementTemplateData"),
&field_value,
);
}
}
}
struct BulkEmailDestinationListSerializer;
impl BulkEmailDestinationListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<BulkEmailDestination>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
BulkEmailDestinationSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BulkEmailDestinationStatus {
pub error: Option<String>,
pub message_id: Option<String>,
pub status: Option<String>,
}
struct BulkEmailDestinationStatusDeserializer;
impl BulkEmailDestinationStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<BulkEmailDestinationStatus, XmlParseError> {
deserialize_elements::<_, BulkEmailDestinationStatus, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Error" => {
obj.error = Some(SesErrorDeserializer::deserialize("Error", stack)?);
}
"MessageId" => {
obj.message_id =
Some(MessageIdDeserializer::deserialize("MessageId", stack)?);
}
"Status" => {
obj.status =
Some(BulkEmailStatusDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct BulkEmailDestinationStatusListDeserializer;
impl BulkEmailDestinationStatusListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<BulkEmailDestinationStatus>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(BulkEmailDestinationStatusDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct BulkEmailStatusDeserializer;
impl BulkEmailStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CidrDeserializer;
impl CidrDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CloneReceiptRuleSetRequest {
pub original_rule_set_name: String,
pub rule_set_name: String,
}
struct CloneReceiptRuleSetRequestSerializer;
impl CloneReceiptRuleSetRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CloneReceiptRuleSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "OriginalRuleSetName"),
&obj.original_rule_set_name,
);
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CloneReceiptRuleSetResponse {}
struct CloneReceiptRuleSetResponseDeserializer;
impl CloneReceiptRuleSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CloneReceiptRuleSetResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CloneReceiptRuleSetResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CloudWatchDestination {
pub dimension_configurations: Vec<CloudWatchDimensionConfiguration>,
}
struct CloudWatchDestinationDeserializer;
impl CloudWatchDestinationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CloudWatchDestination, XmlParseError> {
deserialize_elements::<_, CloudWatchDestination, _>(tag_name, stack, |name, stack, obj| {
match name {
"DimensionConfigurations" => {
obj.dimension_configurations.extend(
CloudWatchDimensionConfigurationsDeserializer::deserialize(
"DimensionConfigurations",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct CloudWatchDestinationSerializer;
impl CloudWatchDestinationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CloudWatchDestination) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
CloudWatchDimensionConfigurationsSerializer::serialize(
params,
&format!("{}{}", prefix, "DimensionConfigurations"),
&obj.dimension_configurations,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CloudWatchDimensionConfiguration {
pub default_dimension_value: String,
pub dimension_name: String,
pub dimension_value_source: String,
}
struct CloudWatchDimensionConfigurationDeserializer;
impl CloudWatchDimensionConfigurationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CloudWatchDimensionConfiguration, XmlParseError> {
deserialize_elements::<_, CloudWatchDimensionConfiguration, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DefaultDimensionValue" => {
obj.default_dimension_value =
DefaultDimensionValueDeserializer::deserialize(
"DefaultDimensionValue",
stack,
)?;
}
"DimensionName" => {
obj.dimension_name =
DimensionNameDeserializer::deserialize("DimensionName", stack)?;
}
"DimensionValueSource" => {
obj.dimension_value_source = DimensionValueSourceDeserializer::deserialize(
"DimensionValueSource",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct CloudWatchDimensionConfigurationSerializer;
impl CloudWatchDimensionConfigurationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CloudWatchDimensionConfiguration) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DefaultDimensionValue"),
&obj.default_dimension_value,
);
params.put(
&format!("{}{}", prefix, "DimensionName"),
&obj.dimension_name,
);
params.put(
&format!("{}{}", prefix, "DimensionValueSource"),
&obj.dimension_value_source,
);
}
}
struct CloudWatchDimensionConfigurationsDeserializer;
impl CloudWatchDimensionConfigurationsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<CloudWatchDimensionConfiguration>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(CloudWatchDimensionConfigurationDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct CloudWatchDimensionConfigurationsSerializer;
impl CloudWatchDimensionConfigurationsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<CloudWatchDimensionConfiguration>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
CloudWatchDimensionConfigurationSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConfigurationSet {
pub name: String,
}
struct ConfigurationSetDeserializer;
impl ConfigurationSetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationSet, XmlParseError> {
deserialize_elements::<_, ConfigurationSet, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = ConfigurationSetNameDeserializer::deserialize("Name", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ConfigurationSetSerializer;
impl ConfigurationSetSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ConfigurationSet) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Name"), &obj.name);
}
}
struct ConfigurationSetAttributeListSerializer;
impl ConfigurationSetAttributeListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct ConfigurationSetNameDeserializer;
impl ConfigurationSetNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ConfigurationSetsDeserializer;
impl ConfigurationSetsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ConfigurationSet>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ConfigurationSetDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Content {
pub charset: Option<String>,
pub data: String,
}
struct ContentSerializer;
impl ContentSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Content) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.charset {
params.put(&format!("{}{}", prefix, "Charset"), &field_value);
}
params.put(&format!("{}{}", prefix, "Data"), &obj.data);
}
}
struct CounterDeserializer;
impl CounterDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateConfigurationSetEventDestinationRequest {
pub configuration_set_name: String,
pub event_destination: EventDestination,
}
struct CreateConfigurationSetEventDestinationRequestSerializer;
impl CreateConfigurationSetEventDestinationRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &CreateConfigurationSetEventDestinationRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
EventDestinationSerializer::serialize(
params,
&format!("{}{}", prefix, "EventDestination"),
&obj.event_destination,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateConfigurationSetEventDestinationResponse {}
struct CreateConfigurationSetEventDestinationResponseDeserializer;
impl CreateConfigurationSetEventDestinationResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateConfigurationSetEventDestinationResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateConfigurationSetEventDestinationResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateConfigurationSetRequest {
pub configuration_set: ConfigurationSet,
}
struct CreateConfigurationSetRequestSerializer;
impl CreateConfigurationSetRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateConfigurationSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ConfigurationSetSerializer::serialize(
params,
&format!("{}{}", prefix, "ConfigurationSet"),
&obj.configuration_set,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateConfigurationSetResponse {}
struct CreateConfigurationSetResponseDeserializer;
impl CreateConfigurationSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateConfigurationSetResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateConfigurationSetResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateConfigurationSetTrackingOptionsRequest {
pub configuration_set_name: String,
pub tracking_options: TrackingOptions,
}
struct CreateConfigurationSetTrackingOptionsRequestSerializer;
impl CreateConfigurationSetTrackingOptionsRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &CreateConfigurationSetTrackingOptionsRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
TrackingOptionsSerializer::serialize(
params,
&format!("{}{}", prefix, "TrackingOptions"),
&obj.tracking_options,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateConfigurationSetTrackingOptionsResponse {}
struct CreateConfigurationSetTrackingOptionsResponseDeserializer;
impl CreateConfigurationSetTrackingOptionsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateConfigurationSetTrackingOptionsResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateConfigurationSetTrackingOptionsResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateCustomVerificationEmailTemplateRequest {
pub failure_redirection_url: String,
pub from_email_address: String,
pub success_redirection_url: String,
pub template_content: String,
pub template_name: String,
pub template_subject: String,
}
struct CreateCustomVerificationEmailTemplateRequestSerializer;
impl CreateCustomVerificationEmailTemplateRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &CreateCustomVerificationEmailTemplateRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "FailureRedirectionURL"),
&obj.failure_redirection_url,
);
params.put(
&format!("{}{}", prefix, "FromEmailAddress"),
&obj.from_email_address,
);
params.put(
&format!("{}{}", prefix, "SuccessRedirectionURL"),
&obj.success_redirection_url,
);
params.put(
&format!("{}{}", prefix, "TemplateContent"),
&obj.template_content,
);
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
params.put(
&format!("{}{}", prefix, "TemplateSubject"),
&obj.template_subject,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateReceiptFilterRequest {
pub filter: ReceiptFilter,
}
struct CreateReceiptFilterRequestSerializer;
impl CreateReceiptFilterRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateReceiptFilterRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ReceiptFilterSerializer::serialize(params, &format!("{}{}", prefix, "Filter"), &obj.filter);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateReceiptFilterResponse {}
struct CreateReceiptFilterResponseDeserializer;
impl CreateReceiptFilterResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateReceiptFilterResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateReceiptFilterResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateReceiptRuleRequest {
pub after: Option<String>,
pub rule: ReceiptRule,
pub rule_set_name: String,
}
struct CreateReceiptRuleRequestSerializer;
impl CreateReceiptRuleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateReceiptRuleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.after {
params.put(&format!("{}{}", prefix, "After"), &field_value);
}
ReceiptRuleSerializer::serialize(params, &format!("{}{}", prefix, "Rule"), &obj.rule);
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateReceiptRuleResponse {}
struct CreateReceiptRuleResponseDeserializer;
impl CreateReceiptRuleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateReceiptRuleResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateReceiptRuleResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateReceiptRuleSetRequest {
pub rule_set_name: String,
}
struct CreateReceiptRuleSetRequestSerializer;
impl CreateReceiptRuleSetRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateReceiptRuleSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateReceiptRuleSetResponse {}
struct CreateReceiptRuleSetResponseDeserializer;
impl CreateReceiptRuleSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateReceiptRuleSetResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateReceiptRuleSetResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTemplateRequest {
pub template: Template,
}
struct CreateTemplateRequestSerializer;
impl CreateTemplateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateTemplateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
TemplateSerializer::serialize(params, &format!("{}{}", prefix, "Template"), &obj.template);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTemplateResponse {}
struct CreateTemplateResponseDeserializer;
impl CreateTemplateResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateTemplateResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateTemplateResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CustomMailFromStatusDeserializer;
impl CustomMailFromStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CustomRedirectDomainDeserializer;
impl CustomRedirectDomainDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CustomVerificationEmailTemplate {
pub failure_redirection_url: Option<String>,
pub from_email_address: Option<String>,
pub success_redirection_url: Option<String>,
pub template_name: Option<String>,
pub template_subject: Option<String>,
}
struct CustomVerificationEmailTemplateDeserializer;
impl CustomVerificationEmailTemplateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CustomVerificationEmailTemplate, XmlParseError> {
deserialize_elements::<_, CustomVerificationEmailTemplate, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"FailureRedirectionURL" => {
obj.failure_redirection_url =
Some(FailureRedirectionURLDeserializer::deserialize(
"FailureRedirectionURL",
stack,
)?);
}
"FromEmailAddress" => {
obj.from_email_address = Some(FromAddressDeserializer::deserialize(
"FromEmailAddress",
stack,
)?);
}
"SuccessRedirectionURL" => {
obj.success_redirection_url =
Some(SuccessRedirectionURLDeserializer::deserialize(
"SuccessRedirectionURL",
stack,
)?);
}
"TemplateName" => {
obj.template_name = Some(TemplateNameDeserializer::deserialize(
"TemplateName",
stack,
)?);
}
"TemplateSubject" => {
obj.template_subject =
Some(SubjectDeserializer::deserialize("TemplateSubject", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct CustomVerificationEmailTemplatesDeserializer;
impl CustomVerificationEmailTemplatesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<CustomVerificationEmailTemplate>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(CustomVerificationEmailTemplateDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct DefaultDimensionValueDeserializer;
impl DefaultDimensionValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteConfigurationSetEventDestinationRequest {
pub configuration_set_name: String,
pub event_destination_name: String,
}
struct DeleteConfigurationSetEventDestinationRequestSerializer;
impl DeleteConfigurationSetEventDestinationRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DeleteConfigurationSetEventDestinationRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
params.put(
&format!("{}{}", prefix, "EventDestinationName"),
&obj.event_destination_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteConfigurationSetEventDestinationResponse {}
struct DeleteConfigurationSetEventDestinationResponseDeserializer;
impl DeleteConfigurationSetEventDestinationResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteConfigurationSetEventDestinationResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteConfigurationSetEventDestinationResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteConfigurationSetRequest {
pub configuration_set_name: String,
}
struct DeleteConfigurationSetRequestSerializer;
impl DeleteConfigurationSetRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteConfigurationSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteConfigurationSetResponse {}
struct DeleteConfigurationSetResponseDeserializer;
impl DeleteConfigurationSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteConfigurationSetResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteConfigurationSetResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteConfigurationSetTrackingOptionsRequest {
pub configuration_set_name: String,
}
struct DeleteConfigurationSetTrackingOptionsRequestSerializer;
impl DeleteConfigurationSetTrackingOptionsRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DeleteConfigurationSetTrackingOptionsRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteConfigurationSetTrackingOptionsResponse {}
struct DeleteConfigurationSetTrackingOptionsResponseDeserializer;
impl DeleteConfigurationSetTrackingOptionsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteConfigurationSetTrackingOptionsResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteConfigurationSetTrackingOptionsResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteCustomVerificationEmailTemplateRequest {
pub template_name: String,
}
struct DeleteCustomVerificationEmailTemplateRequestSerializer;
impl DeleteCustomVerificationEmailTemplateRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DeleteCustomVerificationEmailTemplateRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteIdentityPolicyRequest {
pub identity: String,
pub policy_name: String,
}
struct DeleteIdentityPolicyRequestSerializer;
impl DeleteIdentityPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteIdentityPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteIdentityPolicyResponse {}
struct DeleteIdentityPolicyResponseDeserializer;
impl DeleteIdentityPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteIdentityPolicyResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteIdentityPolicyResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteIdentityRequest {
pub identity: String,
}
struct DeleteIdentityRequestSerializer;
impl DeleteIdentityRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteIdentityRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteIdentityResponse {}
struct DeleteIdentityResponseDeserializer;
impl DeleteIdentityResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteIdentityResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteIdentityResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteReceiptFilterRequest {
pub filter_name: String,
}
struct DeleteReceiptFilterRequestSerializer;
impl DeleteReceiptFilterRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteReceiptFilterRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "FilterName"), &obj.filter_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteReceiptFilterResponse {}
struct DeleteReceiptFilterResponseDeserializer;
impl DeleteReceiptFilterResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteReceiptFilterResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteReceiptFilterResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteReceiptRuleRequest {
pub rule_name: String,
pub rule_set_name: String,
}
struct DeleteReceiptRuleRequestSerializer;
impl DeleteReceiptRuleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteReceiptRuleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RuleName"), &obj.rule_name);
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteReceiptRuleResponse {}
struct DeleteReceiptRuleResponseDeserializer;
impl DeleteReceiptRuleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteReceiptRuleResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteReceiptRuleResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteReceiptRuleSetRequest {
pub rule_set_name: String,
}
struct DeleteReceiptRuleSetRequestSerializer;
impl DeleteReceiptRuleSetRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteReceiptRuleSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteReceiptRuleSetResponse {}
struct DeleteReceiptRuleSetResponseDeserializer;
impl DeleteReceiptRuleSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteReceiptRuleSetResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteReceiptRuleSetResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteTemplateRequest {
pub template_name: String,
}
struct DeleteTemplateRequestSerializer;
impl DeleteTemplateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteTemplateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteTemplateResponse {}
struct DeleteTemplateResponseDeserializer;
impl DeleteTemplateResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteTemplateResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteTemplateResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteVerifiedEmailAddressRequest {
pub email_address: String,
}
struct DeleteVerifiedEmailAddressRequestSerializer;
impl DeleteVerifiedEmailAddressRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteVerifiedEmailAddressRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "EmailAddress"), &obj.email_address);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeliveryOptions {
pub tls_policy: Option<String>,
}
struct DeliveryOptionsDeserializer;
impl DeliveryOptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeliveryOptions, XmlParseError> {
deserialize_elements::<_, DeliveryOptions, _>(tag_name, stack, |name, stack, obj| {
match name {
"TlsPolicy" => {
obj.tls_policy = Some(TlsPolicyDeserializer::deserialize("TlsPolicy", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DeliveryOptionsSerializer;
impl DeliveryOptionsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeliveryOptions) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.tls_policy {
params.put(&format!("{}{}", prefix, "TlsPolicy"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeActiveReceiptRuleSetRequest {}
struct DescribeActiveReceiptRuleSetRequestSerializer;
impl DescribeActiveReceiptRuleSetRequestSerializer {
fn serialize(_params: &mut Params, name: &str, _obj: &DescribeActiveReceiptRuleSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeActiveReceiptRuleSetResponse {
pub metadata: Option<ReceiptRuleSetMetadata>,
pub rules: Option<Vec<ReceiptRule>>,
}
struct DescribeActiveReceiptRuleSetResponseDeserializer;
impl DescribeActiveReceiptRuleSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeActiveReceiptRuleSetResponse, XmlParseError> {
deserialize_elements::<_, DescribeActiveReceiptRuleSetResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Metadata" => {
obj.metadata = Some(ReceiptRuleSetMetadataDeserializer::deserialize(
"Metadata", stack,
)?);
}
"Rules" => {
obj.rules
.get_or_insert(vec![])
.extend(ReceiptRulesListDeserializer::deserialize("Rules", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeConfigurationSetRequest {
pub configuration_set_attribute_names: Option<Vec<String>>,
pub configuration_set_name: String,
}
struct DescribeConfigurationSetRequestSerializer;
impl DescribeConfigurationSetRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeConfigurationSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.configuration_set_attribute_names {
ConfigurationSetAttributeListSerializer::serialize(
params,
&format!("{}{}", prefix, "ConfigurationSetAttributeNames"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeConfigurationSetResponse {
pub configuration_set: Option<ConfigurationSet>,
pub delivery_options: Option<DeliveryOptions>,
pub event_destinations: Option<Vec<EventDestination>>,
pub reputation_options: Option<ReputationOptions>,
pub tracking_options: Option<TrackingOptions>,
}
struct DescribeConfigurationSetResponseDeserializer;
impl DescribeConfigurationSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeConfigurationSetResponse, XmlParseError> {
deserialize_elements::<_, DescribeConfigurationSetResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ConfigurationSet" => {
obj.configuration_set = Some(ConfigurationSetDeserializer::deserialize(
"ConfigurationSet",
stack,
)?);
}
"DeliveryOptions" => {
obj.delivery_options = Some(DeliveryOptionsDeserializer::deserialize(
"DeliveryOptions",
stack,
)?);
}
"EventDestinations" => {
obj.event_destinations.get_or_insert(vec![]).extend(
EventDestinationsDeserializer::deserialize("EventDestinations", stack)?,
);
}
"ReputationOptions" => {
obj.reputation_options = Some(ReputationOptionsDeserializer::deserialize(
"ReputationOptions",
stack,
)?);
}
"TrackingOptions" => {
obj.tracking_options = Some(TrackingOptionsDeserializer::deserialize(
"TrackingOptions",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeReceiptRuleRequest {
pub rule_name: String,
pub rule_set_name: String,
}
struct DescribeReceiptRuleRequestSerializer;
impl DescribeReceiptRuleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeReceiptRuleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RuleName"), &obj.rule_name);
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeReceiptRuleResponse {
pub rule: Option<ReceiptRule>,
}
struct DescribeReceiptRuleResponseDeserializer;
impl DescribeReceiptRuleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeReceiptRuleResponse, XmlParseError> {
deserialize_elements::<_, DescribeReceiptRuleResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Rule" => {
obj.rule = Some(ReceiptRuleDeserializer::deserialize("Rule", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeReceiptRuleSetRequest {
pub rule_set_name: String,
}
struct DescribeReceiptRuleSetRequestSerializer;
impl DescribeReceiptRuleSetRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeReceiptRuleSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeReceiptRuleSetResponse {
pub metadata: Option<ReceiptRuleSetMetadata>,
pub rules: Option<Vec<ReceiptRule>>,
}
struct DescribeReceiptRuleSetResponseDeserializer;
impl DescribeReceiptRuleSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeReceiptRuleSetResponse, XmlParseError> {
deserialize_elements::<_, DescribeReceiptRuleSetResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Metadata" => {
obj.metadata = Some(ReceiptRuleSetMetadataDeserializer::deserialize(
"Metadata", stack,
)?);
}
"Rules" => {
obj.rules
.get_or_insert(vec![])
.extend(ReceiptRulesListDeserializer::deserialize("Rules", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Destination {
pub bcc_addresses: Option<Vec<String>>,
pub cc_addresses: Option<Vec<String>>,
pub to_addresses: Option<Vec<String>>,
}
struct DestinationSerializer;
impl DestinationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Destination) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.bcc_addresses {
AddressListSerializer::serialize(
params,
&format!("{}{}", prefix, "BccAddresses"),
field_value,
);
}
if let Some(ref field_value) = obj.cc_addresses {
AddressListSerializer::serialize(
params,
&format!("{}{}", prefix, "CcAddresses"),
field_value,
);
}
if let Some(ref field_value) = obj.to_addresses {
AddressListSerializer::serialize(
params,
&format!("{}{}", prefix, "ToAddresses"),
field_value,
);
}
}
}
struct DimensionNameDeserializer;
impl DimensionNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DimensionValueSourceDeserializer;
impl DimensionValueSourceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DkimAttributesDeserializer;
impl DkimAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<::std::collections::HashMap<String, IdentityDkimAttributes>, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ::std::collections::HashMap::new();
while peek_at_name(stack)? == "entry" {
start_element("entry", stack)?;
let key = IdentityDeserializer::deserialize("key", stack)?;
let value = IdentityDkimAttributesDeserializer::deserialize("value", stack)?;
obj.insert(key, value);
end_element("entry", stack)?;
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EnabledDeserializer;
impl EnabledDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SesErrorDeserializer;
impl SesErrorDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventDestination {
pub cloud_watch_destination: Option<CloudWatchDestination>,
pub enabled: Option<bool>,
pub kinesis_firehose_destination: Option<KinesisFirehoseDestination>,
pub matching_event_types: Vec<String>,
pub name: String,
pub sns_destination: Option<SNSDestination>,
}
struct EventDestinationDeserializer;
impl EventDestinationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventDestination, XmlParseError> {
deserialize_elements::<_, EventDestination, _>(tag_name, stack, |name, stack, obj| {
match name {
"CloudWatchDestination" => {
obj.cloud_watch_destination =
Some(CloudWatchDestinationDeserializer::deserialize(
"CloudWatchDestination",
stack,
)?);
}
"Enabled" => {
obj.enabled = Some(EnabledDeserializer::deserialize("Enabled", stack)?);
}
"KinesisFirehoseDestination" => {
obj.kinesis_firehose_destination =
Some(KinesisFirehoseDestinationDeserializer::deserialize(
"KinesisFirehoseDestination",
stack,
)?);
}
"MatchingEventTypes" => {
obj.matching_event_types
.extend(EventTypesDeserializer::deserialize(
"MatchingEventTypes",
stack,
)?);
}
"Name" => {
obj.name = EventDestinationNameDeserializer::deserialize("Name", stack)?;
}
"SNSDestination" => {
obj.sns_destination = Some(SNSDestinationDeserializer::deserialize(
"SNSDestination",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EventDestinationSerializer;
impl EventDestinationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &EventDestination) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cloud_watch_destination {
CloudWatchDestinationSerializer::serialize(
params,
&format!("{}{}", prefix, "CloudWatchDestination"),
field_value,
);
}
if let Some(ref field_value) = obj.enabled {
params.put(&format!("{}{}", prefix, "Enabled"), &field_value);
}
if let Some(ref field_value) = obj.kinesis_firehose_destination {
KinesisFirehoseDestinationSerializer::serialize(
params,
&format!("{}{}", prefix, "KinesisFirehoseDestination"),
field_value,
);
}
EventTypesSerializer::serialize(
params,
&format!("{}{}", prefix, "MatchingEventTypes"),
&obj.matching_event_types,
);
params.put(&format!("{}{}", prefix, "Name"), &obj.name);
if let Some(ref field_value) = obj.sns_destination {
SNSDestinationSerializer::serialize(
params,
&format!("{}{}", prefix, "SNSDestination"),
field_value,
);
}
}
}
struct EventDestinationNameDeserializer;
impl EventDestinationNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EventDestinationsDeserializer;
impl EventDestinationsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EventDestination>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(EventDestinationDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct EventTypeDeserializer;
impl EventTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EventTypesDeserializer;
impl EventTypesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(EventTypeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct EventTypesSerializer;
impl EventTypesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ExtensionField {
pub name: String,
pub value: String,
}
struct ExtensionFieldSerializer;
impl ExtensionFieldSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ExtensionField) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Name"), &obj.name);
params.put(&format!("{}{}", prefix, "Value"), &obj.value);
}
}
struct ExtensionFieldListSerializer;
impl ExtensionFieldListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<ExtensionField>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
ExtensionFieldSerializer::serialize(params, &key, obj);
}
}
}
struct FailureRedirectionURLDeserializer;
impl FailureRedirectionURLDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct FromAddressDeserializer;
impl FromAddressDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetAccountSendingEnabledResponse {
pub enabled: Option<bool>,
}
struct GetAccountSendingEnabledResponseDeserializer;
impl GetAccountSendingEnabledResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetAccountSendingEnabledResponse, XmlParseError> {
deserialize_elements::<_, GetAccountSendingEnabledResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Enabled" => {
obj.enabled = Some(EnabledDeserializer::deserialize("Enabled", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetCustomVerificationEmailTemplateRequest {
pub template_name: String,
}
struct GetCustomVerificationEmailTemplateRequestSerializer;
impl GetCustomVerificationEmailTemplateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetCustomVerificationEmailTemplateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetCustomVerificationEmailTemplateResponse {
pub failure_redirection_url: Option<String>,
pub from_email_address: Option<String>,
pub success_redirection_url: Option<String>,
pub template_content: Option<String>,
pub template_name: Option<String>,
pub template_subject: Option<String>,
}
struct GetCustomVerificationEmailTemplateResponseDeserializer;
impl GetCustomVerificationEmailTemplateResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetCustomVerificationEmailTemplateResponse, XmlParseError> {
deserialize_elements::<_, GetCustomVerificationEmailTemplateResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"FailureRedirectionURL" => {
obj.failure_redirection_url =
Some(FailureRedirectionURLDeserializer::deserialize(
"FailureRedirectionURL",
stack,
)?);
}
"FromEmailAddress" => {
obj.from_email_address = Some(FromAddressDeserializer::deserialize(
"FromEmailAddress",
stack,
)?);
}
"SuccessRedirectionURL" => {
obj.success_redirection_url =
Some(SuccessRedirectionURLDeserializer::deserialize(
"SuccessRedirectionURL",
stack,
)?);
}
"TemplateContent" => {
obj.template_content = Some(TemplateContentDeserializer::deserialize(
"TemplateContent",
stack,
)?);
}
"TemplateName" => {
obj.template_name = Some(TemplateNameDeserializer::deserialize(
"TemplateName",
stack,
)?);
}
"TemplateSubject" => {
obj.template_subject =
Some(SubjectDeserializer::deserialize("TemplateSubject", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityDkimAttributesRequest {
pub identities: Vec<String>,
}
struct GetIdentityDkimAttributesRequestSerializer;
impl GetIdentityDkimAttributesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetIdentityDkimAttributesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
IdentityListSerializer::serialize(
params,
&format!("{}{}", prefix, "Identities"),
&obj.identities,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityDkimAttributesResponse {
pub dkim_attributes: ::std::collections::HashMap<String, IdentityDkimAttributes>,
}
struct GetIdentityDkimAttributesResponseDeserializer;
impl GetIdentityDkimAttributesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetIdentityDkimAttributesResponse, XmlParseError> {
deserialize_elements::<_, GetIdentityDkimAttributesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DkimAttributes" => {
obj.dkim_attributes =
DkimAttributesDeserializer::deserialize("DkimAttributes", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityMailFromDomainAttributesRequest {
pub identities: Vec<String>,
}
struct GetIdentityMailFromDomainAttributesRequestSerializer;
impl GetIdentityMailFromDomainAttributesRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &GetIdentityMailFromDomainAttributesRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
IdentityListSerializer::serialize(
params,
&format!("{}{}", prefix, "Identities"),
&obj.identities,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityMailFromDomainAttributesResponse {
pub mail_from_domain_attributes:
::std::collections::HashMap<String, IdentityMailFromDomainAttributes>,
}
struct GetIdentityMailFromDomainAttributesResponseDeserializer;
impl GetIdentityMailFromDomainAttributesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetIdentityMailFromDomainAttributesResponse, XmlParseError> {
deserialize_elements::<_, GetIdentityMailFromDomainAttributesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"MailFromDomainAttributes" => {
obj.mail_from_domain_attributes =
MailFromDomainAttributesDeserializer::deserialize(
"MailFromDomainAttributes",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityNotificationAttributesRequest {
pub identities: Vec<String>,
}
struct GetIdentityNotificationAttributesRequestSerializer;
impl GetIdentityNotificationAttributesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetIdentityNotificationAttributesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
IdentityListSerializer::serialize(
params,
&format!("{}{}", prefix, "Identities"),
&obj.identities,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityNotificationAttributesResponse {
pub notification_attributes:
::std::collections::HashMap<String, IdentityNotificationAttributes>,
}
struct GetIdentityNotificationAttributesResponseDeserializer;
impl GetIdentityNotificationAttributesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetIdentityNotificationAttributesResponse, XmlParseError> {
deserialize_elements::<_, GetIdentityNotificationAttributesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NotificationAttributes" => {
obj.notification_attributes =
NotificationAttributesDeserializer::deserialize(
"NotificationAttributes",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityPoliciesRequest {
pub identity: String,
pub policy_names: Vec<String>,
}
struct GetIdentityPoliciesRequestSerializer;
impl GetIdentityPoliciesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetIdentityPoliciesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
PolicyNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyNames"),
&obj.policy_names,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityPoliciesResponse {
pub policies: ::std::collections::HashMap<String, String>,
}
struct GetIdentityPoliciesResponseDeserializer;
impl GetIdentityPoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetIdentityPoliciesResponse, XmlParseError> {
deserialize_elements::<_, GetIdentityPoliciesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Policies" => {
obj.policies = PolicyMapDeserializer::deserialize("Policies", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityVerificationAttributesRequest {
pub identities: Vec<String>,
}
struct GetIdentityVerificationAttributesRequestSerializer;
impl GetIdentityVerificationAttributesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetIdentityVerificationAttributesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
IdentityListSerializer::serialize(
params,
&format!("{}{}", prefix, "Identities"),
&obj.identities,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetIdentityVerificationAttributesResponse {
pub verification_attributes:
::std::collections::HashMap<String, IdentityVerificationAttributes>,
}
struct GetIdentityVerificationAttributesResponseDeserializer;
impl GetIdentityVerificationAttributesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetIdentityVerificationAttributesResponse, XmlParseError> {
deserialize_elements::<_, GetIdentityVerificationAttributesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"VerificationAttributes" => {
obj.verification_attributes =
VerificationAttributesDeserializer::deserialize(
"VerificationAttributes",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetSendQuotaResponse {
pub max_24_hour_send: Option<f64>,
pub max_send_rate: Option<f64>,
pub sent_last_24_hours: Option<f64>,
}
struct GetSendQuotaResponseDeserializer;
impl GetSendQuotaResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetSendQuotaResponse, XmlParseError> {
deserialize_elements::<_, GetSendQuotaResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Max24HourSend" => {
obj.max_24_hour_send = Some(Max24HourSendDeserializer::deserialize(
"Max24HourSend",
stack,
)?);
}
"MaxSendRate" => {
obj.max_send_rate =
Some(MaxSendRateDeserializer::deserialize("MaxSendRate", stack)?);
}
"SentLast24Hours" => {
obj.sent_last_24_hours = Some(SentLast24HoursDeserializer::deserialize(
"SentLast24Hours",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetSendStatisticsResponse {
pub send_data_points: Option<Vec<SendDataPoint>>,
}
struct GetSendStatisticsResponseDeserializer;
impl GetSendStatisticsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetSendStatisticsResponse, XmlParseError> {
deserialize_elements::<_, GetSendStatisticsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SendDataPoints" => {
obj.send_data_points.get_or_insert(vec![]).extend(
SendDataPointListDeserializer::deserialize("SendDataPoints", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTemplateRequest {
pub template_name: String,
}
struct GetTemplateRequestSerializer;
impl GetTemplateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetTemplateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTemplateResponse {
pub template: Option<Template>,
}
struct GetTemplateResponseDeserializer;
impl GetTemplateResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetTemplateResponse, XmlParseError> {
deserialize_elements::<_, GetTemplateResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Template" => {
obj.template = Some(TemplateDeserializer::deserialize("Template", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct HeaderNameDeserializer;
impl HeaderNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct HeaderValueDeserializer;
impl HeaderValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct HtmlPartDeserializer;
impl HtmlPartDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct IdentityDeserializer;
impl IdentityDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct IdentityDkimAttributes {
pub dkim_enabled: bool,
pub dkim_tokens: Option<Vec<String>>,
pub dkim_verification_status: String,
}
struct IdentityDkimAttributesDeserializer;
impl IdentityDkimAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<IdentityDkimAttributes, XmlParseError> {
deserialize_elements::<_, IdentityDkimAttributes, _>(tag_name, stack, |name, stack, obj| {
match name {
"DkimEnabled" => {
obj.dkim_enabled = EnabledDeserializer::deserialize("DkimEnabled", stack)?;
}
"DkimTokens" => {
obj.dkim_tokens.get_or_insert(vec![]).extend(
VerificationTokenListDeserializer::deserialize("DkimTokens", stack)?,
);
}
"DkimVerificationStatus" => {
obj.dkim_verification_status = VerificationStatusDeserializer::deserialize(
"DkimVerificationStatus",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct IdentityListDeserializer;
impl IdentityListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(IdentityDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct IdentityListSerializer;
impl IdentityListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct IdentityMailFromDomainAttributes {
pub behavior_on_mx_failure: String,
pub mail_from_domain: String,
pub mail_from_domain_status: String,
}
struct IdentityMailFromDomainAttributesDeserializer;
impl IdentityMailFromDomainAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<IdentityMailFromDomainAttributes, XmlParseError> {
deserialize_elements::<_, IdentityMailFromDomainAttributes, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"BehaviorOnMXFailure" => {
obj.behavior_on_mx_failure = BehaviorOnMXFailureDeserializer::deserialize(
"BehaviorOnMXFailure",
stack,
)?;
}
"MailFromDomain" => {
obj.mail_from_domain =
MailFromDomainNameDeserializer::deserialize("MailFromDomain", stack)?;
}
"MailFromDomainStatus" => {
obj.mail_from_domain_status =
CustomMailFromStatusDeserializer::deserialize(
"MailFromDomainStatus",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct IdentityNotificationAttributes {
pub bounce_topic: String,
pub complaint_topic: String,
pub delivery_topic: String,
pub forwarding_enabled: bool,
pub headers_in_bounce_notifications_enabled: Option<bool>,
pub headers_in_complaint_notifications_enabled: Option<bool>,
pub headers_in_delivery_notifications_enabled: Option<bool>,
}
struct IdentityNotificationAttributesDeserializer;
impl IdentityNotificationAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<IdentityNotificationAttributes, XmlParseError> {
deserialize_elements::<_, IdentityNotificationAttributes, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"BounceTopic" => {
obj.bounce_topic =
NotificationTopicDeserializer::deserialize("BounceTopic", stack)?;
}
"ComplaintTopic" => {
obj.complaint_topic =
NotificationTopicDeserializer::deserialize("ComplaintTopic", stack)?;
}
"DeliveryTopic" => {
obj.delivery_topic =
NotificationTopicDeserializer::deserialize("DeliveryTopic", stack)?;
}
"ForwardingEnabled" => {
obj.forwarding_enabled =
EnabledDeserializer::deserialize("ForwardingEnabled", stack)?;
}
"HeadersInBounceNotificationsEnabled" => {
obj.headers_in_bounce_notifications_enabled =
Some(EnabledDeserializer::deserialize(
"HeadersInBounceNotificationsEnabled",
stack,
)?);
}
"HeadersInComplaintNotificationsEnabled" => {
obj.headers_in_complaint_notifications_enabled =
Some(EnabledDeserializer::deserialize(
"HeadersInComplaintNotificationsEnabled",
stack,
)?);
}
"HeadersInDeliveryNotificationsEnabled" => {
obj.headers_in_delivery_notifications_enabled =
Some(EnabledDeserializer::deserialize(
"HeadersInDeliveryNotificationsEnabled",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct IdentityVerificationAttributes {
pub verification_status: String,
pub verification_token: Option<String>,
}
struct IdentityVerificationAttributesDeserializer;
impl IdentityVerificationAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<IdentityVerificationAttributes, XmlParseError> {
deserialize_elements::<_, IdentityVerificationAttributes, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"VerificationStatus" => {
obj.verification_status = VerificationStatusDeserializer::deserialize(
"VerificationStatus",
stack,
)?;
}
"VerificationToken" => {
obj.verification_token = Some(VerificationTokenDeserializer::deserialize(
"VerificationToken",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct InvocationTypeDeserializer;
impl InvocationTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct KinesisFirehoseDestination {
pub delivery_stream_arn: String,
pub iam_role_arn: String,
}
struct KinesisFirehoseDestinationDeserializer;
impl KinesisFirehoseDestinationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<KinesisFirehoseDestination, XmlParseError> {
deserialize_elements::<_, KinesisFirehoseDestination, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DeliveryStreamARN" => {
obj.delivery_stream_arn = AmazonResourceNameDeserializer::deserialize(
"DeliveryStreamARN",
stack,
)?;
}
"IAMRoleARN" => {
obj.iam_role_arn =
AmazonResourceNameDeserializer::deserialize("IAMRoleARN", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct KinesisFirehoseDestinationSerializer;
impl KinesisFirehoseDestinationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &KinesisFirehoseDestination) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DeliveryStreamARN"),
&obj.delivery_stream_arn,
);
params.put(&format!("{}{}", prefix, "IAMRoleARN"), &obj.iam_role_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LambdaAction {
pub function_arn: String,
pub invocation_type: Option<String>,
pub topic_arn: Option<String>,
}
struct LambdaActionDeserializer;
impl LambdaActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LambdaAction, XmlParseError> {
deserialize_elements::<_, LambdaAction, _>(tag_name, stack, |name, stack, obj| {
match name {
"FunctionArn" => {
obj.function_arn =
AmazonResourceNameDeserializer::deserialize("FunctionArn", stack)?;
}
"InvocationType" => {
obj.invocation_type = Some(InvocationTypeDeserializer::deserialize(
"InvocationType",
stack,
)?);
}
"TopicArn" => {
obj.topic_arn = Some(AmazonResourceNameDeserializer::deserialize(
"TopicArn", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LambdaActionSerializer;
impl LambdaActionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &LambdaAction) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "FunctionArn"), &obj.function_arn);
if let Some(ref field_value) = obj.invocation_type {
params.put(&format!("{}{}", prefix, "InvocationType"), &field_value);
}
if let Some(ref field_value) = obj.topic_arn {
params.put(&format!("{}{}", prefix, "TopicArn"), &field_value);
}
}
}
struct LastFreshStartDeserializer;
impl LastFreshStartDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListConfigurationSetsRequest {
pub max_items: Option<i64>,
pub next_token: Option<String>,
}
struct ListConfigurationSetsRequestSerializer;
impl ListConfigurationSetsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListConfigurationSetsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListConfigurationSetsResponse {
pub configuration_sets: Option<Vec<ConfigurationSet>>,
pub next_token: Option<String>,
}
struct ListConfigurationSetsResponseDeserializer;
impl ListConfigurationSetsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListConfigurationSetsResponse, XmlParseError> {
deserialize_elements::<_, ListConfigurationSetsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ConfigurationSets" => {
obj.configuration_sets.get_or_insert(vec![]).extend(
ConfigurationSetsDeserializer::deserialize("ConfigurationSets", stack)?,
);
}
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListCustomVerificationEmailTemplatesRequest {
pub max_results: Option<i64>,
pub next_token: Option<String>,
}
struct ListCustomVerificationEmailTemplatesRequestSerializer;
impl ListCustomVerificationEmailTemplatesRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &ListCustomVerificationEmailTemplatesRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.max_results {
params.put(&format!("{}{}", prefix, "MaxResults"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListCustomVerificationEmailTemplatesResponse {
pub custom_verification_email_templates: Option<Vec<CustomVerificationEmailTemplate>>,
pub next_token: Option<String>,
}
struct ListCustomVerificationEmailTemplatesResponseDeserializer;
impl ListCustomVerificationEmailTemplatesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListCustomVerificationEmailTemplatesResponse, XmlParseError> {
deserialize_elements::<_, ListCustomVerificationEmailTemplatesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"CustomVerificationEmailTemplates" => {
obj.custom_verification_email_templates
.get_or_insert(vec![])
.extend(CustomVerificationEmailTemplatesDeserializer::deserialize(
"CustomVerificationEmailTemplates",
stack,
)?);
}
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListIdentitiesRequest {
pub identity_type: Option<String>,
pub max_items: Option<i64>,
pub next_token: Option<String>,
}
struct ListIdentitiesRequestSerializer;
impl ListIdentitiesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListIdentitiesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.identity_type {
params.put(&format!("{}{}", prefix, "IdentityType"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListIdentitiesResponse {
pub identities: Vec<String>,
pub next_token: Option<String>,
}
struct ListIdentitiesResponseDeserializer;
impl ListIdentitiesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListIdentitiesResponse, XmlParseError> {
deserialize_elements::<_, ListIdentitiesResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Identities" => {
obj.identities
.extend(IdentityListDeserializer::deserialize("Identities", stack)?);
}
"NextToken" => {
obj.next_token = Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListIdentityPoliciesRequest {
pub identity: String,
}
struct ListIdentityPoliciesRequestSerializer;
impl ListIdentityPoliciesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListIdentityPoliciesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListIdentityPoliciesResponse {
pub policy_names: Vec<String>,
}
struct ListIdentityPoliciesResponseDeserializer;
impl ListIdentityPoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListIdentityPoliciesResponse, XmlParseError> {
deserialize_elements::<_, ListIdentityPoliciesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PolicyNames" => {
obj.policy_names
.extend(PolicyNameListDeserializer::deserialize(
"PolicyNames",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListReceiptFiltersRequest {}
struct ListReceiptFiltersRequestSerializer;
impl ListReceiptFiltersRequestSerializer {
fn serialize(_params: &mut Params, name: &str, _obj: &ListReceiptFiltersRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListReceiptFiltersResponse {
pub filters: Option<Vec<ReceiptFilter>>,
}
struct ListReceiptFiltersResponseDeserializer;
impl ListReceiptFiltersResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListReceiptFiltersResponse, XmlParseError> {
deserialize_elements::<_, ListReceiptFiltersResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Filters" => {
obj.filters.get_or_insert(vec![]).extend(
ReceiptFilterListDeserializer::deserialize("Filters", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListReceiptRuleSetsRequest {
pub next_token: Option<String>,
}
struct ListReceiptRuleSetsRequestSerializer;
impl ListReceiptRuleSetsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListReceiptRuleSetsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListReceiptRuleSetsResponse {
pub next_token: Option<String>,
pub rule_sets: Option<Vec<ReceiptRuleSetMetadata>>,
}
struct ListReceiptRuleSetsResponseDeserializer;
impl ListReceiptRuleSetsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListReceiptRuleSetsResponse, XmlParseError> {
deserialize_elements::<_, ListReceiptRuleSetsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"RuleSets" => {
obj.rule_sets.get_or_insert(vec![]).extend(
ReceiptRuleSetsListsDeserializer::deserialize("RuleSets", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTemplatesRequest {
pub max_items: Option<i64>,
pub next_token: Option<String>,
}
struct ListTemplatesRequestSerializer;
impl ListTemplatesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListTemplatesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTemplatesResponse {
pub next_token: Option<String>,
pub templates_metadata: Option<Vec<TemplateMetadata>>,
}
struct ListTemplatesResponseDeserializer;
impl ListTemplatesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListTemplatesResponse, XmlParseError> {
deserialize_elements::<_, ListTemplatesResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"NextToken" => {
obj.next_token = Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"TemplatesMetadata" => {
obj.templates_metadata.get_or_insert(vec![]).extend(
TemplateMetadataListDeserializer::deserialize("TemplatesMetadata", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListVerifiedEmailAddressesResponse {
pub verified_email_addresses: Option<Vec<String>>,
}
struct ListVerifiedEmailAddressesResponseDeserializer;
impl ListVerifiedEmailAddressesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListVerifiedEmailAddressesResponse, XmlParseError> {
deserialize_elements::<_, ListVerifiedEmailAddressesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"VerifiedEmailAddresses" => {
obj.verified_email_addresses.get_or_insert(vec![]).extend(
AddressListDeserializer::deserialize("VerifiedEmailAddresses", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct MailFromDomainAttributesDeserializer;
impl MailFromDomainAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<::std::collections::HashMap<String, IdentityMailFromDomainAttributes>, XmlParseError>
{
start_element(tag_name, stack)?;
let mut obj = ::std::collections::HashMap::new();
while peek_at_name(stack)? == "entry" {
start_element("entry", stack)?;
let key = IdentityDeserializer::deserialize("key", stack)?;
let value = IdentityMailFromDomainAttributesDeserializer::deserialize("value", stack)?;
obj.insert(key, value);
end_element("entry", stack)?;
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct MailFromDomainNameDeserializer;
impl MailFromDomainNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct Max24HourSendDeserializer;
impl Max24HourSendDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct MaxSendRateDeserializer;
impl MaxSendRateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Message {
pub body: Body,
pub subject: Content,
}
struct MessageSerializer;
impl MessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Message) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
BodySerializer::serialize(params, &format!("{}{}", prefix, "Body"), &obj.body);
ContentSerializer::serialize(params, &format!("{}{}", prefix, "Subject"), &obj.subject);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct MessageDsn {
pub arrival_date: Option<String>,
pub extension_fields: Option<Vec<ExtensionField>>,
pub reporting_mta: String,
}
struct MessageDsnSerializer;
impl MessageDsnSerializer {
fn serialize(params: &mut Params, name: &str, obj: &MessageDsn) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.arrival_date {
params.put(&format!("{}{}", prefix, "ArrivalDate"), &field_value);
}
if let Some(ref field_value) = obj.extension_fields {
ExtensionFieldListSerializer::serialize(
params,
&format!("{}{}", prefix, "ExtensionFields"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "ReportingMta"), &obj.reporting_mta);
}
}
struct MessageIdDeserializer;
impl MessageIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct MessageTag {
pub name: String,
pub value: String,
}
struct MessageTagSerializer;
impl MessageTagSerializer {
fn serialize(params: &mut Params, name: &str, obj: &MessageTag) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Name"), &obj.name);
params.put(&format!("{}{}", prefix, "Value"), &obj.value);
}
}
struct MessageTagListSerializer;
impl MessageTagListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<MessageTag>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
MessageTagSerializer::serialize(params, &key, obj);
}
}
}
struct NextTokenDeserializer;
impl NextTokenDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NotificationAttributesDeserializer;
impl NotificationAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<::std::collections::HashMap<String, IdentityNotificationAttributes>, XmlParseError>
{
start_element(tag_name, stack)?;
let mut obj = ::std::collections::HashMap::new();
while peek_at_name(stack)? == "entry" {
start_element("entry", stack)?;
let key = IdentityDeserializer::deserialize("key", stack)?;
let value = IdentityNotificationAttributesDeserializer::deserialize("value", stack)?;
obj.insert(key, value);
end_element("entry", stack)?;
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NotificationTopicDeserializer;
impl NotificationTopicDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PolicyDeserializer;
impl PolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PolicyMapDeserializer;
impl PolicyMapDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<::std::collections::HashMap<String, String>, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ::std::collections::HashMap::new();
while peek_at_name(stack)? == "entry" {
start_element("entry", stack)?;
let key = PolicyNameDeserializer::deserialize("key", stack)?;
let value = PolicyDeserializer::deserialize("value", stack)?;
obj.insert(key, value);
end_element("entry", stack)?;
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PolicyNameDeserializer;
impl PolicyNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PolicyNameListDeserializer;
impl PolicyNameListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyNameDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyNameListSerializer;
impl PolicyNameListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PutConfigurationSetDeliveryOptionsRequest {
pub configuration_set_name: String,
pub delivery_options: Option<DeliveryOptions>,
}
struct PutConfigurationSetDeliveryOptionsRequestSerializer;
impl PutConfigurationSetDeliveryOptionsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PutConfigurationSetDeliveryOptionsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
if let Some(ref field_value) = obj.delivery_options {
DeliveryOptionsSerializer::serialize(
params,
&format!("{}{}", prefix, "DeliveryOptions"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PutConfigurationSetDeliveryOptionsResponse {}
struct PutConfigurationSetDeliveryOptionsResponseDeserializer;
impl PutConfigurationSetDeliveryOptionsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PutConfigurationSetDeliveryOptionsResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = PutConfigurationSetDeliveryOptionsResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PutIdentityPolicyRequest {
pub identity: String,
pub policy: String,
pub policy_name: String,
}
struct PutIdentityPolicyRequestSerializer;
impl PutIdentityPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PutIdentityPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
params.put(&format!("{}{}", prefix, "Policy"), &obj.policy);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PutIdentityPolicyResponse {}
struct PutIdentityPolicyResponseDeserializer;
impl PutIdentityPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PutIdentityPolicyResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = PutIdentityPolicyResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RawMessage {
pub data: bytes::Bytes,
}
struct RawMessageSerializer;
impl RawMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RawMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "Data"),
::std::str::from_utf8(&obj.data).unwrap(),
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReceiptAction {
pub add_header_action: Option<AddHeaderAction>,
pub bounce_action: Option<BounceAction>,
pub lambda_action: Option<LambdaAction>,
pub s3_action: Option<S3Action>,
pub sns_action: Option<SNSAction>,
pub stop_action: Option<StopAction>,
pub workmail_action: Option<WorkmailAction>,
}
struct ReceiptActionDeserializer;
impl ReceiptActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReceiptAction, XmlParseError> {
deserialize_elements::<_, ReceiptAction, _>(tag_name, stack, |name, stack, obj| {
match name {
"AddHeaderAction" => {
obj.add_header_action = Some(AddHeaderActionDeserializer::deserialize(
"AddHeaderAction",
stack,
)?);
}
"BounceAction" => {
obj.bounce_action = Some(BounceActionDeserializer::deserialize(
"BounceAction",
stack,
)?);
}
"LambdaAction" => {
obj.lambda_action = Some(LambdaActionDeserializer::deserialize(
"LambdaAction",
stack,
)?);
}
"S3Action" => {
obj.s3_action = Some(S3ActionDeserializer::deserialize("S3Action", stack)?);
}
"SNSAction" => {
obj.sns_action = Some(SNSActionDeserializer::deserialize("SNSAction", stack)?);
}
"StopAction" => {
obj.stop_action =
Some(StopActionDeserializer::deserialize("StopAction", stack)?);
}
"WorkmailAction" => {
obj.workmail_action = Some(WorkmailActionDeserializer::deserialize(
"WorkmailAction",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ReceiptActionSerializer;
impl ReceiptActionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ReceiptAction) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.add_header_action {
AddHeaderActionSerializer::serialize(
params,
&format!("{}{}", prefix, "AddHeaderAction"),
field_value,
);
}
if let Some(ref field_value) = obj.bounce_action {
BounceActionSerializer::serialize(
params,
&format!("{}{}", prefix, "BounceAction"),
field_value,
);
}
if let Some(ref field_value) = obj.lambda_action {
LambdaActionSerializer::serialize(
params,
&format!("{}{}", prefix, "LambdaAction"),
field_value,
);
}
if let Some(ref field_value) = obj.s3_action {
S3ActionSerializer::serialize(
params,
&format!("{}{}", prefix, "S3Action"),
field_value,
);
}
if let Some(ref field_value) = obj.sns_action {
SNSActionSerializer::serialize(
params,
&format!("{}{}", prefix, "SNSAction"),
field_value,
);
}
if let Some(ref field_value) = obj.stop_action {
StopActionSerializer::serialize(
params,
&format!("{}{}", prefix, "StopAction"),
field_value,
);
}
if let Some(ref field_value) = obj.workmail_action {
WorkmailActionSerializer::serialize(
params,
&format!("{}{}", prefix, "WorkmailAction"),
field_value,
);
}
}
}
struct ReceiptActionsListDeserializer;
impl ReceiptActionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ReceiptAction>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ReceiptActionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReceiptActionsListSerializer;
impl ReceiptActionsListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<ReceiptAction>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
ReceiptActionSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReceiptFilter {
pub ip_filter: ReceiptIpFilter,
pub name: String,
}
struct ReceiptFilterDeserializer;
impl ReceiptFilterDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReceiptFilter, XmlParseError> {
deserialize_elements::<_, ReceiptFilter, _>(tag_name, stack, |name, stack, obj| {
match name {
"IpFilter" => {
obj.ip_filter = ReceiptIpFilterDeserializer::deserialize("IpFilter", stack)?;
}
"Name" => {
obj.name = ReceiptFilterNameDeserializer::deserialize("Name", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ReceiptFilterSerializer;
impl ReceiptFilterSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ReceiptFilter) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ReceiptIpFilterSerializer::serialize(
params,
&format!("{}{}", prefix, "IpFilter"),
&obj.ip_filter,
);
params.put(&format!("{}{}", prefix, "Name"), &obj.name);
}
}
struct ReceiptFilterListDeserializer;
impl ReceiptFilterListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ReceiptFilter>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ReceiptFilterDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReceiptFilterNameDeserializer;
impl ReceiptFilterNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ReceiptFilterPolicyDeserializer;
impl ReceiptFilterPolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReceiptIpFilter {
pub cidr: String,
pub policy: String,
}
struct ReceiptIpFilterDeserializer;
impl ReceiptIpFilterDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReceiptIpFilter, XmlParseError> {
deserialize_elements::<_, ReceiptIpFilter, _>(tag_name, stack, |name, stack, obj| {
match name {
"Cidr" => {
obj.cidr = CidrDeserializer::deserialize("Cidr", stack)?;
}
"Policy" => {
obj.policy = ReceiptFilterPolicyDeserializer::deserialize("Policy", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ReceiptIpFilterSerializer;
impl ReceiptIpFilterSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ReceiptIpFilter) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Cidr"), &obj.cidr);
params.put(&format!("{}{}", prefix, "Policy"), &obj.policy);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReceiptRule {
pub actions: Option<Vec<ReceiptAction>>,
pub enabled: Option<bool>,
pub name: String,
pub recipients: Option<Vec<String>>,
pub scan_enabled: Option<bool>,
pub tls_policy: Option<String>,
}
struct ReceiptRuleDeserializer;
impl ReceiptRuleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReceiptRule, XmlParseError> {
deserialize_elements::<_, ReceiptRule, _>(tag_name, stack, |name, stack, obj| {
match name {
"Actions" => {
obj.actions.get_or_insert(vec![]).extend(
ReceiptActionsListDeserializer::deserialize("Actions", stack)?,
);
}
"Enabled" => {
obj.enabled = Some(EnabledDeserializer::deserialize("Enabled", stack)?);
}
"Name" => {
obj.name = ReceiptRuleNameDeserializer::deserialize("Name", stack)?;
}
"Recipients" => {
obj.recipients.get_or_insert(vec![]).extend(
RecipientsListDeserializer::deserialize("Recipients", stack)?,
);
}
"ScanEnabled" => {
obj.scan_enabled =
Some(EnabledDeserializer::deserialize("ScanEnabled", stack)?);
}
"TlsPolicy" => {
obj.tls_policy = Some(TlsPolicyDeserializer::deserialize("TlsPolicy", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ReceiptRuleSerializer;
impl ReceiptRuleSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ReceiptRule) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.actions {
ReceiptActionsListSerializer::serialize(
params,
&format!("{}{}", prefix, "Actions"),
field_value,
);
}
if let Some(ref field_value) = obj.enabled {
params.put(&format!("{}{}", prefix, "Enabled"), &field_value);
}
params.put(&format!("{}{}", prefix, "Name"), &obj.name);
if let Some(ref field_value) = obj.recipients {
RecipientsListSerializer::serialize(
params,
&format!("{}{}", prefix, "Recipients"),
field_value,
);
}
if let Some(ref field_value) = obj.scan_enabled {
params.put(&format!("{}{}", prefix, "ScanEnabled"), &field_value);
}
if let Some(ref field_value) = obj.tls_policy {
params.put(&format!("{}{}", prefix, "TlsPolicy"), &field_value);
}
}
}
struct ReceiptRuleNameDeserializer;
impl ReceiptRuleNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ReceiptRuleNamesListSerializer;
impl ReceiptRuleNamesListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReceiptRuleSetMetadata {
pub created_timestamp: Option<String>,
pub name: Option<String>,
}
struct ReceiptRuleSetMetadataDeserializer;
impl ReceiptRuleSetMetadataDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReceiptRuleSetMetadata, XmlParseError> {
deserialize_elements::<_, ReceiptRuleSetMetadata, _>(tag_name, stack, |name, stack, obj| {
match name {
"CreatedTimestamp" => {
obj.created_timestamp = Some(TimestampDeserializer::deserialize(
"CreatedTimestamp",
stack,
)?);
}
"Name" => {
obj.name = Some(ReceiptRuleSetNameDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ReceiptRuleSetNameDeserializer;
impl ReceiptRuleSetNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ReceiptRuleSetsListsDeserializer;
impl ReceiptRuleSetsListsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ReceiptRuleSetMetadata>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ReceiptRuleSetMetadataDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReceiptRulesListDeserializer;
impl ReceiptRulesListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ReceiptRule>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ReceiptRuleDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct RecipientDeserializer;
impl RecipientDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RecipientDsnFields {
pub action: String,
pub diagnostic_code: Option<String>,
pub extension_fields: Option<Vec<ExtensionField>>,
pub final_recipient: Option<String>,
pub last_attempt_date: Option<String>,
pub remote_mta: Option<String>,
pub status: String,
}
struct RecipientDsnFieldsSerializer;
impl RecipientDsnFieldsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RecipientDsnFields) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Action"), &obj.action);
if let Some(ref field_value) = obj.diagnostic_code {
params.put(&format!("{}{}", prefix, "DiagnosticCode"), &field_value);
}
if let Some(ref field_value) = obj.extension_fields {
ExtensionFieldListSerializer::serialize(
params,
&format!("{}{}", prefix, "ExtensionFields"),
field_value,
);
}
if let Some(ref field_value) = obj.final_recipient {
params.put(&format!("{}{}", prefix, "FinalRecipient"), &field_value);
}
if let Some(ref field_value) = obj.last_attempt_date {
params.put(&format!("{}{}", prefix, "LastAttemptDate"), &field_value);
}
if let Some(ref field_value) = obj.remote_mta {
params.put(&format!("{}{}", prefix, "RemoteMta"), &field_value);
}
params.put(&format!("{}{}", prefix, "Status"), &obj.status);
}
}
struct RecipientsListDeserializer;
impl RecipientsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(RecipientDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct RecipientsListSerializer;
impl RecipientsListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct RenderedTemplateDeserializer;
impl RenderedTemplateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReorderReceiptRuleSetRequest {
pub rule_names: Vec<String>,
pub rule_set_name: String,
}
struct ReorderReceiptRuleSetRequestSerializer;
impl ReorderReceiptRuleSetRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ReorderReceiptRuleSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ReceiptRuleNamesListSerializer::serialize(
params,
&format!("{}{}", prefix, "RuleNames"),
&obj.rule_names,
);
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReorderReceiptRuleSetResponse {}
struct ReorderReceiptRuleSetResponseDeserializer;
impl ReorderReceiptRuleSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReorderReceiptRuleSetResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = ReorderReceiptRuleSetResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReputationOptions {
pub last_fresh_start: Option<String>,
pub reputation_metrics_enabled: Option<bool>,
pub sending_enabled: Option<bool>,
}
struct ReputationOptionsDeserializer;
impl ReputationOptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReputationOptions, XmlParseError> {
deserialize_elements::<_, ReputationOptions, _>(tag_name, stack, |name, stack, obj| {
match name {
"LastFreshStart" => {
obj.last_fresh_start = Some(LastFreshStartDeserializer::deserialize(
"LastFreshStart",
stack,
)?);
}
"ReputationMetricsEnabled" => {
obj.reputation_metrics_enabled = Some(EnabledDeserializer::deserialize(
"ReputationMetricsEnabled",
stack,
)?);
}
"SendingEnabled" => {
obj.sending_enabled =
Some(EnabledDeserializer::deserialize("SendingEnabled", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct S3Action {
pub bucket_name: String,
pub kms_key_arn: Option<String>,
pub object_key_prefix: Option<String>,
pub topic_arn: Option<String>,
}
struct S3ActionDeserializer;
impl S3ActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<S3Action, XmlParseError> {
deserialize_elements::<_, S3Action, _>(tag_name, stack, |name, stack, obj| {
match name {
"BucketName" => {
obj.bucket_name = S3BucketNameDeserializer::deserialize("BucketName", stack)?;
}
"KmsKeyArn" => {
obj.kms_key_arn = Some(AmazonResourceNameDeserializer::deserialize(
"KmsKeyArn",
stack,
)?);
}
"ObjectKeyPrefix" => {
obj.object_key_prefix = Some(S3KeyPrefixDeserializer::deserialize(
"ObjectKeyPrefix",
stack,
)?);
}
"TopicArn" => {
obj.topic_arn = Some(AmazonResourceNameDeserializer::deserialize(
"TopicArn", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct S3ActionSerializer;
impl S3ActionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &S3Action) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "BucketName"), &obj.bucket_name);
if let Some(ref field_value) = obj.kms_key_arn {
params.put(&format!("{}{}", prefix, "KmsKeyArn"), &field_value);
}
if let Some(ref field_value) = obj.object_key_prefix {
params.put(&format!("{}{}", prefix, "ObjectKeyPrefix"), &field_value);
}
if let Some(ref field_value) = obj.topic_arn {
params.put(&format!("{}{}", prefix, "TopicArn"), &field_value);
}
}
}
struct S3BucketNameDeserializer;
impl S3BucketNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct S3KeyPrefixDeserializer;
impl S3KeyPrefixDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SNSAction {
pub encoding: Option<String>,
pub topic_arn: String,
}
struct SNSActionDeserializer;
impl SNSActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SNSAction, XmlParseError> {
deserialize_elements::<_, SNSAction, _>(tag_name, stack, |name, stack, obj| {
match name {
"Encoding" => {
obj.encoding = Some(SNSActionEncodingDeserializer::deserialize(
"Encoding", stack,
)?);
}
"TopicArn" => {
obj.topic_arn = AmazonResourceNameDeserializer::deserialize("TopicArn", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SNSActionSerializer;
impl SNSActionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SNSAction) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.encoding {
params.put(&format!("{}{}", prefix, "Encoding"), &field_value);
}
params.put(&format!("{}{}", prefix, "TopicArn"), &obj.topic_arn);
}
}
struct SNSActionEncodingDeserializer;
impl SNSActionEncodingDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SNSDestination {
pub topic_arn: String,
}
struct SNSDestinationDeserializer;
impl SNSDestinationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SNSDestination, XmlParseError> {
deserialize_elements::<_, SNSDestination, _>(tag_name, stack, |name, stack, obj| {
match name {
"TopicARN" => {
obj.topic_arn = AmazonResourceNameDeserializer::deserialize("TopicARN", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SNSDestinationSerializer;
impl SNSDestinationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SNSDestination) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "TopicARN"), &obj.topic_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendBounceRequest {
pub bounce_sender: String,
pub bounce_sender_arn: Option<String>,
pub bounced_recipient_info_list: Vec<BouncedRecipientInfo>,
pub explanation: Option<String>,
pub message_dsn: Option<MessageDsn>,
pub original_message_id: String,
}
struct SendBounceRequestSerializer;
impl SendBounceRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SendBounceRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "BounceSender"), &obj.bounce_sender);
if let Some(ref field_value) = obj.bounce_sender_arn {
params.put(&format!("{}{}", prefix, "BounceSenderArn"), &field_value);
}
BouncedRecipientInfoListSerializer::serialize(
params,
&format!("{}{}", prefix, "BouncedRecipientInfoList"),
&obj.bounced_recipient_info_list,
);
if let Some(ref field_value) = obj.explanation {
params.put(&format!("{}{}", prefix, "Explanation"), &field_value);
}
if let Some(ref field_value) = obj.message_dsn {
MessageDsnSerializer::serialize(
params,
&format!("{}{}", prefix, "MessageDsn"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "OriginalMessageId"),
&obj.original_message_id,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendBounceResponse {
pub message_id: Option<String>,
}
struct SendBounceResponseDeserializer;
impl SendBounceResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SendBounceResponse, XmlParseError> {
deserialize_elements::<_, SendBounceResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"MessageId" => {
obj.message_id = Some(MessageIdDeserializer::deserialize("MessageId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendBulkTemplatedEmailRequest {
pub configuration_set_name: Option<String>,
pub default_tags: Option<Vec<MessageTag>>,
pub default_template_data: Option<String>,
pub destinations: Vec<BulkEmailDestination>,
pub reply_to_addresses: Option<Vec<String>>,
pub return_path: Option<String>,
pub return_path_arn: Option<String>,
pub source: String,
pub source_arn: Option<String>,
pub template: String,
pub template_arn: Option<String>,
}
struct SendBulkTemplatedEmailRequestSerializer;
impl SendBulkTemplatedEmailRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SendBulkTemplatedEmailRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.configuration_set_name {
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&field_value,
);
}
if let Some(ref field_value) = obj.default_tags {
MessageTagListSerializer::serialize(
params,
&format!("{}{}", prefix, "DefaultTags"),
field_value,
);
}
if let Some(ref field_value) = obj.default_template_data {
params.put(
&format!("{}{}", prefix, "DefaultTemplateData"),
&field_value,
);
}
BulkEmailDestinationListSerializer::serialize(
params,
&format!("{}{}", prefix, "Destinations"),
&obj.destinations,
);
if let Some(ref field_value) = obj.reply_to_addresses {
AddressListSerializer::serialize(
params,
&format!("{}{}", prefix, "ReplyToAddresses"),
field_value,
);
}
if let Some(ref field_value) = obj.return_path {
params.put(&format!("{}{}", prefix, "ReturnPath"), &field_value);
}
if let Some(ref field_value) = obj.return_path_arn {
params.put(&format!("{}{}", prefix, "ReturnPathArn"), &field_value);
}
params.put(&format!("{}{}", prefix, "Source"), &obj.source);
if let Some(ref field_value) = obj.source_arn {
params.put(&format!("{}{}", prefix, "SourceArn"), &field_value);
}
params.put(&format!("{}{}", prefix, "Template"), &obj.template);
if let Some(ref field_value) = obj.template_arn {
params.put(&format!("{}{}", prefix, "TemplateArn"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendBulkTemplatedEmailResponse {
pub status: Vec<BulkEmailDestinationStatus>,
}
struct SendBulkTemplatedEmailResponseDeserializer;
impl SendBulkTemplatedEmailResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SendBulkTemplatedEmailResponse, XmlParseError> {
deserialize_elements::<_, SendBulkTemplatedEmailResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Status" => {
obj.status
.extend(BulkEmailDestinationStatusListDeserializer::deserialize(
"Status", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendCustomVerificationEmailRequest {
pub configuration_set_name: Option<String>,
pub email_address: String,
pub template_name: String,
}
struct SendCustomVerificationEmailRequestSerializer;
impl SendCustomVerificationEmailRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SendCustomVerificationEmailRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.configuration_set_name {
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "EmailAddress"), &obj.email_address);
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendCustomVerificationEmailResponse {
pub message_id: Option<String>,
}
struct SendCustomVerificationEmailResponseDeserializer;
impl SendCustomVerificationEmailResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SendCustomVerificationEmailResponse, XmlParseError> {
deserialize_elements::<_, SendCustomVerificationEmailResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"MessageId" => {
obj.message_id =
Some(MessageIdDeserializer::deserialize("MessageId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendDataPoint {
pub bounces: Option<i64>,
pub complaints: Option<i64>,
pub delivery_attempts: Option<i64>,
pub rejects: Option<i64>,
pub timestamp: Option<String>,
}
struct SendDataPointDeserializer;
impl SendDataPointDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SendDataPoint, XmlParseError> {
deserialize_elements::<_, SendDataPoint, _>(tag_name, stack, |name, stack, obj| {
match name {
"Bounces" => {
obj.bounces = Some(CounterDeserializer::deserialize("Bounces", stack)?);
}
"Complaints" => {
obj.complaints = Some(CounterDeserializer::deserialize("Complaints", stack)?);
}
"DeliveryAttempts" => {
obj.delivery_attempts =
Some(CounterDeserializer::deserialize("DeliveryAttempts", stack)?);
}
"Rejects" => {
obj.rejects = Some(CounterDeserializer::deserialize("Rejects", stack)?);
}
"Timestamp" => {
obj.timestamp = Some(TimestampDeserializer::deserialize("Timestamp", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SendDataPointListDeserializer;
impl SendDataPointListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SendDataPoint>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SendDataPointDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendEmailRequest {
pub configuration_set_name: Option<String>,
pub destination: Destination,
pub message: Message,
pub reply_to_addresses: Option<Vec<String>>,
pub return_path: Option<String>,
pub return_path_arn: Option<String>,
pub source: String,
pub source_arn: Option<String>,
pub tags: Option<Vec<MessageTag>>,
}
struct SendEmailRequestSerializer;
impl SendEmailRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SendEmailRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.configuration_set_name {
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&field_value,
);
}
DestinationSerializer::serialize(
params,
&format!("{}{}", prefix, "Destination"),
&obj.destination,
);
MessageSerializer::serialize(params, &format!("{}{}", prefix, "Message"), &obj.message);
if let Some(ref field_value) = obj.reply_to_addresses {
AddressListSerializer::serialize(
params,
&format!("{}{}", prefix, "ReplyToAddresses"),
field_value,
);
}
if let Some(ref field_value) = obj.return_path {
params.put(&format!("{}{}", prefix, "ReturnPath"), &field_value);
}
if let Some(ref field_value) = obj.return_path_arn {
params.put(&format!("{}{}", prefix, "ReturnPathArn"), &field_value);
}
params.put(&format!("{}{}", prefix, "Source"), &obj.source);
if let Some(ref field_value) = obj.source_arn {
params.put(&format!("{}{}", prefix, "SourceArn"), &field_value);
}
if let Some(ref field_value) = obj.tags {
MessageTagListSerializer::serialize(
params,
&format!("{}{}", prefix, "Tags"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendEmailResponse {
pub message_id: String,
}
struct SendEmailResponseDeserializer;
impl SendEmailResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SendEmailResponse, XmlParseError> {
deserialize_elements::<_, SendEmailResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"MessageId" => {
obj.message_id = MessageIdDeserializer::deserialize("MessageId", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendRawEmailRequest {
pub configuration_set_name: Option<String>,
pub destinations: Option<Vec<String>>,
pub from_arn: Option<String>,
pub raw_message: RawMessage,
pub return_path_arn: Option<String>,
pub source: Option<String>,
pub source_arn: Option<String>,
pub tags: Option<Vec<MessageTag>>,
}
struct SendRawEmailRequestSerializer;
impl SendRawEmailRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SendRawEmailRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.configuration_set_name {
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&field_value,
);
}
if let Some(ref field_value) = obj.destinations {
AddressListSerializer::serialize(
params,
&format!("{}{}", prefix, "Destinations"),
field_value,
);
}
if let Some(ref field_value) = obj.from_arn {
params.put(&format!("{}{}", prefix, "FromArn"), &field_value);
}
RawMessageSerializer::serialize(
params,
&format!("{}{}", prefix, "RawMessage"),
&obj.raw_message,
);
if let Some(ref field_value) = obj.return_path_arn {
params.put(&format!("{}{}", prefix, "ReturnPathArn"), &field_value);
}
if let Some(ref field_value) = obj.source {
params.put(&format!("{}{}", prefix, "Source"), &field_value);
}
if let Some(ref field_value) = obj.source_arn {
params.put(&format!("{}{}", prefix, "SourceArn"), &field_value);
}
if let Some(ref field_value) = obj.tags {
MessageTagListSerializer::serialize(
params,
&format!("{}{}", prefix, "Tags"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendRawEmailResponse {
pub message_id: String,
}
struct SendRawEmailResponseDeserializer;
impl SendRawEmailResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SendRawEmailResponse, XmlParseError> {
deserialize_elements::<_, SendRawEmailResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"MessageId" => {
obj.message_id = MessageIdDeserializer::deserialize("MessageId", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendTemplatedEmailRequest {
pub configuration_set_name: Option<String>,
pub destination: Destination,
pub reply_to_addresses: Option<Vec<String>>,
pub return_path: Option<String>,
pub return_path_arn: Option<String>,
pub source: String,
pub source_arn: Option<String>,
pub tags: Option<Vec<MessageTag>>,
pub template: String,
pub template_arn: Option<String>,
pub template_data: String,
}
struct SendTemplatedEmailRequestSerializer;
impl SendTemplatedEmailRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SendTemplatedEmailRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.configuration_set_name {
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&field_value,
);
}
DestinationSerializer::serialize(
params,
&format!("{}{}", prefix, "Destination"),
&obj.destination,
);
if let Some(ref field_value) = obj.reply_to_addresses {
AddressListSerializer::serialize(
params,
&format!("{}{}", prefix, "ReplyToAddresses"),
field_value,
);
}
if let Some(ref field_value) = obj.return_path {
params.put(&format!("{}{}", prefix, "ReturnPath"), &field_value);
}
if let Some(ref field_value) = obj.return_path_arn {
params.put(&format!("{}{}", prefix, "ReturnPathArn"), &field_value);
}
params.put(&format!("{}{}", prefix, "Source"), &obj.source);
if let Some(ref field_value) = obj.source_arn {
params.put(&format!("{}{}", prefix, "SourceArn"), &field_value);
}
if let Some(ref field_value) = obj.tags {
MessageTagListSerializer::serialize(
params,
&format!("{}{}", prefix, "Tags"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "Template"), &obj.template);
if let Some(ref field_value) = obj.template_arn {
params.put(&format!("{}{}", prefix, "TemplateArn"), &field_value);
}
params.put(&format!("{}{}", prefix, "TemplateData"), &obj.template_data);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SendTemplatedEmailResponse {
pub message_id: String,
}
struct SendTemplatedEmailResponseDeserializer;
impl SendTemplatedEmailResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SendTemplatedEmailResponse, XmlParseError> {
deserialize_elements::<_, SendTemplatedEmailResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"MessageId" => {
obj.message_id = MessageIdDeserializer::deserialize("MessageId", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct SentLast24HoursDeserializer;
impl SentLast24HoursDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetActiveReceiptRuleSetRequest {
pub rule_set_name: Option<String>,
}
struct SetActiveReceiptRuleSetRequestSerializer;
impl SetActiveReceiptRuleSetRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetActiveReceiptRuleSetRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.rule_set_name {
params.put(&format!("{}{}", prefix, "RuleSetName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetActiveReceiptRuleSetResponse {}
struct SetActiveReceiptRuleSetResponseDeserializer;
impl SetActiveReceiptRuleSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetActiveReceiptRuleSetResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetActiveReceiptRuleSetResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityDkimEnabledRequest {
pub dkim_enabled: bool,
pub identity: String,
}
struct SetIdentityDkimEnabledRequestSerializer;
impl SetIdentityDkimEnabledRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetIdentityDkimEnabledRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "DkimEnabled"), &obj.dkim_enabled);
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityDkimEnabledResponse {}
struct SetIdentityDkimEnabledResponseDeserializer;
impl SetIdentityDkimEnabledResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetIdentityDkimEnabledResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetIdentityDkimEnabledResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityFeedbackForwardingEnabledRequest {
pub forwarding_enabled: bool,
pub identity: String,
}
struct SetIdentityFeedbackForwardingEnabledRequestSerializer;
impl SetIdentityFeedbackForwardingEnabledRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &SetIdentityFeedbackForwardingEnabledRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ForwardingEnabled"),
&obj.forwarding_enabled,
);
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityFeedbackForwardingEnabledResponse {}
struct SetIdentityFeedbackForwardingEnabledResponseDeserializer;
impl SetIdentityFeedbackForwardingEnabledResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetIdentityFeedbackForwardingEnabledResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetIdentityFeedbackForwardingEnabledResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityHeadersInNotificationsEnabledRequest {
pub enabled: bool,
pub identity: String,
pub notification_type: String,
}
struct SetIdentityHeadersInNotificationsEnabledRequestSerializer;
impl SetIdentityHeadersInNotificationsEnabledRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &SetIdentityHeadersInNotificationsEnabledRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
params.put(
&format!("{}{}", prefix, "NotificationType"),
&obj.notification_type,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityHeadersInNotificationsEnabledResponse {}
struct SetIdentityHeadersInNotificationsEnabledResponseDeserializer;
impl SetIdentityHeadersInNotificationsEnabledResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetIdentityHeadersInNotificationsEnabledResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetIdentityHeadersInNotificationsEnabledResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityMailFromDomainRequest {
pub behavior_on_mx_failure: Option<String>,
pub identity: String,
pub mail_from_domain: Option<String>,
}
struct SetIdentityMailFromDomainRequestSerializer;
impl SetIdentityMailFromDomainRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetIdentityMailFromDomainRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.behavior_on_mx_failure {
params.put(
&format!("{}{}", prefix, "BehaviorOnMXFailure"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
if let Some(ref field_value) = obj.mail_from_domain {
params.put(&format!("{}{}", prefix, "MailFromDomain"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityMailFromDomainResponse {}
struct SetIdentityMailFromDomainResponseDeserializer;
impl SetIdentityMailFromDomainResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetIdentityMailFromDomainResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetIdentityMailFromDomainResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityNotificationTopicRequest {
pub identity: String,
pub notification_type: String,
pub sns_topic: Option<String>,
}
struct SetIdentityNotificationTopicRequestSerializer;
impl SetIdentityNotificationTopicRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetIdentityNotificationTopicRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Identity"), &obj.identity);
params.put(
&format!("{}{}", prefix, "NotificationType"),
&obj.notification_type,
);
if let Some(ref field_value) = obj.sns_topic {
params.put(&format!("{}{}", prefix, "SnsTopic"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIdentityNotificationTopicResponse {}
struct SetIdentityNotificationTopicResponseDeserializer;
impl SetIdentityNotificationTopicResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetIdentityNotificationTopicResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetIdentityNotificationTopicResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetReceiptRulePositionRequest {
pub after: Option<String>,
pub rule_name: String,
pub rule_set_name: String,
}
struct SetReceiptRulePositionRequestSerializer;
impl SetReceiptRulePositionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetReceiptRulePositionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.after {
params.put(&format!("{}{}", prefix, "After"), &field_value);
}
params.put(&format!("{}{}", prefix, "RuleName"), &obj.rule_name);
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetReceiptRulePositionResponse {}
struct SetReceiptRulePositionResponseDeserializer;
impl SetReceiptRulePositionResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetReceiptRulePositionResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetReceiptRulePositionResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StopAction {
pub scope: String,
pub topic_arn: Option<String>,
}
struct StopActionDeserializer;
impl StopActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StopAction, XmlParseError> {
deserialize_elements::<_, StopAction, _>(tag_name, stack, |name, stack, obj| {
match name {
"Scope" => {
obj.scope = StopScopeDeserializer::deserialize("Scope", stack)?;
}
"TopicArn" => {
obj.topic_arn = Some(AmazonResourceNameDeserializer::deserialize(
"TopicArn", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StopActionSerializer;
impl StopActionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &StopAction) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Scope"), &obj.scope);
if let Some(ref field_value) = obj.topic_arn {
params.put(&format!("{}{}", prefix, "TopicArn"), &field_value);
}
}
}
struct StopScopeDeserializer;
impl StopScopeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SubjectDeserializer;
impl SubjectDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SubjectPartDeserializer;
impl SubjectPartDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SuccessRedirectionURLDeserializer;
impl SuccessRedirectionURLDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Template {
pub html_part: Option<String>,
pub subject_part: Option<String>,
pub template_name: String,
pub text_part: Option<String>,
}
struct TemplateDeserializer;
impl TemplateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Template, XmlParseError> {
deserialize_elements::<_, Template, _>(tag_name, stack, |name, stack, obj| {
match name {
"HtmlPart" => {
obj.html_part = Some(HtmlPartDeserializer::deserialize("HtmlPart", stack)?);
}
"SubjectPart" => {
obj.subject_part =
Some(SubjectPartDeserializer::deserialize("SubjectPart", stack)?);
}
"TemplateName" => {
obj.template_name =
TemplateNameDeserializer::deserialize("TemplateName", stack)?;
}
"TextPart" => {
obj.text_part = Some(TextPartDeserializer::deserialize("TextPart", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TemplateSerializer;
impl TemplateSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Template) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.html_part {
params.put(&format!("{}{}", prefix, "HtmlPart"), &field_value);
}
if let Some(ref field_value) = obj.subject_part {
params.put(&format!("{}{}", prefix, "SubjectPart"), &field_value);
}
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
if let Some(ref field_value) = obj.text_part {
params.put(&format!("{}{}", prefix, "TextPart"), &field_value);
}
}
}
struct TemplateContentDeserializer;
impl TemplateContentDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TemplateMetadata {
pub created_timestamp: Option<String>,
pub name: Option<String>,
}
struct TemplateMetadataDeserializer;
impl TemplateMetadataDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TemplateMetadata, XmlParseError> {
deserialize_elements::<_, TemplateMetadata, _>(tag_name, stack, |name, stack, obj| {
match name {
"CreatedTimestamp" => {
obj.created_timestamp = Some(TimestampDeserializer::deserialize(
"CreatedTimestamp",
stack,
)?);
}
"Name" => {
obj.name = Some(TemplateNameDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TemplateMetadataListDeserializer;
impl TemplateMetadataListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TemplateMetadata>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TemplateMetadataDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TemplateNameDeserializer;
impl TemplateNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TestRenderTemplateRequest {
pub template_data: String,
pub template_name: String,
}
struct TestRenderTemplateRequestSerializer;
impl TestRenderTemplateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &TestRenderTemplateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "TemplateData"), &obj.template_data);
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TestRenderTemplateResponse {
pub rendered_template: Option<String>,
}
struct TestRenderTemplateResponseDeserializer;
impl TestRenderTemplateResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TestRenderTemplateResponse, XmlParseError> {
deserialize_elements::<_, TestRenderTemplateResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"RenderedTemplate" => {
obj.rendered_template = Some(RenderedTemplateDeserializer::deserialize(
"RenderedTemplate",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct TextPartDeserializer;
impl TextPartDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TimestampDeserializer;
impl TimestampDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TlsPolicyDeserializer;
impl TlsPolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TrackingOptions {
pub custom_redirect_domain: Option<String>,
}
struct TrackingOptionsDeserializer;
impl TrackingOptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TrackingOptions, XmlParseError> {
deserialize_elements::<_, TrackingOptions, _>(tag_name, stack, |name, stack, obj| {
match name {
"CustomRedirectDomain" => {
obj.custom_redirect_domain =
Some(CustomRedirectDomainDeserializer::deserialize(
"CustomRedirectDomain",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TrackingOptionsSerializer;
impl TrackingOptionsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &TrackingOptions) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.custom_redirect_domain {
params.put(
&format!("{}{}", prefix, "CustomRedirectDomain"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateAccountSendingEnabledRequest {
pub enabled: Option<bool>,
}
struct UpdateAccountSendingEnabledRequestSerializer;
impl UpdateAccountSendingEnabledRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateAccountSendingEnabledRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.enabled {
params.put(&format!("{}{}", prefix, "Enabled"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateConfigurationSetEventDestinationRequest {
pub configuration_set_name: String,
pub event_destination: EventDestination,
}
struct UpdateConfigurationSetEventDestinationRequestSerializer;
impl UpdateConfigurationSetEventDestinationRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &UpdateConfigurationSetEventDestinationRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
EventDestinationSerializer::serialize(
params,
&format!("{}{}", prefix, "EventDestination"),
&obj.event_destination,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateConfigurationSetEventDestinationResponse {}
struct UpdateConfigurationSetEventDestinationResponseDeserializer;
impl UpdateConfigurationSetEventDestinationResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateConfigurationSetEventDestinationResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = UpdateConfigurationSetEventDestinationResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateConfigurationSetReputationMetricsEnabledRequest {
pub configuration_set_name: String,
pub enabled: bool,
}
struct UpdateConfigurationSetReputationMetricsEnabledRequestSerializer;
impl UpdateConfigurationSetReputationMetricsEnabledRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &UpdateConfigurationSetReputationMetricsEnabledRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateConfigurationSetSendingEnabledRequest {
pub configuration_set_name: String,
pub enabled: bool,
}
struct UpdateConfigurationSetSendingEnabledRequestSerializer;
impl UpdateConfigurationSetSendingEnabledRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &UpdateConfigurationSetSendingEnabledRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateConfigurationSetTrackingOptionsRequest {
pub configuration_set_name: String,
pub tracking_options: TrackingOptions,
}
struct UpdateConfigurationSetTrackingOptionsRequestSerializer;
impl UpdateConfigurationSetTrackingOptionsRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &UpdateConfigurationSetTrackingOptionsRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ConfigurationSetName"),
&obj.configuration_set_name,
);
TrackingOptionsSerializer::serialize(
params,
&format!("{}{}", prefix, "TrackingOptions"),
&obj.tracking_options,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateConfigurationSetTrackingOptionsResponse {}
struct UpdateConfigurationSetTrackingOptionsResponseDeserializer;
impl UpdateConfigurationSetTrackingOptionsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateConfigurationSetTrackingOptionsResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = UpdateConfigurationSetTrackingOptionsResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateCustomVerificationEmailTemplateRequest {
pub failure_redirection_url: Option<String>,
pub from_email_address: Option<String>,
pub success_redirection_url: Option<String>,
pub template_content: Option<String>,
pub template_name: String,
pub template_subject: Option<String>,
}
struct UpdateCustomVerificationEmailTemplateRequestSerializer;
impl UpdateCustomVerificationEmailTemplateRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &UpdateCustomVerificationEmailTemplateRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.failure_redirection_url {
params.put(
&format!("{}{}", prefix, "FailureRedirectionURL"),
&field_value,
);
}
if let Some(ref field_value) = obj.from_email_address {
params.put(&format!("{}{}", prefix, "FromEmailAddress"), &field_value);
}
if let Some(ref field_value) = obj.success_redirection_url {
params.put(
&format!("{}{}", prefix, "SuccessRedirectionURL"),
&field_value,
);
}
if let Some(ref field_value) = obj.template_content {
params.put(&format!("{}{}", prefix, "TemplateContent"), &field_value);
}
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
if let Some(ref field_value) = obj.template_subject {
params.put(&format!("{}{}", prefix, "TemplateSubject"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateReceiptRuleRequest {
pub rule: ReceiptRule,
pub rule_set_name: String,
}
struct UpdateReceiptRuleRequestSerializer;
impl UpdateReceiptRuleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateReceiptRuleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ReceiptRuleSerializer::serialize(params, &format!("{}{}", prefix, "Rule"), &obj.rule);
params.put(&format!("{}{}", prefix, "RuleSetName"), &obj.rule_set_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateReceiptRuleResponse {}
struct UpdateReceiptRuleResponseDeserializer;
impl UpdateReceiptRuleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateReceiptRuleResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = UpdateReceiptRuleResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTemplateRequest {
pub template: Template,
}
struct UpdateTemplateRequestSerializer;
impl UpdateTemplateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateTemplateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
TemplateSerializer::serialize(params, &format!("{}{}", prefix, "Template"), &obj.template);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTemplateResponse {}
struct UpdateTemplateResponseDeserializer;
impl UpdateTemplateResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateTemplateResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = UpdateTemplateResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct VerificationAttributesDeserializer;
impl VerificationAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<::std::collections::HashMap<String, IdentityVerificationAttributes>, XmlParseError>
{
start_element(tag_name, stack)?;
let mut obj = ::std::collections::HashMap::new();
while peek_at_name(stack)? == "entry" {
start_element("entry", stack)?;
let key = IdentityDeserializer::deserialize("key", stack)?;
let value = IdentityVerificationAttributesDeserializer::deserialize("value", stack)?;
obj.insert(key, value);
end_element("entry", stack)?;
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct VerificationStatusDeserializer;
impl VerificationStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct VerificationTokenDeserializer;
impl VerificationTokenDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct VerificationTokenListDeserializer;
impl VerificationTokenListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(VerificationTokenDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct VerifyDomainDkimRequest {
pub domain: String,
}
struct VerifyDomainDkimRequestSerializer;
impl VerifyDomainDkimRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &VerifyDomainDkimRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Domain"), &obj.domain);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct VerifyDomainDkimResponse {
pub dkim_tokens: Vec<String>,
}
struct VerifyDomainDkimResponseDeserializer;
impl VerifyDomainDkimResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<VerifyDomainDkimResponse, XmlParseError> {
deserialize_elements::<_, VerifyDomainDkimResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DkimTokens" => {
obj.dkim_tokens
.extend(VerificationTokenListDeserializer::deserialize(
"DkimTokens",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct VerifyDomainIdentityRequest {
pub domain: String,
}
struct VerifyDomainIdentityRequestSerializer;
impl VerifyDomainIdentityRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &VerifyDomainIdentityRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Domain"), &obj.domain);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct VerifyDomainIdentityResponse {
pub verification_token: String,
}
struct VerifyDomainIdentityResponseDeserializer;
impl VerifyDomainIdentityResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<VerifyDomainIdentityResponse, XmlParseError> {
deserialize_elements::<_, VerifyDomainIdentityResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"VerificationToken" => {
obj.verification_token =
VerificationTokenDeserializer::deserialize("VerificationToken", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct VerifyEmailAddressRequest {
pub email_address: String,
}
struct VerifyEmailAddressRequestSerializer;
impl VerifyEmailAddressRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &VerifyEmailAddressRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "EmailAddress"), &obj.email_address);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct VerifyEmailIdentityRequest {
pub email_address: String,
}
struct VerifyEmailIdentityRequestSerializer;
impl VerifyEmailIdentityRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &VerifyEmailIdentityRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "EmailAddress"), &obj.email_address);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct VerifyEmailIdentityResponse {}
struct VerifyEmailIdentityResponseDeserializer;
impl VerifyEmailIdentityResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<VerifyEmailIdentityResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = VerifyEmailIdentityResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct WorkmailAction {
pub organization_arn: String,
pub topic_arn: Option<String>,
}
struct WorkmailActionDeserializer;
impl WorkmailActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<WorkmailAction, XmlParseError> {
deserialize_elements::<_, WorkmailAction, _>(tag_name, stack, |name, stack, obj| {
match name {
"OrganizationArn" => {
obj.organization_arn =
AmazonResourceNameDeserializer::deserialize("OrganizationArn", stack)?;
}
"TopicArn" => {
obj.topic_arn = Some(AmazonResourceNameDeserializer::deserialize(
"TopicArn", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct WorkmailActionSerializer;
impl WorkmailActionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &WorkmailAction) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "OrganizationArn"),
&obj.organization_arn,
);
if let Some(ref field_value) = obj.topic_arn {
params.put(&format!("{}{}", prefix, "TopicArn"), &field_value);
}
}
}
#[derive(Debug, PartialEq)]
pub enum CloneReceiptRuleSetError {
AlreadyExists(String),
LimitExceeded(String),
RuleSetDoesNotExist(String),
}
impl CloneReceiptRuleSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CloneReceiptRuleSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AlreadyExists" => {
return RusotoError::Service(CloneReceiptRuleSetError::AlreadyExists(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CloneReceiptRuleSetError::LimitExceeded(
parsed_error.message,
))
}
"RuleSetDoesNotExist" => {
return RusotoError::Service(CloneReceiptRuleSetError::RuleSetDoesNotExist(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CloneReceiptRuleSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CloneReceiptRuleSetError {
fn description(&self) -> &str {
match *self {
CloneReceiptRuleSetError::AlreadyExists(ref cause) => cause,
CloneReceiptRuleSetError::LimitExceeded(ref cause) => cause,
CloneReceiptRuleSetError::RuleSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConfigurationSetError {
ConfigurationSetAlreadyExists(String),
InvalidConfigurationSet(String),
LimitExceeded(String),
}
impl CreateConfigurationSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateConfigurationSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetAlreadyExists" => {
return RusotoError::Service(
CreateConfigurationSetError::ConfigurationSetAlreadyExists(
parsed_error.message,
),
)
}
"InvalidConfigurationSet" => {
return RusotoError::Service(
CreateConfigurationSetError::InvalidConfigurationSet(
parsed_error.message,
),
)
}
"LimitExceeded" => {
return RusotoError::Service(CreateConfigurationSetError::LimitExceeded(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateConfigurationSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateConfigurationSetError {
fn description(&self) -> &str {
match *self {
CreateConfigurationSetError::ConfigurationSetAlreadyExists(ref cause) => cause,
CreateConfigurationSetError::InvalidConfigurationSet(ref cause) => cause,
CreateConfigurationSetError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConfigurationSetEventDestinationError {
ConfigurationSetDoesNotExist(String),
EventDestinationAlreadyExists(String),
InvalidCloudWatchDestination(String),
InvalidFirehoseDestination(String),
InvalidSNSDestination(String),
LimitExceeded(String),
}
impl CreateConfigurationSetEventDestinationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateConfigurationSetEventDestinationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => return RusotoError::Service(
CreateConfigurationSetEventDestinationError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
),
"EventDestinationAlreadyExists" => return RusotoError::Service(
CreateConfigurationSetEventDestinationError::EventDestinationAlreadyExists(
parsed_error.message,
),
),
"InvalidCloudWatchDestination" => return RusotoError::Service(
CreateConfigurationSetEventDestinationError::InvalidCloudWatchDestination(
parsed_error.message,
),
),
"InvalidFirehoseDestination" => {
return RusotoError::Service(
CreateConfigurationSetEventDestinationError::InvalidFirehoseDestination(
parsed_error.message,
),
)
}
"InvalidSNSDestination" => {
return RusotoError::Service(
CreateConfigurationSetEventDestinationError::InvalidSNSDestination(
parsed_error.message,
),
)
}
"LimitExceeded" => {
return RusotoError::Service(
CreateConfigurationSetEventDestinationError::LimitExceeded(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateConfigurationSetEventDestinationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateConfigurationSetEventDestinationError {
fn description(&self) -> &str {
match *self {
CreateConfigurationSetEventDestinationError::ConfigurationSetDoesNotExist(
ref cause,
) => cause,
CreateConfigurationSetEventDestinationError::EventDestinationAlreadyExists(
ref cause,
) => cause,
CreateConfigurationSetEventDestinationError::InvalidCloudWatchDestination(
ref cause,
) => cause,
CreateConfigurationSetEventDestinationError::InvalidFirehoseDestination(ref cause) => {
cause
}
CreateConfigurationSetEventDestinationError::InvalidSNSDestination(ref cause) => cause,
CreateConfigurationSetEventDestinationError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConfigurationSetTrackingOptionsError {
ConfigurationSetDoesNotExist(String),
InvalidTrackingOptions(String),
TrackingOptionsAlreadyExists(String),
}
impl CreateConfigurationSetTrackingOptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateConfigurationSetTrackingOptionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => return RusotoError::Service(
CreateConfigurationSetTrackingOptionsError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
),
"InvalidTrackingOptions" => {
return RusotoError::Service(
CreateConfigurationSetTrackingOptionsError::InvalidTrackingOptions(
parsed_error.message,
),
)
}
"TrackingOptionsAlreadyExistsException" => return RusotoError::Service(
CreateConfigurationSetTrackingOptionsError::TrackingOptionsAlreadyExists(
parsed_error.message,
),
),
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateConfigurationSetTrackingOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateConfigurationSetTrackingOptionsError {
fn description(&self) -> &str {
match *self {
CreateConfigurationSetTrackingOptionsError::ConfigurationSetDoesNotExist(ref cause) => {
cause
}
CreateConfigurationSetTrackingOptionsError::InvalidTrackingOptions(ref cause) => cause,
CreateConfigurationSetTrackingOptionsError::TrackingOptionsAlreadyExists(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateCustomVerificationEmailTemplateError {
CustomVerificationEmailInvalidContent(String),
CustomVerificationEmailTemplateAlreadyExists(String),
FromEmailAddressNotVerified(String),
LimitExceeded(String),
}
impl CreateCustomVerificationEmailTemplateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateCustomVerificationEmailTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"CustomVerificationEmailInvalidContent" => return RusotoError::Service(CreateCustomVerificationEmailTemplateError::CustomVerificationEmailInvalidContent(parsed_error.message)),"CustomVerificationEmailTemplateAlreadyExists" => return RusotoError::Service(CreateCustomVerificationEmailTemplateError::CustomVerificationEmailTemplateAlreadyExists(parsed_error.message)),"FromEmailAddressNotVerified" => return RusotoError::Service(CreateCustomVerificationEmailTemplateError::FromEmailAddressNotVerified(parsed_error.message)),"LimitExceeded" => return RusotoError::Service(CreateCustomVerificationEmailTemplateError::LimitExceeded(parsed_error.message)),_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateCustomVerificationEmailTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateCustomVerificationEmailTemplateError {
fn description(&self) -> &str {
match *self {
CreateCustomVerificationEmailTemplateError::CustomVerificationEmailInvalidContent(ref cause) => cause,
CreateCustomVerificationEmailTemplateError::CustomVerificationEmailTemplateAlreadyExists(ref cause) => cause,
CreateCustomVerificationEmailTemplateError::FromEmailAddressNotVerified(ref cause) => cause,
CreateCustomVerificationEmailTemplateError::LimitExceeded(ref cause) => cause
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateReceiptFilterError {
AlreadyExists(String),
LimitExceeded(String),
}
impl CreateReceiptFilterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateReceiptFilterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AlreadyExists" => {
return RusotoError::Service(CreateReceiptFilterError::AlreadyExists(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateReceiptFilterError::LimitExceeded(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateReceiptFilterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateReceiptFilterError {
fn description(&self) -> &str {
match *self {
CreateReceiptFilterError::AlreadyExists(ref cause) => cause,
CreateReceiptFilterError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateReceiptRuleError {
AlreadyExists(String),
InvalidLambdaFunction(String),
InvalidS3Configuration(String),
InvalidSnsTopic(String),
LimitExceeded(String),
RuleDoesNotExist(String),
RuleSetDoesNotExist(String),
}
impl CreateReceiptRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateReceiptRuleError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AlreadyExists" => {
return RusotoError::Service(CreateReceiptRuleError::AlreadyExists(
parsed_error.message,
))
}
"InvalidLambdaFunction" => {
return RusotoError::Service(CreateReceiptRuleError::InvalidLambdaFunction(
parsed_error.message,
))
}
"InvalidS3Configuration" => {
return RusotoError::Service(
CreateReceiptRuleError::InvalidS3Configuration(parsed_error.message),
)
}
"InvalidSnsTopic" => {
return RusotoError::Service(CreateReceiptRuleError::InvalidSnsTopic(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateReceiptRuleError::LimitExceeded(
parsed_error.message,
))
}
"RuleDoesNotExist" => {
return RusotoError::Service(CreateReceiptRuleError::RuleDoesNotExist(
parsed_error.message,
))
}
"RuleSetDoesNotExist" => {
return RusotoError::Service(CreateReceiptRuleError::RuleSetDoesNotExist(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateReceiptRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateReceiptRuleError {
fn description(&self) -> &str {
match *self {
CreateReceiptRuleError::AlreadyExists(ref cause) => cause,
CreateReceiptRuleError::InvalidLambdaFunction(ref cause) => cause,
CreateReceiptRuleError::InvalidS3Configuration(ref cause) => cause,
CreateReceiptRuleError::InvalidSnsTopic(ref cause) => cause,
CreateReceiptRuleError::LimitExceeded(ref cause) => cause,
CreateReceiptRuleError::RuleDoesNotExist(ref cause) => cause,
CreateReceiptRuleError::RuleSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateReceiptRuleSetError {
AlreadyExists(String),
LimitExceeded(String),
}
impl CreateReceiptRuleSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateReceiptRuleSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AlreadyExists" => {
return RusotoError::Service(CreateReceiptRuleSetError::AlreadyExists(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateReceiptRuleSetError::LimitExceeded(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateReceiptRuleSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateReceiptRuleSetError {
fn description(&self) -> &str {
match *self {
CreateReceiptRuleSetError::AlreadyExists(ref cause) => cause,
CreateReceiptRuleSetError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTemplateError {
AlreadyExists(String),
InvalidTemplate(String),
LimitExceeded(String),
}
impl CreateTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AlreadyExists" => {
return RusotoError::Service(CreateTemplateError::AlreadyExists(
parsed_error.message,
))
}
"InvalidTemplate" => {
return RusotoError::Service(CreateTemplateError::InvalidTemplate(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateTemplateError::LimitExceeded(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTemplateError {
fn description(&self) -> &str {
match *self {
CreateTemplateError::AlreadyExists(ref cause) => cause,
CreateTemplateError::InvalidTemplate(ref cause) => cause,
CreateTemplateError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteConfigurationSetError {
ConfigurationSetDoesNotExist(String),
}
impl DeleteConfigurationSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteConfigurationSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => {
return RusotoError::Service(
DeleteConfigurationSetError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteConfigurationSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteConfigurationSetError {
fn description(&self) -> &str {
match *self {
DeleteConfigurationSetError::ConfigurationSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteConfigurationSetEventDestinationError {
ConfigurationSetDoesNotExist(String),
EventDestinationDoesNotExist(String),
}
impl DeleteConfigurationSetEventDestinationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteConfigurationSetEventDestinationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => return RusotoError::Service(
DeleteConfigurationSetEventDestinationError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
),
"EventDestinationDoesNotExist" => return RusotoError::Service(
DeleteConfigurationSetEventDestinationError::EventDestinationDoesNotExist(
parsed_error.message,
),
),
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteConfigurationSetEventDestinationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteConfigurationSetEventDestinationError {
fn description(&self) -> &str {
match *self {
DeleteConfigurationSetEventDestinationError::ConfigurationSetDoesNotExist(
ref cause,
) => cause,
DeleteConfigurationSetEventDestinationError::EventDestinationDoesNotExist(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteConfigurationSetTrackingOptionsError {
ConfigurationSetDoesNotExist(String),
TrackingOptionsDoesNotExist(String),
}
impl DeleteConfigurationSetTrackingOptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteConfigurationSetTrackingOptionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => return RusotoError::Service(
DeleteConfigurationSetTrackingOptionsError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
),
"TrackingOptionsDoesNotExistException" => {
return RusotoError::Service(
DeleteConfigurationSetTrackingOptionsError::TrackingOptionsDoesNotExist(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteConfigurationSetTrackingOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteConfigurationSetTrackingOptionsError {
fn description(&self) -> &str {
match *self {
DeleteConfigurationSetTrackingOptionsError::ConfigurationSetDoesNotExist(ref cause) => {
cause
}
DeleteConfigurationSetTrackingOptionsError::TrackingOptionsDoesNotExist(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteCustomVerificationEmailTemplateError {}
impl DeleteCustomVerificationEmailTemplateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteCustomVerificationEmailTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteCustomVerificationEmailTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteCustomVerificationEmailTemplateError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteIdentityError {}
impl DeleteIdentityError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteIdentityError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteIdentityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteIdentityError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteIdentityPolicyError {}
impl DeleteIdentityPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteIdentityPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteIdentityPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteIdentityPolicyError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteReceiptFilterError {}
impl DeleteReceiptFilterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteReceiptFilterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteReceiptFilterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteReceiptFilterError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteReceiptRuleError {
RuleSetDoesNotExist(String),
}
impl DeleteReceiptRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteReceiptRuleError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"RuleSetDoesNotExist" => {
return RusotoError::Service(DeleteReceiptRuleError::RuleSetDoesNotExist(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteReceiptRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteReceiptRuleError {
fn description(&self) -> &str {
match *self {
DeleteReceiptRuleError::RuleSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteReceiptRuleSetError {
CannotDelete(String),
}
impl DeleteReceiptRuleSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteReceiptRuleSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"CannotDelete" => {
return RusotoError::Service(DeleteReceiptRuleSetError::CannotDelete(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteReceiptRuleSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteReceiptRuleSetError {
fn description(&self) -> &str {
match *self {
DeleteReceiptRuleSetError::CannotDelete(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTemplateError {}
impl DeleteTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTemplateError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteVerifiedEmailAddressError {}
impl DeleteVerifiedEmailAddressError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteVerifiedEmailAddressError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteVerifiedEmailAddressError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteVerifiedEmailAddressError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeActiveReceiptRuleSetError {}
impl DescribeActiveReceiptRuleSetError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeActiveReceiptRuleSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeActiveReceiptRuleSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeActiveReceiptRuleSetError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConfigurationSetError {
ConfigurationSetDoesNotExist(String),
}
impl DescribeConfigurationSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeConfigurationSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => {
return RusotoError::Service(
DescribeConfigurationSetError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeConfigurationSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeConfigurationSetError {
fn description(&self) -> &str {
match *self {
DescribeConfigurationSetError::ConfigurationSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeReceiptRuleError {
RuleDoesNotExist(String),
RuleSetDoesNotExist(String),
}
impl DescribeReceiptRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeReceiptRuleError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"RuleDoesNotExist" => {
return RusotoError::Service(DescribeReceiptRuleError::RuleDoesNotExist(
parsed_error.message,
))
}
"RuleSetDoesNotExist" => {
return RusotoError::Service(DescribeReceiptRuleError::RuleSetDoesNotExist(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeReceiptRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeReceiptRuleError {
fn description(&self) -> &str {
match *self {
DescribeReceiptRuleError::RuleDoesNotExist(ref cause) => cause,
DescribeReceiptRuleError::RuleSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeReceiptRuleSetError {
RuleSetDoesNotExist(String),
}
impl DescribeReceiptRuleSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeReceiptRuleSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"RuleSetDoesNotExist" => {
return RusotoError::Service(
DescribeReceiptRuleSetError::RuleSetDoesNotExist(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeReceiptRuleSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeReceiptRuleSetError {
fn description(&self) -> &str {
match *self {
DescribeReceiptRuleSetError::RuleSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAccountSendingEnabledError {}
impl GetAccountSendingEnabledError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAccountSendingEnabledError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetAccountSendingEnabledError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAccountSendingEnabledError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCustomVerificationEmailTemplateError {
CustomVerificationEmailTemplateDoesNotExist(String),
}
impl GetCustomVerificationEmailTemplateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetCustomVerificationEmailTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"CustomVerificationEmailTemplateDoesNotExist" => return RusotoError::Service(GetCustomVerificationEmailTemplateError::CustomVerificationEmailTemplateDoesNotExist(parsed_error.message)),_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetCustomVerificationEmailTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCustomVerificationEmailTemplateError {
fn description(&self) -> &str {
match *self {
GetCustomVerificationEmailTemplateError::CustomVerificationEmailTemplateDoesNotExist(ref cause) => cause
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIdentityDkimAttributesError {}
impl GetIdentityDkimAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIdentityDkimAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetIdentityDkimAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIdentityDkimAttributesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIdentityMailFromDomainAttributesError {}
impl GetIdentityMailFromDomainAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetIdentityMailFromDomainAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetIdentityMailFromDomainAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIdentityMailFromDomainAttributesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIdentityNotificationAttributesError {}
impl GetIdentityNotificationAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetIdentityNotificationAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetIdentityNotificationAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIdentityNotificationAttributesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIdentityPoliciesError {}
impl GetIdentityPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIdentityPoliciesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetIdentityPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIdentityPoliciesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIdentityVerificationAttributesError {}
impl GetIdentityVerificationAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetIdentityVerificationAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetIdentityVerificationAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIdentityVerificationAttributesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSendQuotaError {}
impl GetSendQuotaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSendQuotaError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetSendQuotaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSendQuotaError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSendStatisticsError {}
impl GetSendStatisticsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSendStatisticsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetSendStatisticsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSendStatisticsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTemplateError {
TemplateDoesNotExist(String),
}
impl GetTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"TemplateDoesNotExist" => {
return RusotoError::Service(GetTemplateError::TemplateDoesNotExist(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTemplateError {
fn description(&self) -> &str {
match *self {
GetTemplateError::TemplateDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListConfigurationSetsError {}
impl ListConfigurationSetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListConfigurationSetsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListConfigurationSetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListConfigurationSetsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListCustomVerificationEmailTemplatesError {}
impl ListCustomVerificationEmailTemplatesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListCustomVerificationEmailTemplatesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListCustomVerificationEmailTemplatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListCustomVerificationEmailTemplatesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListIdentitiesError {}
impl ListIdentitiesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListIdentitiesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListIdentitiesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListIdentitiesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListIdentityPoliciesError {}
impl ListIdentityPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListIdentityPoliciesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListIdentityPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListIdentityPoliciesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListReceiptFiltersError {}
impl ListReceiptFiltersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListReceiptFiltersError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListReceiptFiltersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListReceiptFiltersError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListReceiptRuleSetsError {}
impl ListReceiptRuleSetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListReceiptRuleSetsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListReceiptRuleSetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListReceiptRuleSetsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTemplatesError {}
impl ListTemplatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTemplatesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTemplatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTemplatesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListVerifiedEmailAddressesError {}
impl ListVerifiedEmailAddressesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListVerifiedEmailAddressesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListVerifiedEmailAddressesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListVerifiedEmailAddressesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum PutConfigurationSetDeliveryOptionsError {
ConfigurationSetDoesNotExist(String),
InvalidDeliveryOptions(String),
}
impl PutConfigurationSetDeliveryOptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutConfigurationSetDeliveryOptionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => {
return RusotoError::Service(
PutConfigurationSetDeliveryOptionsError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
)
}
"InvalidDeliveryOptions" => {
return RusotoError::Service(
PutConfigurationSetDeliveryOptionsError::InvalidDeliveryOptions(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for PutConfigurationSetDeliveryOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutConfigurationSetDeliveryOptionsError {
fn description(&self) -> &str {
match *self {
PutConfigurationSetDeliveryOptionsError::ConfigurationSetDoesNotExist(ref cause) => {
cause
}
PutConfigurationSetDeliveryOptionsError::InvalidDeliveryOptions(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutIdentityPolicyError {
InvalidPolicy(String),
}
impl PutIdentityPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutIdentityPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidPolicy" => {
return RusotoError::Service(PutIdentityPolicyError::InvalidPolicy(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for PutIdentityPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutIdentityPolicyError {
fn description(&self) -> &str {
match *self {
PutIdentityPolicyError::InvalidPolicy(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ReorderReceiptRuleSetError {
RuleDoesNotExist(String),
RuleSetDoesNotExist(String),
}
impl ReorderReceiptRuleSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ReorderReceiptRuleSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"RuleDoesNotExist" => {
return RusotoError::Service(ReorderReceiptRuleSetError::RuleDoesNotExist(
parsed_error.message,
))
}
"RuleSetDoesNotExist" => {
return RusotoError::Service(
ReorderReceiptRuleSetError::RuleSetDoesNotExist(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ReorderReceiptRuleSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ReorderReceiptRuleSetError {
fn description(&self) -> &str {
match *self {
ReorderReceiptRuleSetError::RuleDoesNotExist(ref cause) => cause,
ReorderReceiptRuleSetError::RuleSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SendBounceError {
MessageRejected(String),
}
impl SendBounceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendBounceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"MessageRejected" => {
return RusotoError::Service(SendBounceError::MessageRejected(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SendBounceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SendBounceError {
fn description(&self) -> &str {
match *self {
SendBounceError::MessageRejected(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SendBulkTemplatedEmailError {
AccountSendingPaused(String),
ConfigurationSetDoesNotExist(String),
ConfigurationSetSendingPaused(String),
MailFromDomainNotVerified(String),
MessageRejected(String),
TemplateDoesNotExist(String),
}
impl SendBulkTemplatedEmailError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendBulkTemplatedEmailError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AccountSendingPausedException" => {
return RusotoError::Service(
SendBulkTemplatedEmailError::AccountSendingPaused(parsed_error.message),
)
}
"ConfigurationSetDoesNotExist" => {
return RusotoError::Service(
SendBulkTemplatedEmailError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
)
}
"ConfigurationSetSendingPausedException" => {
return RusotoError::Service(
SendBulkTemplatedEmailError::ConfigurationSetSendingPaused(
parsed_error.message,
),
)
}
"MailFromDomainNotVerifiedException" => {
return RusotoError::Service(
SendBulkTemplatedEmailError::MailFromDomainNotVerified(
parsed_error.message,
),
)
}
"MessageRejected" => {
return RusotoError::Service(SendBulkTemplatedEmailError::MessageRejected(
parsed_error.message,
))
}
"TemplateDoesNotExist" => {
return RusotoError::Service(
SendBulkTemplatedEmailError::TemplateDoesNotExist(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SendBulkTemplatedEmailError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SendBulkTemplatedEmailError {
fn description(&self) -> &str {
match *self {
SendBulkTemplatedEmailError::AccountSendingPaused(ref cause) => cause,
SendBulkTemplatedEmailError::ConfigurationSetDoesNotExist(ref cause) => cause,
SendBulkTemplatedEmailError::ConfigurationSetSendingPaused(ref cause) => cause,
SendBulkTemplatedEmailError::MailFromDomainNotVerified(ref cause) => cause,
SendBulkTemplatedEmailError::MessageRejected(ref cause) => cause,
SendBulkTemplatedEmailError::TemplateDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SendCustomVerificationEmailError {
ConfigurationSetDoesNotExist(String),
CustomVerificationEmailTemplateDoesNotExist(String),
FromEmailAddressNotVerified(String),
MessageRejected(String),
ProductionAccessNotGranted(String),
}
impl SendCustomVerificationEmailError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<SendCustomVerificationEmailError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => return RusotoError::Service(SendCustomVerificationEmailError::ConfigurationSetDoesNotExist(parsed_error.message)),"CustomVerificationEmailTemplateDoesNotExist" => return RusotoError::Service(SendCustomVerificationEmailError::CustomVerificationEmailTemplateDoesNotExist(parsed_error.message)),"FromEmailAddressNotVerified" => return RusotoError::Service(SendCustomVerificationEmailError::FromEmailAddressNotVerified(parsed_error.message)),"MessageRejected" => return RusotoError::Service(SendCustomVerificationEmailError::MessageRejected(parsed_error.message)),"ProductionAccessNotGranted" => return RusotoError::Service(SendCustomVerificationEmailError::ProductionAccessNotGranted(parsed_error.message)),_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SendCustomVerificationEmailError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SendCustomVerificationEmailError {
fn description(&self) -> &str {
match *self {
SendCustomVerificationEmailError::ConfigurationSetDoesNotExist(ref cause) => cause,
SendCustomVerificationEmailError::CustomVerificationEmailTemplateDoesNotExist(
ref cause,
) => cause,
SendCustomVerificationEmailError::FromEmailAddressNotVerified(ref cause) => cause,
SendCustomVerificationEmailError::MessageRejected(ref cause) => cause,
SendCustomVerificationEmailError::ProductionAccessNotGranted(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SendEmailError {
AccountSendingPaused(String),
ConfigurationSetDoesNotExist(String),
ConfigurationSetSendingPaused(String),
MailFromDomainNotVerified(String),
MessageRejected(String),
}
impl SendEmailError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendEmailError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AccountSendingPausedException" => {
return RusotoError::Service(SendEmailError::AccountSendingPaused(
parsed_error.message,
))
}
"ConfigurationSetDoesNotExist" => {
return RusotoError::Service(SendEmailError::ConfigurationSetDoesNotExist(
parsed_error.message,
))
}
"ConfigurationSetSendingPausedException" => {
return RusotoError::Service(SendEmailError::ConfigurationSetSendingPaused(
parsed_error.message,
))
}
"MailFromDomainNotVerifiedException" => {
return RusotoError::Service(SendEmailError::MailFromDomainNotVerified(
parsed_error.message,
))
}
"MessageRejected" => {
return RusotoError::Service(SendEmailError::MessageRejected(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SendEmailError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SendEmailError {
fn description(&self) -> &str {
match *self {
SendEmailError::AccountSendingPaused(ref cause) => cause,
SendEmailError::ConfigurationSetDoesNotExist(ref cause) => cause,
SendEmailError::ConfigurationSetSendingPaused(ref cause) => cause,
SendEmailError::MailFromDomainNotVerified(ref cause) => cause,
SendEmailError::MessageRejected(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SendRawEmailError {
AccountSendingPaused(String),
ConfigurationSetDoesNotExist(String),
ConfigurationSetSendingPaused(String),
MailFromDomainNotVerified(String),
MessageRejected(String),
}
impl SendRawEmailError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendRawEmailError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AccountSendingPausedException" => {
return RusotoError::Service(SendRawEmailError::AccountSendingPaused(
parsed_error.message,
))
}
"ConfigurationSetDoesNotExist" => {
return RusotoError::Service(
SendRawEmailError::ConfigurationSetDoesNotExist(parsed_error.message),
)
}
"ConfigurationSetSendingPausedException" => {
return RusotoError::Service(
SendRawEmailError::ConfigurationSetSendingPaused(parsed_error.message),
)
}
"MailFromDomainNotVerifiedException" => {
return RusotoError::Service(SendRawEmailError::MailFromDomainNotVerified(
parsed_error.message,
))
}
"MessageRejected" => {
return RusotoError::Service(SendRawEmailError::MessageRejected(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SendRawEmailError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SendRawEmailError {
fn description(&self) -> &str {
match *self {
SendRawEmailError::AccountSendingPaused(ref cause) => cause,
SendRawEmailError::ConfigurationSetDoesNotExist(ref cause) => cause,
SendRawEmailError::ConfigurationSetSendingPaused(ref cause) => cause,
SendRawEmailError::MailFromDomainNotVerified(ref cause) => cause,
SendRawEmailError::MessageRejected(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SendTemplatedEmailError {
AccountSendingPaused(String),
ConfigurationSetDoesNotExist(String),
ConfigurationSetSendingPaused(String),
MailFromDomainNotVerified(String),
MessageRejected(String),
TemplateDoesNotExist(String),
}
impl SendTemplatedEmailError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendTemplatedEmailError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AccountSendingPausedException" => {
return RusotoError::Service(SendTemplatedEmailError::AccountSendingPaused(
parsed_error.message,
))
}
"ConfigurationSetDoesNotExist" => {
return RusotoError::Service(
SendTemplatedEmailError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
)
}
"ConfigurationSetSendingPausedException" => {
return RusotoError::Service(
SendTemplatedEmailError::ConfigurationSetSendingPaused(
parsed_error.message,
),
)
}
"MailFromDomainNotVerifiedException" => {
return RusotoError::Service(
SendTemplatedEmailError::MailFromDomainNotVerified(
parsed_error.message,
),
)
}
"MessageRejected" => {
return RusotoError::Service(SendTemplatedEmailError::MessageRejected(
parsed_error.message,
))
}
"TemplateDoesNotExist" => {
return RusotoError::Service(SendTemplatedEmailError::TemplateDoesNotExist(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SendTemplatedEmailError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SendTemplatedEmailError {
fn description(&self) -> &str {
match *self {
SendTemplatedEmailError::AccountSendingPaused(ref cause) => cause,
SendTemplatedEmailError::ConfigurationSetDoesNotExist(ref cause) => cause,
SendTemplatedEmailError::ConfigurationSetSendingPaused(ref cause) => cause,
SendTemplatedEmailError::MailFromDomainNotVerified(ref cause) => cause,
SendTemplatedEmailError::MessageRejected(ref cause) => cause,
SendTemplatedEmailError::TemplateDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetActiveReceiptRuleSetError {
RuleSetDoesNotExist(String),
}
impl SetActiveReceiptRuleSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetActiveReceiptRuleSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"RuleSetDoesNotExist" => {
return RusotoError::Service(
SetActiveReceiptRuleSetError::RuleSetDoesNotExist(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetActiveReceiptRuleSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetActiveReceiptRuleSetError {
fn description(&self) -> &str {
match *self {
SetActiveReceiptRuleSetError::RuleSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetIdentityDkimEnabledError {}
impl SetIdentityDkimEnabledError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetIdentityDkimEnabledError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetIdentityDkimEnabledError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetIdentityDkimEnabledError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SetIdentityFeedbackForwardingEnabledError {}
impl SetIdentityFeedbackForwardingEnabledError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<SetIdentityFeedbackForwardingEnabledError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetIdentityFeedbackForwardingEnabledError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetIdentityFeedbackForwardingEnabledError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SetIdentityHeadersInNotificationsEnabledError {}
impl SetIdentityHeadersInNotificationsEnabledError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<SetIdentityHeadersInNotificationsEnabledError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetIdentityHeadersInNotificationsEnabledError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetIdentityHeadersInNotificationsEnabledError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SetIdentityMailFromDomainError {}
impl SetIdentityMailFromDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetIdentityMailFromDomainError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetIdentityMailFromDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetIdentityMailFromDomainError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SetIdentityNotificationTopicError {}
impl SetIdentityNotificationTopicError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<SetIdentityNotificationTopicError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetIdentityNotificationTopicError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetIdentityNotificationTopicError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SetReceiptRulePositionError {
RuleDoesNotExist(String),
RuleSetDoesNotExist(String),
}
impl SetReceiptRulePositionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetReceiptRulePositionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"RuleDoesNotExist" => {
return RusotoError::Service(SetReceiptRulePositionError::RuleDoesNotExist(
parsed_error.message,
))
}
"RuleSetDoesNotExist" => {
return RusotoError::Service(
SetReceiptRulePositionError::RuleSetDoesNotExist(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetReceiptRulePositionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetReceiptRulePositionError {
fn description(&self) -> &str {
match *self {
SetReceiptRulePositionError::RuleDoesNotExist(ref cause) => cause,
SetReceiptRulePositionError::RuleSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TestRenderTemplateError {
InvalidRenderingParameter(String),
MissingRenderingAttribute(String),
TemplateDoesNotExist(String),
}
impl TestRenderTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TestRenderTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidRenderingParameter" => {
return RusotoError::Service(
TestRenderTemplateError::InvalidRenderingParameter(
parsed_error.message,
),
)
}
"MissingRenderingAttribute" => {
return RusotoError::Service(
TestRenderTemplateError::MissingRenderingAttribute(
parsed_error.message,
),
)
}
"TemplateDoesNotExist" => {
return RusotoError::Service(TestRenderTemplateError::TemplateDoesNotExist(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for TestRenderTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TestRenderTemplateError {
fn description(&self) -> &str {
match *self {
TestRenderTemplateError::InvalidRenderingParameter(ref cause) => cause,
TestRenderTemplateError::MissingRenderingAttribute(ref cause) => cause,
TestRenderTemplateError::TemplateDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAccountSendingEnabledError {}
impl UpdateAccountSendingEnabledError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateAccountSendingEnabledError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateAccountSendingEnabledError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAccountSendingEnabledError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConfigurationSetEventDestinationError {
ConfigurationSetDoesNotExist(String),
EventDestinationDoesNotExist(String),
InvalidCloudWatchDestination(String),
InvalidFirehoseDestination(String),
InvalidSNSDestination(String),
}
impl UpdateConfigurationSetEventDestinationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateConfigurationSetEventDestinationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => return RusotoError::Service(
UpdateConfigurationSetEventDestinationError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
),
"EventDestinationDoesNotExist" => return RusotoError::Service(
UpdateConfigurationSetEventDestinationError::EventDestinationDoesNotExist(
parsed_error.message,
),
),
"InvalidCloudWatchDestination" => return RusotoError::Service(
UpdateConfigurationSetEventDestinationError::InvalidCloudWatchDestination(
parsed_error.message,
),
),
"InvalidFirehoseDestination" => {
return RusotoError::Service(
UpdateConfigurationSetEventDestinationError::InvalidFirehoseDestination(
parsed_error.message,
),
)
}
"InvalidSNSDestination" => {
return RusotoError::Service(
UpdateConfigurationSetEventDestinationError::InvalidSNSDestination(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateConfigurationSetEventDestinationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateConfigurationSetEventDestinationError {
fn description(&self) -> &str {
match *self {
UpdateConfigurationSetEventDestinationError::ConfigurationSetDoesNotExist(
ref cause,
) => cause,
UpdateConfigurationSetEventDestinationError::EventDestinationDoesNotExist(
ref cause,
) => cause,
UpdateConfigurationSetEventDestinationError::InvalidCloudWatchDestination(
ref cause,
) => cause,
UpdateConfigurationSetEventDestinationError::InvalidFirehoseDestination(ref cause) => {
cause
}
UpdateConfigurationSetEventDestinationError::InvalidSNSDestination(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConfigurationSetReputationMetricsEnabledError {
ConfigurationSetDoesNotExist(String),
}
impl UpdateConfigurationSetReputationMetricsEnabledError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateConfigurationSetReputationMetricsEnabledError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => return RusotoError::Service(UpdateConfigurationSetReputationMetricsEnabledError::ConfigurationSetDoesNotExist(parsed_error.message)),_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateConfigurationSetReputationMetricsEnabledError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateConfigurationSetReputationMetricsEnabledError {
fn description(&self) -> &str {
match *self {
UpdateConfigurationSetReputationMetricsEnabledError::ConfigurationSetDoesNotExist(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConfigurationSetSendingEnabledError {
ConfigurationSetDoesNotExist(String),
}
impl UpdateConfigurationSetSendingEnabledError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateConfigurationSetSendingEnabledError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => {
return RusotoError::Service(
UpdateConfigurationSetSendingEnabledError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateConfigurationSetSendingEnabledError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateConfigurationSetSendingEnabledError {
fn description(&self) -> &str {
match *self {
UpdateConfigurationSetSendingEnabledError::ConfigurationSetDoesNotExist(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConfigurationSetTrackingOptionsError {
ConfigurationSetDoesNotExist(String),
InvalidTrackingOptions(String),
TrackingOptionsDoesNotExist(String),
}
impl UpdateConfigurationSetTrackingOptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateConfigurationSetTrackingOptionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConfigurationSetDoesNotExist" => return RusotoError::Service(
UpdateConfigurationSetTrackingOptionsError::ConfigurationSetDoesNotExist(
parsed_error.message,
),
),
"InvalidTrackingOptions" => {
return RusotoError::Service(
UpdateConfigurationSetTrackingOptionsError::InvalidTrackingOptions(
parsed_error.message,
),
)
}
"TrackingOptionsDoesNotExistException" => {
return RusotoError::Service(
UpdateConfigurationSetTrackingOptionsError::TrackingOptionsDoesNotExist(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateConfigurationSetTrackingOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateConfigurationSetTrackingOptionsError {
fn description(&self) -> &str {
match *self {
UpdateConfigurationSetTrackingOptionsError::ConfigurationSetDoesNotExist(ref cause) => {
cause
}
UpdateConfigurationSetTrackingOptionsError::InvalidTrackingOptions(ref cause) => cause,
UpdateConfigurationSetTrackingOptionsError::TrackingOptionsDoesNotExist(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateCustomVerificationEmailTemplateError {
CustomVerificationEmailInvalidContent(String),
CustomVerificationEmailTemplateDoesNotExist(String),
FromEmailAddressNotVerified(String),
}
impl UpdateCustomVerificationEmailTemplateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateCustomVerificationEmailTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"CustomVerificationEmailInvalidContent" => return RusotoError::Service(UpdateCustomVerificationEmailTemplateError::CustomVerificationEmailInvalidContent(parsed_error.message)),"CustomVerificationEmailTemplateDoesNotExist" => return RusotoError::Service(UpdateCustomVerificationEmailTemplateError::CustomVerificationEmailTemplateDoesNotExist(parsed_error.message)),"FromEmailAddressNotVerified" => return RusotoError::Service(UpdateCustomVerificationEmailTemplateError::FromEmailAddressNotVerified(parsed_error.message)),_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateCustomVerificationEmailTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateCustomVerificationEmailTemplateError {
fn description(&self) -> &str {
match *self {
UpdateCustomVerificationEmailTemplateError::CustomVerificationEmailInvalidContent(ref cause) => cause,
UpdateCustomVerificationEmailTemplateError::CustomVerificationEmailTemplateDoesNotExist(ref cause) => cause,
UpdateCustomVerificationEmailTemplateError::FromEmailAddressNotVerified(ref cause) => cause
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateReceiptRuleError {
InvalidLambdaFunction(String),
InvalidS3Configuration(String),
InvalidSnsTopic(String),
LimitExceeded(String),
RuleDoesNotExist(String),
RuleSetDoesNotExist(String),
}
impl UpdateReceiptRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateReceiptRuleError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidLambdaFunction" => {
return RusotoError::Service(UpdateReceiptRuleError::InvalidLambdaFunction(
parsed_error.message,
))
}
"InvalidS3Configuration" => {
return RusotoError::Service(
UpdateReceiptRuleError::InvalidS3Configuration(parsed_error.message),
)
}
"InvalidSnsTopic" => {
return RusotoError::Service(UpdateReceiptRuleError::InvalidSnsTopic(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(UpdateReceiptRuleError::LimitExceeded(
parsed_error.message,
))
}
"RuleDoesNotExist" => {
return RusotoError::Service(UpdateReceiptRuleError::RuleDoesNotExist(
parsed_error.message,
))
}
"RuleSetDoesNotExist" => {
return RusotoError::Service(UpdateReceiptRuleError::RuleSetDoesNotExist(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateReceiptRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateReceiptRuleError {
fn description(&self) -> &str {
match *self {
UpdateReceiptRuleError::InvalidLambdaFunction(ref cause) => cause,
UpdateReceiptRuleError::InvalidS3Configuration(ref cause) => cause,
UpdateReceiptRuleError::InvalidSnsTopic(ref cause) => cause,
UpdateReceiptRuleError::LimitExceeded(ref cause) => cause,
UpdateReceiptRuleError::RuleDoesNotExist(ref cause) => cause,
UpdateReceiptRuleError::RuleSetDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateTemplateError {
InvalidTemplate(String),
TemplateDoesNotExist(String),
}
impl UpdateTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidTemplate" => {
return RusotoError::Service(UpdateTemplateError::InvalidTemplate(
parsed_error.message,
))
}
"TemplateDoesNotExist" => {
return RusotoError::Service(UpdateTemplateError::TemplateDoesNotExist(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateTemplateError {
fn description(&self) -> &str {
match *self {
UpdateTemplateError::InvalidTemplate(ref cause) => cause,
UpdateTemplateError::TemplateDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum VerifyDomainDkimError {}
impl VerifyDomainDkimError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<VerifyDomainDkimError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for VerifyDomainDkimError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for VerifyDomainDkimError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum VerifyDomainIdentityError {}
impl VerifyDomainIdentityError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<VerifyDomainIdentityError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for VerifyDomainIdentityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for VerifyDomainIdentityError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum VerifyEmailAddressError {}
impl VerifyEmailAddressError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<VerifyEmailAddressError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for VerifyEmailAddressError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for VerifyEmailAddressError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum VerifyEmailIdentityError {}
impl VerifyEmailIdentityError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<VerifyEmailIdentityError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for VerifyEmailIdentityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for VerifyEmailIdentityError {
fn description(&self) -> &str {
match *self {}
}
}
pub trait Ses {
fn clone_receipt_rule_set(
&self,
input: CloneReceiptRuleSetRequest,
) -> RusotoFuture<CloneReceiptRuleSetResponse, CloneReceiptRuleSetError>;
fn create_configuration_set(
&self,
input: CreateConfigurationSetRequest,
) -> RusotoFuture<CreateConfigurationSetResponse, CreateConfigurationSetError>;
fn create_configuration_set_event_destination(
&self,
input: CreateConfigurationSetEventDestinationRequest,
) -> RusotoFuture<
CreateConfigurationSetEventDestinationResponse,
CreateConfigurationSetEventDestinationError,
>;
fn create_configuration_set_tracking_options(
&self,
input: CreateConfigurationSetTrackingOptionsRequest,
) -> RusotoFuture<
CreateConfigurationSetTrackingOptionsResponse,
CreateConfigurationSetTrackingOptionsError,
>;
fn create_custom_verification_email_template(
&self,
input: CreateCustomVerificationEmailTemplateRequest,
) -> RusotoFuture<(), CreateCustomVerificationEmailTemplateError>;
fn create_receipt_filter(
&self,
input: CreateReceiptFilterRequest,
) -> RusotoFuture<CreateReceiptFilterResponse, CreateReceiptFilterError>;
fn create_receipt_rule(
&self,
input: CreateReceiptRuleRequest,
) -> RusotoFuture<CreateReceiptRuleResponse, CreateReceiptRuleError>;
fn create_receipt_rule_set(
&self,
input: CreateReceiptRuleSetRequest,
) -> RusotoFuture<CreateReceiptRuleSetResponse, CreateReceiptRuleSetError>;
fn create_template(
&self,
input: CreateTemplateRequest,
) -> RusotoFuture<CreateTemplateResponse, CreateTemplateError>;
fn delete_configuration_set(
&self,
input: DeleteConfigurationSetRequest,
) -> RusotoFuture<DeleteConfigurationSetResponse, DeleteConfigurationSetError>;
fn delete_configuration_set_event_destination(
&self,
input: DeleteConfigurationSetEventDestinationRequest,
) -> RusotoFuture<
DeleteConfigurationSetEventDestinationResponse,
DeleteConfigurationSetEventDestinationError,
>;
fn delete_configuration_set_tracking_options(
&self,
input: DeleteConfigurationSetTrackingOptionsRequest,
) -> RusotoFuture<
DeleteConfigurationSetTrackingOptionsResponse,
DeleteConfigurationSetTrackingOptionsError,
>;
fn delete_custom_verification_email_template(
&self,
input: DeleteCustomVerificationEmailTemplateRequest,
) -> RusotoFuture<(), DeleteCustomVerificationEmailTemplateError>;
fn delete_identity(
&self,
input: DeleteIdentityRequest,
) -> RusotoFuture<DeleteIdentityResponse, DeleteIdentityError>;
fn delete_identity_policy(
&self,
input: DeleteIdentityPolicyRequest,
) -> RusotoFuture<DeleteIdentityPolicyResponse, DeleteIdentityPolicyError>;
fn delete_receipt_filter(
&self,
input: DeleteReceiptFilterRequest,
) -> RusotoFuture<DeleteReceiptFilterResponse, DeleteReceiptFilterError>;
fn delete_receipt_rule(
&self,
input: DeleteReceiptRuleRequest,
) -> RusotoFuture<DeleteReceiptRuleResponse, DeleteReceiptRuleError>;
fn delete_receipt_rule_set(
&self,
input: DeleteReceiptRuleSetRequest,
) -> RusotoFuture<DeleteReceiptRuleSetResponse, DeleteReceiptRuleSetError>;
fn delete_template(
&self,
input: DeleteTemplateRequest,
) -> RusotoFuture<DeleteTemplateResponse, DeleteTemplateError>;
fn delete_verified_email_address(
&self,
input: DeleteVerifiedEmailAddressRequest,
) -> RusotoFuture<(), DeleteVerifiedEmailAddressError>;
fn describe_active_receipt_rule_set(
&self,
input: DescribeActiveReceiptRuleSetRequest,
) -> RusotoFuture<DescribeActiveReceiptRuleSetResponse, DescribeActiveReceiptRuleSetError>;
fn describe_configuration_set(
&self,
input: DescribeConfigurationSetRequest,
) -> RusotoFuture<DescribeConfigurationSetResponse, DescribeConfigurationSetError>;
fn describe_receipt_rule(
&self,
input: DescribeReceiptRuleRequest,
) -> RusotoFuture<DescribeReceiptRuleResponse, DescribeReceiptRuleError>;
fn describe_receipt_rule_set(
&self,
input: DescribeReceiptRuleSetRequest,
) -> RusotoFuture<DescribeReceiptRuleSetResponse, DescribeReceiptRuleSetError>;
fn get_account_sending_enabled(
&self,
) -> RusotoFuture<GetAccountSendingEnabledResponse, GetAccountSendingEnabledError>;
fn get_custom_verification_email_template(
&self,
input: GetCustomVerificationEmailTemplateRequest,
) -> RusotoFuture<
GetCustomVerificationEmailTemplateResponse,
GetCustomVerificationEmailTemplateError,
>;
fn get_identity_dkim_attributes(
&self,
input: GetIdentityDkimAttributesRequest,
) -> RusotoFuture<GetIdentityDkimAttributesResponse, GetIdentityDkimAttributesError>;
fn get_identity_mail_from_domain_attributes(
&self,
input: GetIdentityMailFromDomainAttributesRequest,
) -> RusotoFuture<
GetIdentityMailFromDomainAttributesResponse,
GetIdentityMailFromDomainAttributesError,
>;
fn get_identity_notification_attributes(
&self,
input: GetIdentityNotificationAttributesRequest,
) -> RusotoFuture<
GetIdentityNotificationAttributesResponse,
GetIdentityNotificationAttributesError,
>;
fn get_identity_policies(
&self,
input: GetIdentityPoliciesRequest,
) -> RusotoFuture<GetIdentityPoliciesResponse, GetIdentityPoliciesError>;
fn get_identity_verification_attributes(
&self,
input: GetIdentityVerificationAttributesRequest,
) -> RusotoFuture<
GetIdentityVerificationAttributesResponse,
GetIdentityVerificationAttributesError,
>;
fn get_send_quota(&self) -> RusotoFuture<GetSendQuotaResponse, GetSendQuotaError>;
fn get_send_statistics(
&self,
) -> RusotoFuture<GetSendStatisticsResponse, GetSendStatisticsError>;
fn get_template(
&self,
input: GetTemplateRequest,
) -> RusotoFuture<GetTemplateResponse, GetTemplateError>;
fn list_configuration_sets(
&self,
input: ListConfigurationSetsRequest,
) -> RusotoFuture<ListConfigurationSetsResponse, ListConfigurationSetsError>;
fn list_custom_verification_email_templates(
&self,
input: ListCustomVerificationEmailTemplatesRequest,
) -> RusotoFuture<
ListCustomVerificationEmailTemplatesResponse,
ListCustomVerificationEmailTemplatesError,
>;
fn list_identities(
&self,
input: ListIdentitiesRequest,
) -> RusotoFuture<ListIdentitiesResponse, ListIdentitiesError>;
fn list_identity_policies(
&self,
input: ListIdentityPoliciesRequest,
) -> RusotoFuture<ListIdentityPoliciesResponse, ListIdentityPoliciesError>;
fn list_receipt_filters(
&self,
input: ListReceiptFiltersRequest,
) -> RusotoFuture<ListReceiptFiltersResponse, ListReceiptFiltersError>;
fn list_receipt_rule_sets(
&self,
input: ListReceiptRuleSetsRequest,
) -> RusotoFuture<ListReceiptRuleSetsResponse, ListReceiptRuleSetsError>;
fn list_templates(
&self,
input: ListTemplatesRequest,
) -> RusotoFuture<ListTemplatesResponse, ListTemplatesError>;
fn list_verified_email_addresses(
&self,
) -> RusotoFuture<ListVerifiedEmailAddressesResponse, ListVerifiedEmailAddressesError>;
fn put_configuration_set_delivery_options(
&self,
input: PutConfigurationSetDeliveryOptionsRequest,
) -> RusotoFuture<
PutConfigurationSetDeliveryOptionsResponse,
PutConfigurationSetDeliveryOptionsError,
>;
fn put_identity_policy(
&self,
input: PutIdentityPolicyRequest,
) -> RusotoFuture<PutIdentityPolicyResponse, PutIdentityPolicyError>;
fn reorder_receipt_rule_set(
&self,
input: ReorderReceiptRuleSetRequest,
) -> RusotoFuture<ReorderReceiptRuleSetResponse, ReorderReceiptRuleSetError>;
fn send_bounce(
&self,
input: SendBounceRequest,
) -> RusotoFuture<SendBounceResponse, SendBounceError>;
fn send_bulk_templated_email(
&self,
input: SendBulkTemplatedEmailRequest,
) -> RusotoFuture<SendBulkTemplatedEmailResponse, SendBulkTemplatedEmailError>;
fn send_custom_verification_email(
&self,
input: SendCustomVerificationEmailRequest,
) -> RusotoFuture<SendCustomVerificationEmailResponse, SendCustomVerificationEmailError>;
fn send_email(
&self,
input: SendEmailRequest,
) -> RusotoFuture<SendEmailResponse, SendEmailError>;
fn send_raw_email(
&self,
input: SendRawEmailRequest,
) -> RusotoFuture<SendRawEmailResponse, SendRawEmailError>;
fn send_templated_email(
&self,
input: SendTemplatedEmailRequest,
) -> RusotoFuture<SendTemplatedEmailResponse, SendTemplatedEmailError>;
fn set_active_receipt_rule_set(
&self,
input: SetActiveReceiptRuleSetRequest,
) -> RusotoFuture<SetActiveReceiptRuleSetResponse, SetActiveReceiptRuleSetError>;
fn set_identity_dkim_enabled(
&self,
input: SetIdentityDkimEnabledRequest,
) -> RusotoFuture<SetIdentityDkimEnabledResponse, SetIdentityDkimEnabledError>;
fn set_identity_feedback_forwarding_enabled(
&self,
input: SetIdentityFeedbackForwardingEnabledRequest,
) -> RusotoFuture<
SetIdentityFeedbackForwardingEnabledResponse,
SetIdentityFeedbackForwardingEnabledError,
>;
fn set_identity_headers_in_notifications_enabled(
&self,
input: SetIdentityHeadersInNotificationsEnabledRequest,
) -> RusotoFuture<
SetIdentityHeadersInNotificationsEnabledResponse,
SetIdentityHeadersInNotificationsEnabledError,
>;
fn set_identity_mail_from_domain(
&self,
input: SetIdentityMailFromDomainRequest,
) -> RusotoFuture<SetIdentityMailFromDomainResponse, SetIdentityMailFromDomainError>;
fn set_identity_notification_topic(
&self,
input: SetIdentityNotificationTopicRequest,
) -> RusotoFuture<SetIdentityNotificationTopicResponse, SetIdentityNotificationTopicError>;
fn set_receipt_rule_position(
&self,
input: SetReceiptRulePositionRequest,
) -> RusotoFuture<SetReceiptRulePositionResponse, SetReceiptRulePositionError>;
fn test_render_template(
&self,
input: TestRenderTemplateRequest,
) -> RusotoFuture<TestRenderTemplateResponse, TestRenderTemplateError>;
fn update_account_sending_enabled(
&self,
input: UpdateAccountSendingEnabledRequest,
) -> RusotoFuture<(), UpdateAccountSendingEnabledError>;
fn update_configuration_set_event_destination(
&self,
input: UpdateConfigurationSetEventDestinationRequest,
) -> RusotoFuture<
UpdateConfigurationSetEventDestinationResponse,
UpdateConfigurationSetEventDestinationError,
>;
fn update_configuration_set_reputation_metrics_enabled(
&self,
input: UpdateConfigurationSetReputationMetricsEnabledRequest,
) -> RusotoFuture<(), UpdateConfigurationSetReputationMetricsEnabledError>;
fn update_configuration_set_sending_enabled(
&self,
input: UpdateConfigurationSetSendingEnabledRequest,
) -> RusotoFuture<(), UpdateConfigurationSetSendingEnabledError>;
fn update_configuration_set_tracking_options(
&self,
input: UpdateConfigurationSetTrackingOptionsRequest,
) -> RusotoFuture<
UpdateConfigurationSetTrackingOptionsResponse,
UpdateConfigurationSetTrackingOptionsError,
>;
fn update_custom_verification_email_template(
&self,
input: UpdateCustomVerificationEmailTemplateRequest,
) -> RusotoFuture<(), UpdateCustomVerificationEmailTemplateError>;
fn update_receipt_rule(
&self,
input: UpdateReceiptRuleRequest,
) -> RusotoFuture<UpdateReceiptRuleResponse, UpdateReceiptRuleError>;
fn update_template(
&self,
input: UpdateTemplateRequest,
) -> RusotoFuture<UpdateTemplateResponse, UpdateTemplateError>;
fn verify_domain_dkim(
&self,
input: VerifyDomainDkimRequest,
) -> RusotoFuture<VerifyDomainDkimResponse, VerifyDomainDkimError>;
fn verify_domain_identity(
&self,
input: VerifyDomainIdentityRequest,
) -> RusotoFuture<VerifyDomainIdentityResponse, VerifyDomainIdentityError>;
fn verify_email_address(
&self,
input: VerifyEmailAddressRequest,
) -> RusotoFuture<(), VerifyEmailAddressError>;
fn verify_email_identity(
&self,
input: VerifyEmailIdentityRequest,
) -> RusotoFuture<VerifyEmailIdentityResponse, VerifyEmailIdentityError>;
}
#[derive(Clone)]
pub struct SesClient {
client: Client,
region: region::Region,
}
impl SesClient {
pub fn new(region: region::Region) -> SesClient {
SesClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> SesClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
SesClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Ses for SesClient {
fn clone_receipt_rule_set(
&self,
input: CloneReceiptRuleSetRequest,
) -> RusotoFuture<CloneReceiptRuleSetResponse, CloneReceiptRuleSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CloneReceiptRuleSet");
params.put("Version", "2010-12-01");
CloneReceiptRuleSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(CloneReceiptRuleSetError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CloneReceiptRuleSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CloneReceiptRuleSetResponseDeserializer::deserialize(
"CloneReceiptRuleSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_configuration_set(
&self,
input: CreateConfigurationSetRequest,
) -> RusotoFuture<CreateConfigurationSetResponse, CreateConfigurationSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateConfigurationSet");
params.put("Version", "2010-12-01");
CreateConfigurationSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateConfigurationSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateConfigurationSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateConfigurationSetResponseDeserializer::deserialize(
"CreateConfigurationSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_configuration_set_event_destination(
&self,
input: CreateConfigurationSetEventDestinationRequest,
) -> RusotoFuture<
CreateConfigurationSetEventDestinationResponse,
CreateConfigurationSetEventDestinationError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateConfigurationSetEventDestination");
params.put("Version", "2010-12-01");
CreateConfigurationSetEventDestinationRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateConfigurationSetEventDestinationError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateConfigurationSetEventDestinationResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
CreateConfigurationSetEventDestinationResponseDeserializer::deserialize(
"CreateConfigurationSetEventDestinationResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_configuration_set_tracking_options(
&self,
input: CreateConfigurationSetTrackingOptionsRequest,
) -> RusotoFuture<
CreateConfigurationSetTrackingOptionsResponse,
CreateConfigurationSetTrackingOptionsError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateConfigurationSetTrackingOptions");
params.put("Version", "2010-12-01");
CreateConfigurationSetTrackingOptionsRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateConfigurationSetTrackingOptionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateConfigurationSetTrackingOptionsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
CreateConfigurationSetTrackingOptionsResponseDeserializer::deserialize(
"CreateConfigurationSetTrackingOptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_custom_verification_email_template(
&self,
input: CreateCustomVerificationEmailTemplateRequest,
) -> RusotoFuture<(), CreateCustomVerificationEmailTemplateError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateCustomVerificationEmailTemplate");
params.put("Version", "2010-12-01");
CreateCustomVerificationEmailTemplateRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateCustomVerificationEmailTemplateError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn create_receipt_filter(
&self,
input: CreateReceiptFilterRequest,
) -> RusotoFuture<CreateReceiptFilterResponse, CreateReceiptFilterError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateReceiptFilter");
params.put("Version", "2010-12-01");
CreateReceiptFilterRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateReceiptFilterError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateReceiptFilterResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateReceiptFilterResponseDeserializer::deserialize(
"CreateReceiptFilterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_receipt_rule(
&self,
input: CreateReceiptRuleRequest,
) -> RusotoFuture<CreateReceiptRuleResponse, CreateReceiptRuleError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateReceiptRule");
params.put("Version", "2010-12-01");
CreateReceiptRuleRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateReceiptRuleError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateReceiptRuleResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateReceiptRuleResponseDeserializer::deserialize(
"CreateReceiptRuleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_receipt_rule_set(
&self,
input: CreateReceiptRuleSetRequest,
) -> RusotoFuture<CreateReceiptRuleSetResponse, CreateReceiptRuleSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateReceiptRuleSet");
params.put("Version", "2010-12-01");
CreateReceiptRuleSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateReceiptRuleSetError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateReceiptRuleSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateReceiptRuleSetResponseDeserializer::deserialize(
"CreateReceiptRuleSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_template(
&self,
input: CreateTemplateRequest,
) -> RusotoFuture<CreateTemplateResponse, CreateTemplateError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateTemplate");
params.put("Version", "2010-12-01");
CreateTemplateRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateTemplateError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateTemplateResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateTemplateResponseDeserializer::deserialize(
"CreateTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_configuration_set(
&self,
input: DeleteConfigurationSetRequest,
) -> RusotoFuture<DeleteConfigurationSetResponse, DeleteConfigurationSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteConfigurationSet");
params.put("Version", "2010-12-01");
DeleteConfigurationSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteConfigurationSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteConfigurationSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteConfigurationSetResponseDeserializer::deserialize(
"DeleteConfigurationSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_configuration_set_event_destination(
&self,
input: DeleteConfigurationSetEventDestinationRequest,
) -> RusotoFuture<
DeleteConfigurationSetEventDestinationResponse,
DeleteConfigurationSetEventDestinationError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteConfigurationSetEventDestination");
params.put("Version", "2010-12-01");
DeleteConfigurationSetEventDestinationRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteConfigurationSetEventDestinationError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteConfigurationSetEventDestinationResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
DeleteConfigurationSetEventDestinationResponseDeserializer::deserialize(
"DeleteConfigurationSetEventDestinationResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_configuration_set_tracking_options(
&self,
input: DeleteConfigurationSetTrackingOptionsRequest,
) -> RusotoFuture<
DeleteConfigurationSetTrackingOptionsResponse,
DeleteConfigurationSetTrackingOptionsError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteConfigurationSetTrackingOptions");
params.put("Version", "2010-12-01");
DeleteConfigurationSetTrackingOptionsRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteConfigurationSetTrackingOptionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteConfigurationSetTrackingOptionsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
DeleteConfigurationSetTrackingOptionsResponseDeserializer::deserialize(
"DeleteConfigurationSetTrackingOptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_custom_verification_email_template(
&self,
input: DeleteCustomVerificationEmailTemplateRequest,
) -> RusotoFuture<(), DeleteCustomVerificationEmailTemplateError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteCustomVerificationEmailTemplate");
params.put("Version", "2010-12-01");
DeleteCustomVerificationEmailTemplateRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteCustomVerificationEmailTemplateError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_identity(
&self,
input: DeleteIdentityRequest,
) -> RusotoFuture<DeleteIdentityResponse, DeleteIdentityError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteIdentity");
params.put("Version", "2010-12-01");
DeleteIdentityRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteIdentityError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteIdentityResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteIdentityResponseDeserializer::deserialize(
"DeleteIdentityResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_identity_policy(
&self,
input: DeleteIdentityPolicyRequest,
) -> RusotoFuture<DeleteIdentityPolicyResponse, DeleteIdentityPolicyError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteIdentityPolicy");
params.put("Version", "2010-12-01");
DeleteIdentityPolicyRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteIdentityPolicyError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteIdentityPolicyResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteIdentityPolicyResponseDeserializer::deserialize(
"DeleteIdentityPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_receipt_filter(
&self,
input: DeleteReceiptFilterRequest,
) -> RusotoFuture<DeleteReceiptFilterResponse, DeleteReceiptFilterError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteReceiptFilter");
params.put("Version", "2010-12-01");
DeleteReceiptFilterRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteReceiptFilterError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteReceiptFilterResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteReceiptFilterResponseDeserializer::deserialize(
"DeleteReceiptFilterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_receipt_rule(
&self,
input: DeleteReceiptRuleRequest,
) -> RusotoFuture<DeleteReceiptRuleResponse, DeleteReceiptRuleError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteReceiptRule");
params.put("Version", "2010-12-01");
DeleteReceiptRuleRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteReceiptRuleError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteReceiptRuleResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteReceiptRuleResponseDeserializer::deserialize(
"DeleteReceiptRuleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_receipt_rule_set(
&self,
input: DeleteReceiptRuleSetRequest,
) -> RusotoFuture<DeleteReceiptRuleSetResponse, DeleteReceiptRuleSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteReceiptRuleSet");
params.put("Version", "2010-12-01");
DeleteReceiptRuleSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteReceiptRuleSetError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteReceiptRuleSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteReceiptRuleSetResponseDeserializer::deserialize(
"DeleteReceiptRuleSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_template(
&self,
input: DeleteTemplateRequest,
) -> RusotoFuture<DeleteTemplateResponse, DeleteTemplateError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteTemplate");
params.put("Version", "2010-12-01");
DeleteTemplateRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteTemplateError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteTemplateResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteTemplateResponseDeserializer::deserialize(
"DeleteTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_verified_email_address(
&self,
input: DeleteVerifiedEmailAddressRequest,
) -> RusotoFuture<(), DeleteVerifiedEmailAddressError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteVerifiedEmailAddress");
params.put("Version", "2010-12-01");
DeleteVerifiedEmailAddressRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteVerifiedEmailAddressError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn describe_active_receipt_rule_set(
&self,
input: DescribeActiveReceiptRuleSetRequest,
) -> RusotoFuture<DescribeActiveReceiptRuleSetResponse, DescribeActiveReceiptRuleSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeActiveReceiptRuleSet");
params.put("Version", "2010-12-01");
DescribeActiveReceiptRuleSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeActiveReceiptRuleSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeActiveReceiptRuleSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeActiveReceiptRuleSetResponseDeserializer::deserialize(
"DescribeActiveReceiptRuleSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_configuration_set(
&self,
input: DescribeConfigurationSetRequest,
) -> RusotoFuture<DescribeConfigurationSetResponse, DescribeConfigurationSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeConfigurationSet");
params.put("Version", "2010-12-01");
DescribeConfigurationSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeConfigurationSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeConfigurationSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeConfigurationSetResponseDeserializer::deserialize(
"DescribeConfigurationSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_receipt_rule(
&self,
input: DescribeReceiptRuleRequest,
) -> RusotoFuture<DescribeReceiptRuleResponse, DescribeReceiptRuleError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeReceiptRule");
params.put("Version", "2010-12-01");
DescribeReceiptRuleRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeReceiptRuleError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeReceiptRuleResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeReceiptRuleResponseDeserializer::deserialize(
"DescribeReceiptRuleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_receipt_rule_set(
&self,
input: DescribeReceiptRuleSetRequest,
) -> RusotoFuture<DescribeReceiptRuleSetResponse, DescribeReceiptRuleSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeReceiptRuleSet");
params.put("Version", "2010-12-01");
DescribeReceiptRuleSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeReceiptRuleSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeReceiptRuleSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeReceiptRuleSetResponseDeserializer::deserialize(
"DescribeReceiptRuleSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_account_sending_enabled(
&self,
) -> RusotoFuture<GetAccountSendingEnabledResponse, GetAccountSendingEnabledError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetAccountSendingEnabled");
params.put("Version", "2010-12-01");
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetAccountSendingEnabledError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetAccountSendingEnabledResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetAccountSendingEnabledResponseDeserializer::deserialize(
"GetAccountSendingEnabledResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_custom_verification_email_template(
&self,
input: GetCustomVerificationEmailTemplateRequest,
) -> RusotoFuture<
GetCustomVerificationEmailTemplateResponse,
GetCustomVerificationEmailTemplateError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetCustomVerificationEmailTemplate");
params.put("Version", "2010-12-01");
GetCustomVerificationEmailTemplateRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetCustomVerificationEmailTemplateError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetCustomVerificationEmailTemplateResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetCustomVerificationEmailTemplateResponseDeserializer::deserialize(
"GetCustomVerificationEmailTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_identity_dkim_attributes(
&self,
input: GetIdentityDkimAttributesRequest,
) -> RusotoFuture<GetIdentityDkimAttributesResponse, GetIdentityDkimAttributesError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetIdentityDkimAttributes");
params.put("Version", "2010-12-01");
GetIdentityDkimAttributesRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetIdentityDkimAttributesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetIdentityDkimAttributesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetIdentityDkimAttributesResponseDeserializer::deserialize(
"GetIdentityDkimAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_identity_mail_from_domain_attributes(
&self,
input: GetIdentityMailFromDomainAttributesRequest,
) -> RusotoFuture<
GetIdentityMailFromDomainAttributesResponse,
GetIdentityMailFromDomainAttributesError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetIdentityMailFromDomainAttributes");
params.put("Version", "2010-12-01");
GetIdentityMailFromDomainAttributesRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetIdentityMailFromDomainAttributesError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetIdentityMailFromDomainAttributesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetIdentityMailFromDomainAttributesResponseDeserializer::deserialize(
"GetIdentityMailFromDomainAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_identity_notification_attributes(
&self,
input: GetIdentityNotificationAttributesRequest,
) -> RusotoFuture<
GetIdentityNotificationAttributesResponse,
GetIdentityNotificationAttributesError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetIdentityNotificationAttributes");
params.put("Version", "2010-12-01");
GetIdentityNotificationAttributesRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetIdentityNotificationAttributesError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetIdentityNotificationAttributesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetIdentityNotificationAttributesResponseDeserializer::deserialize(
"GetIdentityNotificationAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_identity_policies(
&self,
input: GetIdentityPoliciesRequest,
) -> RusotoFuture<GetIdentityPoliciesResponse, GetIdentityPoliciesError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetIdentityPolicies");
params.put("Version", "2010-12-01");
GetIdentityPoliciesRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetIdentityPoliciesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetIdentityPoliciesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetIdentityPoliciesResponseDeserializer::deserialize(
"GetIdentityPoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_identity_verification_attributes(
&self,
input: GetIdentityVerificationAttributesRequest,
) -> RusotoFuture<
GetIdentityVerificationAttributesResponse,
GetIdentityVerificationAttributesError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetIdentityVerificationAttributes");
params.put("Version", "2010-12-01");
GetIdentityVerificationAttributesRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetIdentityVerificationAttributesError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetIdentityVerificationAttributesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetIdentityVerificationAttributesResponseDeserializer::deserialize(
"GetIdentityVerificationAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_send_quota(&self) -> RusotoFuture<GetSendQuotaResponse, GetSendQuotaError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetSendQuota");
params.put("Version", "2010-12-01");
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSendQuotaError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetSendQuotaResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetSendQuotaResponseDeserializer::deserialize(
"GetSendQuotaResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_send_statistics(
&self,
) -> RusotoFuture<GetSendStatisticsResponse, GetSendStatisticsError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetSendStatistics");
params.put("Version", "2010-12-01");
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSendStatisticsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetSendStatisticsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetSendStatisticsResponseDeserializer::deserialize(
"GetSendStatisticsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_template(
&self,
input: GetTemplateRequest,
) -> RusotoFuture<GetTemplateResponse, GetTemplateError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetTemplate");
params.put("Version", "2010-12-01");
GetTemplateRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetTemplateError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetTemplateResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = GetTemplateResponseDeserializer::deserialize(
"GetTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_configuration_sets(
&self,
input: ListConfigurationSetsRequest,
) -> RusotoFuture<ListConfigurationSetsResponse, ListConfigurationSetsError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListConfigurationSets");
params.put("Version", "2010-12-01");
ListConfigurationSetsRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListConfigurationSetsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListConfigurationSetsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListConfigurationSetsResponseDeserializer::deserialize(
"ListConfigurationSetsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_custom_verification_email_templates(
&self,
input: ListCustomVerificationEmailTemplatesRequest,
) -> RusotoFuture<
ListCustomVerificationEmailTemplatesResponse,
ListCustomVerificationEmailTemplatesError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListCustomVerificationEmailTemplates");
params.put("Version", "2010-12-01");
ListCustomVerificationEmailTemplatesRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListCustomVerificationEmailTemplatesError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListCustomVerificationEmailTemplatesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListCustomVerificationEmailTemplatesResponseDeserializer::deserialize(
"ListCustomVerificationEmailTemplatesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_identities(
&self,
input: ListIdentitiesRequest,
) -> RusotoFuture<ListIdentitiesResponse, ListIdentitiesError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListIdentities");
params.put("Version", "2010-12-01");
ListIdentitiesRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListIdentitiesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListIdentitiesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListIdentitiesResponseDeserializer::deserialize(
"ListIdentitiesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_identity_policies(
&self,
input: ListIdentityPoliciesRequest,
) -> RusotoFuture<ListIdentityPoliciesResponse, ListIdentityPoliciesError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListIdentityPolicies");
params.put("Version", "2010-12-01");
ListIdentityPoliciesRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListIdentityPoliciesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListIdentityPoliciesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListIdentityPoliciesResponseDeserializer::deserialize(
"ListIdentityPoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_receipt_filters(
&self,
input: ListReceiptFiltersRequest,
) -> RusotoFuture<ListReceiptFiltersResponse, ListReceiptFiltersError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListReceiptFilters");
params.put("Version", "2010-12-01");
ListReceiptFiltersRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListReceiptFiltersError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListReceiptFiltersResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListReceiptFiltersResponseDeserializer::deserialize(
"ListReceiptFiltersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_receipt_rule_sets(
&self,
input: ListReceiptRuleSetsRequest,
) -> RusotoFuture<ListReceiptRuleSetsResponse, ListReceiptRuleSetsError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListReceiptRuleSets");
params.put("Version", "2010-12-01");
ListReceiptRuleSetsRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListReceiptRuleSetsError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListReceiptRuleSetsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListReceiptRuleSetsResponseDeserializer::deserialize(
"ListReceiptRuleSetsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_templates(
&self,
input: ListTemplatesRequest,
) -> RusotoFuture<ListTemplatesResponse, ListTemplatesError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListTemplates");
params.put("Version", "2010-12-01");
ListTemplatesRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListTemplatesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListTemplatesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListTemplatesResponseDeserializer::deserialize(
"ListTemplatesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_verified_email_addresses(
&self,
) -> RusotoFuture<ListVerifiedEmailAddressesResponse, ListVerifiedEmailAddressesError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListVerifiedEmailAddresses");
params.put("Version", "2010-12-01");
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListVerifiedEmailAddressesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListVerifiedEmailAddressesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListVerifiedEmailAddressesResponseDeserializer::deserialize(
"ListVerifiedEmailAddressesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn put_configuration_set_delivery_options(
&self,
input: PutConfigurationSetDeliveryOptionsRequest,
) -> RusotoFuture<
PutConfigurationSetDeliveryOptionsResponse,
PutConfigurationSetDeliveryOptionsError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PutConfigurationSetDeliveryOptions");
params.put("Version", "2010-12-01");
PutConfigurationSetDeliveryOptionsRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(PutConfigurationSetDeliveryOptionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = PutConfigurationSetDeliveryOptionsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = PutConfigurationSetDeliveryOptionsResponseDeserializer::deserialize(
"PutConfigurationSetDeliveryOptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn put_identity_policy(
&self,
input: PutIdentityPolicyRequest,
) -> RusotoFuture<PutIdentityPolicyResponse, PutIdentityPolicyError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PutIdentityPolicy");
params.put("Version", "2010-12-01");
PutIdentityPolicyRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutIdentityPolicyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = PutIdentityPolicyResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = PutIdentityPolicyResponseDeserializer::deserialize(
"PutIdentityPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn reorder_receipt_rule_set(
&self,
input: ReorderReceiptRuleSetRequest,
) -> RusotoFuture<ReorderReceiptRuleSetResponse, ReorderReceiptRuleSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ReorderReceiptRuleSet");
params.put("Version", "2010-12-01");
ReorderReceiptRuleSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ReorderReceiptRuleSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ReorderReceiptRuleSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ReorderReceiptRuleSetResponseDeserializer::deserialize(
"ReorderReceiptRuleSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn send_bounce(
&self,
input: SendBounceRequest,
) -> RusotoFuture<SendBounceResponse, SendBounceError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SendBounce");
params.put("Version", "2010-12-01");
SendBounceRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SendBounceError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SendBounceResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SendBounceResponseDeserializer::deserialize(
"SendBounceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn send_bulk_templated_email(
&self,
input: SendBulkTemplatedEmailRequest,
) -> RusotoFuture<SendBulkTemplatedEmailResponse, SendBulkTemplatedEmailError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SendBulkTemplatedEmail");
params.put("Version", "2010-12-01");
SendBulkTemplatedEmailRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SendBulkTemplatedEmailError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SendBulkTemplatedEmailResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SendBulkTemplatedEmailResponseDeserializer::deserialize(
"SendBulkTemplatedEmailResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn send_custom_verification_email(
&self,
input: SendCustomVerificationEmailRequest,
) -> RusotoFuture<SendCustomVerificationEmailResponse, SendCustomVerificationEmailError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SendCustomVerificationEmail");
params.put("Version", "2010-12-01");
SendCustomVerificationEmailRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SendCustomVerificationEmailError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SendCustomVerificationEmailResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SendCustomVerificationEmailResponseDeserializer::deserialize(
"SendCustomVerificationEmailResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn send_email(
&self,
input: SendEmailRequest,
) -> RusotoFuture<SendEmailResponse, SendEmailError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SendEmail");
params.put("Version", "2010-12-01");
SendEmailRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SendEmailError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SendEmailResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
SendEmailResponseDeserializer::deserialize("SendEmailResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn send_raw_email(
&self,
input: SendRawEmailRequest,
) -> RusotoFuture<SendRawEmailResponse, SendRawEmailError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SendRawEmail");
params.put("Version", "2010-12-01");
SendRawEmailRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SendRawEmailError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SendRawEmailResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SendRawEmailResponseDeserializer::deserialize(
"SendRawEmailResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn send_templated_email(
&self,
input: SendTemplatedEmailRequest,
) -> RusotoFuture<SendTemplatedEmailResponse, SendTemplatedEmailError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SendTemplatedEmail");
params.put("Version", "2010-12-01");
SendTemplatedEmailRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SendTemplatedEmailError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SendTemplatedEmailResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SendTemplatedEmailResponseDeserializer::deserialize(
"SendTemplatedEmailResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_active_receipt_rule_set(
&self,
input: SetActiveReceiptRuleSetRequest,
) -> RusotoFuture<SetActiveReceiptRuleSetResponse, SetActiveReceiptRuleSetError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetActiveReceiptRuleSet");
params.put("Version", "2010-12-01");
SetActiveReceiptRuleSetRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetActiveReceiptRuleSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetActiveReceiptRuleSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SetActiveReceiptRuleSetResponseDeserializer::deserialize(
"SetActiveReceiptRuleSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_identity_dkim_enabled(
&self,
input: SetIdentityDkimEnabledRequest,
) -> RusotoFuture<SetIdentityDkimEnabledResponse, SetIdentityDkimEnabledError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetIdentityDkimEnabled");
params.put("Version", "2010-12-01");
SetIdentityDkimEnabledRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetIdentityDkimEnabledError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetIdentityDkimEnabledResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SetIdentityDkimEnabledResponseDeserializer::deserialize(
"SetIdentityDkimEnabledResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_identity_feedback_forwarding_enabled(
&self,
input: SetIdentityFeedbackForwardingEnabledRequest,
) -> RusotoFuture<
SetIdentityFeedbackForwardingEnabledResponse,
SetIdentityFeedbackForwardingEnabledError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetIdentityFeedbackForwardingEnabled");
params.put("Version", "2010-12-01");
SetIdentityFeedbackForwardingEnabledRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetIdentityFeedbackForwardingEnabledError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetIdentityFeedbackForwardingEnabledResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SetIdentityFeedbackForwardingEnabledResponseDeserializer::deserialize(
"SetIdentityFeedbackForwardingEnabledResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_identity_headers_in_notifications_enabled(
&self,
input: SetIdentityHeadersInNotificationsEnabledRequest,
) -> RusotoFuture<
SetIdentityHeadersInNotificationsEnabledResponse,
SetIdentityHeadersInNotificationsEnabledError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetIdentityHeadersInNotificationsEnabled");
params.put("Version", "2010-12-01");
SetIdentityHeadersInNotificationsEnabledRequestSerializer::serialize(
&mut params,
"",
&input,
);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetIdentityHeadersInNotificationsEnabledError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetIdentityHeadersInNotificationsEnabledResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
SetIdentityHeadersInNotificationsEnabledResponseDeserializer::deserialize(
"SetIdentityHeadersInNotificationsEnabledResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_identity_mail_from_domain(
&self,
input: SetIdentityMailFromDomainRequest,
) -> RusotoFuture<SetIdentityMailFromDomainResponse, SetIdentityMailFromDomainError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetIdentityMailFromDomain");
params.put("Version", "2010-12-01");
SetIdentityMailFromDomainRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetIdentityMailFromDomainError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetIdentityMailFromDomainResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SetIdentityMailFromDomainResponseDeserializer::deserialize(
"SetIdentityMailFromDomainResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_identity_notification_topic(
&self,
input: SetIdentityNotificationTopicRequest,
) -> RusotoFuture<SetIdentityNotificationTopicResponse, SetIdentityNotificationTopicError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetIdentityNotificationTopic");
params.put("Version", "2010-12-01");
SetIdentityNotificationTopicRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetIdentityNotificationTopicError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetIdentityNotificationTopicResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SetIdentityNotificationTopicResponseDeserializer::deserialize(
"SetIdentityNotificationTopicResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_receipt_rule_position(
&self,
input: SetReceiptRulePositionRequest,
) -> RusotoFuture<SetReceiptRulePositionResponse, SetReceiptRulePositionError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetReceiptRulePosition");
params.put("Version", "2010-12-01");
SetReceiptRulePositionRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetReceiptRulePositionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetReceiptRulePositionResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SetReceiptRulePositionResponseDeserializer::deserialize(
"SetReceiptRulePositionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn test_render_template(
&self,
input: TestRenderTemplateRequest,
) -> RusotoFuture<TestRenderTemplateResponse, TestRenderTemplateError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "TestRenderTemplate");
params.put("Version", "2010-12-01");
TestRenderTemplateRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TestRenderTemplateError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = TestRenderTemplateResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = TestRenderTemplateResponseDeserializer::deserialize(
"TestRenderTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_account_sending_enabled(
&self,
input: UpdateAccountSendingEnabledRequest,
) -> RusotoFuture<(), UpdateAccountSendingEnabledError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateAccountSendingEnabled");
params.put("Version", "2010-12-01");
UpdateAccountSendingEnabledRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateAccountSendingEnabledError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_configuration_set_event_destination(
&self,
input: UpdateConfigurationSetEventDestinationRequest,
) -> RusotoFuture<
UpdateConfigurationSetEventDestinationResponse,
UpdateConfigurationSetEventDestinationError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateConfigurationSetEventDestination");
params.put("Version", "2010-12-01");
UpdateConfigurationSetEventDestinationRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateConfigurationSetEventDestinationError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateConfigurationSetEventDestinationResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
UpdateConfigurationSetEventDestinationResponseDeserializer::deserialize(
"UpdateConfigurationSetEventDestinationResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_configuration_set_reputation_metrics_enabled(
&self,
input: UpdateConfigurationSetReputationMetricsEnabledRequest,
) -> RusotoFuture<(), UpdateConfigurationSetReputationMetricsEnabledError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateConfigurationSetReputationMetricsEnabled");
params.put("Version", "2010-12-01");
UpdateConfigurationSetReputationMetricsEnabledRequestSerializer::serialize(
&mut params,
"",
&input,
);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(
UpdateConfigurationSetReputationMetricsEnabledError::from_response(
response,
),
)
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_configuration_set_sending_enabled(
&self,
input: UpdateConfigurationSetSendingEnabledRequest,
) -> RusotoFuture<(), UpdateConfigurationSetSendingEnabledError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateConfigurationSetSendingEnabled");
params.put("Version", "2010-12-01");
UpdateConfigurationSetSendingEnabledRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateConfigurationSetSendingEnabledError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_configuration_set_tracking_options(
&self,
input: UpdateConfigurationSetTrackingOptionsRequest,
) -> RusotoFuture<
UpdateConfigurationSetTrackingOptionsResponse,
UpdateConfigurationSetTrackingOptionsError,
> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateConfigurationSetTrackingOptions");
params.put("Version", "2010-12-01");
UpdateConfigurationSetTrackingOptionsRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateConfigurationSetTrackingOptionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateConfigurationSetTrackingOptionsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
UpdateConfigurationSetTrackingOptionsResponseDeserializer::deserialize(
"UpdateConfigurationSetTrackingOptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_custom_verification_email_template(
&self,
input: UpdateCustomVerificationEmailTemplateRequest,
) -> RusotoFuture<(), UpdateCustomVerificationEmailTemplateError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateCustomVerificationEmailTemplate");
params.put("Version", "2010-12-01");
UpdateCustomVerificationEmailTemplateRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateCustomVerificationEmailTemplateError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_receipt_rule(
&self,
input: UpdateReceiptRuleRequest,
) -> RusotoFuture<UpdateReceiptRuleResponse, UpdateReceiptRuleError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateReceiptRule");
params.put("Version", "2010-12-01");
UpdateReceiptRuleRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateReceiptRuleError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateReceiptRuleResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = UpdateReceiptRuleResponseDeserializer::deserialize(
"UpdateReceiptRuleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_template(
&self,
input: UpdateTemplateRequest,
) -> RusotoFuture<UpdateTemplateResponse, UpdateTemplateError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateTemplate");
params.put("Version", "2010-12-01");
UpdateTemplateRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateTemplateError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateTemplateResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = UpdateTemplateResponseDeserializer::deserialize(
"UpdateTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn verify_domain_dkim(
&self,
input: VerifyDomainDkimRequest,
) -> RusotoFuture<VerifyDomainDkimResponse, VerifyDomainDkimError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "VerifyDomainDkim");
params.put("Version", "2010-12-01");
VerifyDomainDkimRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(VerifyDomainDkimError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = VerifyDomainDkimResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = VerifyDomainDkimResponseDeserializer::deserialize(
"VerifyDomainDkimResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn verify_domain_identity(
&self,
input: VerifyDomainIdentityRequest,
) -> RusotoFuture<VerifyDomainIdentityResponse, VerifyDomainIdentityError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "VerifyDomainIdentity");
params.put("Version", "2010-12-01");
VerifyDomainIdentityRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(VerifyDomainIdentityError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = VerifyDomainIdentityResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = VerifyDomainIdentityResponseDeserializer::deserialize(
"VerifyDomainIdentityResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn verify_email_address(
&self,
input: VerifyEmailAddressRequest,
) -> RusotoFuture<(), VerifyEmailAddressError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "VerifyEmailAddress");
params.put("Version", "2010-12-01");
VerifyEmailAddressRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(VerifyEmailAddressError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn verify_email_identity(
&self,
input: VerifyEmailIdentityRequest,
) -> RusotoFuture<VerifyEmailIdentityResponse, VerifyEmailIdentityError> {
let mut request = SignedRequest::new("POST", "email", &self.region, "/");
let mut params = Params::new();
params.put("Action", "VerifyEmailIdentity");
params.put("Version", "2010-12-01");
VerifyEmailIdentityRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(VerifyEmailIdentityError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = VerifyEmailIdentityResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = VerifyEmailIdentityResponseDeserializer::deserialize(
"VerifyEmailIdentityResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
}
#[cfg(test)]
mod protocol_tests {
extern crate rusoto_mock;
use self::rusoto_mock::*;
use super::*;
use rusoto_core::Region as rusoto_region;
#[test]
fn test_parse_error_ses_delete_identity() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/error",
"ses-delete-identity.xml",
);
let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DeleteIdentityRequest::default();
let result = client.delete_identity(request).sync();
assert!(!result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_delete_identity() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-delete-identity.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DeleteIdentityRequest::default();
let result = client.delete_identity(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_get_identity_dkim_attributes() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-get-identity-dkim-attributes.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = GetIdentityDkimAttributesRequest::default();
let result = client.get_identity_dkim_attributes(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_get_identity_notification_attributes() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-get-identity-notification-attributes.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = GetIdentityNotificationAttributesRequest::default();
let result = client.get_identity_notification_attributes(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_get_identity_verification_attributes() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-get-identity-verification-attributes.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = GetIdentityVerificationAttributesRequest::default();
let result = client.get_identity_verification_attributes(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_get_send_quota() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-get-send-quota.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let result = client.get_send_quota().sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_get_send_statistics() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-get-send-statistics.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let result = client.get_send_statistics().sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_list_identities() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-list-identities.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListIdentitiesRequest::default();
let result = client.list_identities(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_send_email() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-send-email.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = SendEmailRequest::default();
let result = client.send_email(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_send_raw_email() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-send-raw-email.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = SendRawEmailRequest::default();
let result = client.send_raw_email(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_set_identity_dkim_enabled() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-set-identity-dkim-enabled.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = SetIdentityDkimEnabledRequest::default();
let result = client.set_identity_dkim_enabled(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_verify_domain_dkim() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-verify-domain-dkim.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = VerifyDomainDkimRequest::default();
let result = client.verify_domain_dkim(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_ses_verify_domain_identity() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"ses-verify-domain-identity.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = SesClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = VerifyDomainIdentityRequest::default();
let result = client.verify_domain_identity(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
}