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 AccessKey {
pub access_key_id: String,
pub create_date: Option<String>,
pub secret_access_key: String,
pub status: String,
pub user_name: String,
}
struct AccessKeyDeserializer;
impl AccessKeyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccessKey, XmlParseError> {
deserialize_elements::<_, AccessKey, _>(tag_name, stack, |name, stack, obj| {
match name {
"AccessKeyId" => {
obj.access_key_id =
AccessKeyIdTypeDeserializer::deserialize("AccessKeyId", stack)?;
}
"CreateDate" => {
obj.create_date = Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"SecretAccessKey" => {
obj.secret_access_key =
AccessKeySecretTypeDeserializer::deserialize("SecretAccessKey", stack)?;
}
"Status" => {
obj.status = StatusTypeDeserializer::deserialize("Status", stack)?;
}
"UserName" => {
obj.user_name = UserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AccessKeyIdTypeDeserializer;
impl AccessKeyIdTypeDeserializer {
#[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 AccessKeyLastUsed {
pub last_used_date: String,
pub region: String,
pub service_name: String,
}
struct AccessKeyLastUsedDeserializer;
impl AccessKeyLastUsedDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccessKeyLastUsed, XmlParseError> {
deserialize_elements::<_, AccessKeyLastUsed, _>(tag_name, stack, |name, stack, obj| {
match name {
"LastUsedDate" => {
obj.last_used_date = DateTypeDeserializer::deserialize("LastUsedDate", stack)?;
}
"Region" => {
obj.region = StringTypeDeserializer::deserialize("Region", stack)?;
}
"ServiceName" => {
obj.service_name = StringTypeDeserializer::deserialize("ServiceName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AccessKeyMetadata {
pub access_key_id: Option<String>,
pub create_date: Option<String>,
pub status: Option<String>,
pub user_name: Option<String>,
}
struct AccessKeyMetadataDeserializer;
impl AccessKeyMetadataDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccessKeyMetadata, XmlParseError> {
deserialize_elements::<_, AccessKeyMetadata, _>(tag_name, stack, |name, stack, obj| {
match name {
"AccessKeyId" => {
obj.access_key_id = Some(AccessKeyIdTypeDeserializer::deserialize(
"AccessKeyId",
stack,
)?);
}
"CreateDate" => {
obj.create_date = Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"Status" => {
obj.status = Some(StatusTypeDeserializer::deserialize("Status", stack)?);
}
"UserName" => {
obj.user_name = Some(UserNameTypeDeserializer::deserialize("UserName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AccessKeyMetadataListTypeDeserializer;
impl AccessKeyMetadataListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AccessKeyMetadata>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(AccessKeyMetadataDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AccessKeySecretTypeDeserializer;
impl AccessKeySecretTypeDeserializer {
#[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 AccountAliasListTypeDeserializer;
impl AccountAliasListTypeDeserializer {
#[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(AccountAliasTypeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AccountAliasTypeDeserializer;
impl AccountAliasTypeDeserializer {
#[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 ActionNameListTypeSerializer;
impl ActionNameListTypeSerializer {
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 ActionNameTypeDeserializer;
impl ActionNameTypeDeserializer {
#[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 AddClientIDToOpenIDConnectProviderRequest {
pub client_id: String,
pub open_id_connect_provider_arn: String,
}
struct AddClientIDToOpenIDConnectProviderRequestSerializer;
impl AddClientIDToOpenIDConnectProviderRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddClientIDToOpenIDConnectProviderRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ClientID"), &obj.client_id);
params.put(
&format!("{}{}", prefix, "OpenIDConnectProviderArn"),
&obj.open_id_connect_provider_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddRoleToInstanceProfileRequest {
pub instance_profile_name: String,
pub role_name: String,
}
struct AddRoleToInstanceProfileRequestSerializer;
impl AddRoleToInstanceProfileRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddRoleToInstanceProfileRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "InstanceProfileName"),
&obj.instance_profile_name,
);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddUserToGroupRequest {
pub group_name: String,
pub user_name: String,
}
struct AddUserToGroupRequestSerializer;
impl AddUserToGroupRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddUserToGroupRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
struct ArnListTypeDeserializer;
impl ArnListTypeDeserializer {
#[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(ArnTypeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ArnTypeDeserializer;
impl ArnTypeDeserializer {
#[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 AttachGroupPolicyRequest {
pub group_name: String,
pub policy_arn: String,
}
struct AttachGroupPolicyRequestSerializer;
impl AttachGroupPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AttachGroupPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AttachRolePolicyRequest {
pub policy_arn: String,
pub role_name: String,
}
struct AttachRolePolicyRequestSerializer;
impl AttachRolePolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AttachRolePolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AttachUserPolicyRequest {
pub policy_arn: String,
pub user_name: String,
}
struct AttachUserPolicyRequestSerializer;
impl AttachUserPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AttachUserPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AttachedPermissionsBoundary {
pub permissions_boundary_arn: Option<String>,
pub permissions_boundary_type: Option<String>,
}
struct AttachedPermissionsBoundaryDeserializer;
impl AttachedPermissionsBoundaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AttachedPermissionsBoundary, XmlParseError> {
deserialize_elements::<_, AttachedPermissionsBoundary, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PermissionsBoundaryArn" => {
obj.permissions_boundary_arn = Some(ArnTypeDeserializer::deserialize(
"PermissionsBoundaryArn",
stack,
)?);
}
"PermissionsBoundaryType" => {
obj.permissions_boundary_type =
Some(PermissionsBoundaryAttachmentTypeDeserializer::deserialize(
"PermissionsBoundaryType",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct AttachedPoliciesListTypeDeserializer;
impl AttachedPoliciesListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AttachedPolicy>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(AttachedPolicyDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AttachedPolicy {
pub policy_arn: Option<String>,
pub policy_name: Option<String>,
}
struct AttachedPolicyDeserializer;
impl AttachedPolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AttachedPolicy, XmlParseError> {
deserialize_elements::<_, AttachedPolicy, _>(tag_name, stack, |name, stack, obj| {
match name {
"PolicyArn" => {
obj.policy_arn = Some(ArnTypeDeserializer::deserialize("PolicyArn", stack)?);
}
"PolicyName" => {
obj.policy_name = Some(PolicyNameTypeDeserializer::deserialize(
"PolicyName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AttachmentCountTypeDeserializer;
impl AttachmentCountTypeDeserializer {
#[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)
}
}
struct BooleanObjectTypeDeserializer;
impl BooleanObjectTypeDeserializer {
#[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 BooleanTypeDeserializer;
impl BooleanTypeDeserializer {
#[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 BootstrapDatumDeserializer;
impl BootstrapDatumDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<bytes::Bytes, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?.into();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CertificateBodyTypeDeserializer;
impl CertificateBodyTypeDeserializer {
#[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 CertificateChainTypeDeserializer;
impl CertificateChainTypeDeserializer {
#[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 CertificateIdTypeDeserializer;
impl CertificateIdTypeDeserializer {
#[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 CertificateListTypeDeserializer;
impl CertificateListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SigningCertificate>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SigningCertificateDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ChangePasswordRequest {
pub new_password: String,
pub old_password: String,
}
struct ChangePasswordRequestSerializer;
impl ChangePasswordRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ChangePasswordRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "NewPassword"), &obj.new_password);
params.put(&format!("{}{}", prefix, "OldPassword"), &obj.old_password);
}
}
struct ClientIDListTypeDeserializer;
impl ClientIDListTypeDeserializer {
#[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(ClientIDTypeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ClientIDListTypeSerializer;
impl ClientIDListTypeSerializer {
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 ClientIDTypeDeserializer;
impl ClientIDTypeDeserializer {
#[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 ColumnNumberDeserializer;
impl ColumnNumberDeserializer {
#[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 ContextEntry {
pub context_key_name: Option<String>,
pub context_key_type: Option<String>,
pub context_key_values: Option<Vec<String>>,
}
struct ContextEntrySerializer;
impl ContextEntrySerializer {
fn serialize(params: &mut Params, name: &str, obj: &ContextEntry) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.context_key_name {
params.put(&format!("{}{}", prefix, "ContextKeyName"), &field_value);
}
if let Some(ref field_value) = obj.context_key_type {
params.put(&format!("{}{}", prefix, "ContextKeyType"), &field_value);
}
if let Some(ref field_value) = obj.context_key_values {
ContextKeyValueListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ContextKeyValues"),
field_value,
);
}
}
}
struct ContextEntryListTypeSerializer;
impl ContextEntryListTypeSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<ContextEntry>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
ContextEntrySerializer::serialize(params, &key, obj);
}
}
}
struct ContextKeyNameTypeDeserializer;
impl ContextKeyNameTypeDeserializer {
#[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 ContextKeyNamesResultListTypeDeserializer;
impl ContextKeyNamesResultListTypeDeserializer {
#[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(ContextKeyNameTypeDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ContextKeyValueListTypeSerializer;
impl ContextKeyValueListTypeSerializer {
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 CreateAccessKeyRequest {
pub user_name: Option<String>,
}
struct CreateAccessKeyRequestSerializer;
impl CreateAccessKeyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateAccessKeyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateAccessKeyResponse {
pub access_key: AccessKey,
}
struct CreateAccessKeyResponseDeserializer;
impl CreateAccessKeyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateAccessKeyResponse, XmlParseError> {
deserialize_elements::<_, CreateAccessKeyResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AccessKey" => {
obj.access_key = AccessKeyDeserializer::deserialize("AccessKey", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateAccountAliasRequest {
pub account_alias: String,
}
struct CreateAccountAliasRequestSerializer;
impl CreateAccountAliasRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateAccountAliasRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "AccountAlias"), &obj.account_alias);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateGroupRequest {
pub group_name: String,
pub path: Option<String>,
}
struct CreateGroupRequestSerializer;
impl CreateGroupRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateGroupRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
if let Some(ref field_value) = obj.path {
params.put(&format!("{}{}", prefix, "Path"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateGroupResponse {
pub group: Group,
}
struct CreateGroupResponseDeserializer;
impl CreateGroupResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateGroupResponse, XmlParseError> {
deserialize_elements::<_, CreateGroupResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Group" => {
obj.group = GroupDeserializer::deserialize("Group", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateInstanceProfileRequest {
pub instance_profile_name: String,
pub path: Option<String>,
}
struct CreateInstanceProfileRequestSerializer;
impl CreateInstanceProfileRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateInstanceProfileRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "InstanceProfileName"),
&obj.instance_profile_name,
);
if let Some(ref field_value) = obj.path {
params.put(&format!("{}{}", prefix, "Path"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateInstanceProfileResponse {
pub instance_profile: InstanceProfile,
}
struct CreateInstanceProfileResponseDeserializer;
impl CreateInstanceProfileResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateInstanceProfileResponse, XmlParseError> {
deserialize_elements::<_, CreateInstanceProfileResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"InstanceProfile" => {
obj.instance_profile =
InstanceProfileDeserializer::deserialize("InstanceProfile", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLoginProfileRequest {
pub password: String,
pub password_reset_required: Option<bool>,
pub user_name: String,
}
struct CreateLoginProfileRequestSerializer;
impl CreateLoginProfileRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateLoginProfileRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Password"), &obj.password);
if let Some(ref field_value) = obj.password_reset_required {
params.put(
&format!("{}{}", prefix, "PasswordResetRequired"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLoginProfileResponse {
pub login_profile: LoginProfile,
}
struct CreateLoginProfileResponseDeserializer;
impl CreateLoginProfileResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateLoginProfileResponse, XmlParseError> {
deserialize_elements::<_, CreateLoginProfileResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LoginProfile" => {
obj.login_profile =
LoginProfileDeserializer::deserialize("LoginProfile", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateOpenIDConnectProviderRequest {
pub client_id_list: Option<Vec<String>>,
pub thumbprint_list: Vec<String>,
pub url: String,
}
struct CreateOpenIDConnectProviderRequestSerializer;
impl CreateOpenIDConnectProviderRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateOpenIDConnectProviderRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.client_id_list {
ClientIDListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ClientIDList"),
field_value,
);
}
ThumbprintListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ThumbprintList"),
&obj.thumbprint_list,
);
params.put(&format!("{}{}", prefix, "Url"), &obj.url);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateOpenIDConnectProviderResponse {
pub open_id_connect_provider_arn: Option<String>,
}
struct CreateOpenIDConnectProviderResponseDeserializer;
impl CreateOpenIDConnectProviderResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateOpenIDConnectProviderResponse, XmlParseError> {
deserialize_elements::<_, CreateOpenIDConnectProviderResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"OpenIDConnectProviderArn" => {
obj.open_id_connect_provider_arn = Some(ArnTypeDeserializer::deserialize(
"OpenIDConnectProviderArn",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreatePolicyRequest {
pub description: Option<String>,
pub path: Option<String>,
pub policy_document: String,
pub policy_name: String,
}
struct CreatePolicyRequestSerializer;
impl CreatePolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreatePolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.path {
params.put(&format!("{}{}", prefix, "Path"), &field_value);
}
params.put(
&format!("{}{}", prefix, "PolicyDocument"),
&obj.policy_document,
);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreatePolicyResponse {
pub policy: Option<Policy>,
}
struct CreatePolicyResponseDeserializer;
impl CreatePolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreatePolicyResponse, XmlParseError> {
deserialize_elements::<_, CreatePolicyResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Policy" => {
obj.policy = Some(PolicyDeserializer::deserialize("Policy", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreatePolicyVersionRequest {
pub policy_arn: String,
pub policy_document: String,
pub set_as_default: Option<bool>,
}
struct CreatePolicyVersionRequestSerializer;
impl CreatePolicyVersionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreatePolicyVersionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
params.put(
&format!("{}{}", prefix, "PolicyDocument"),
&obj.policy_document,
);
if let Some(ref field_value) = obj.set_as_default {
params.put(&format!("{}{}", prefix, "SetAsDefault"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreatePolicyVersionResponse {
pub policy_version: Option<PolicyVersion>,
}
struct CreatePolicyVersionResponseDeserializer;
impl CreatePolicyVersionResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreatePolicyVersionResponse, XmlParseError> {
deserialize_elements::<_, CreatePolicyVersionResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PolicyVersion" => {
obj.policy_version = Some(PolicyVersionDeserializer::deserialize(
"PolicyVersion",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateRoleRequest {
pub assume_role_policy_document: String,
pub description: Option<String>,
pub max_session_duration: Option<i64>,
pub path: Option<String>,
pub permissions_boundary: Option<String>,
pub role_name: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateRoleRequestSerializer;
impl CreateRoleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateRoleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AssumeRolePolicyDocument"),
&obj.assume_role_policy_document,
);
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.max_session_duration {
params.put(&format!("{}{}", prefix, "MaxSessionDuration"), &field_value);
}
if let Some(ref field_value) = obj.path {
params.put(&format!("{}{}", prefix, "Path"), &field_value);
}
if let Some(ref field_value) = obj.permissions_boundary {
params.put(
&format!("{}{}", prefix, "PermissionsBoundary"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
if let Some(ref field_value) = obj.tags {
TagListTypeSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateRoleResponse {
pub role: Role,
}
struct CreateRoleResponseDeserializer;
impl CreateRoleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateRoleResponse, XmlParseError> {
deserialize_elements::<_, CreateRoleResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Role" => {
obj.role = RoleDeserializer::deserialize("Role", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateSAMLProviderRequest {
pub name: String,
pub saml_metadata_document: String,
}
struct CreateSAMLProviderRequestSerializer;
impl CreateSAMLProviderRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateSAMLProviderRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Name"), &obj.name);
params.put(
&format!("{}{}", prefix, "SAMLMetadataDocument"),
&obj.saml_metadata_document,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateSAMLProviderResponse {
pub saml_provider_arn: Option<String>,
}
struct CreateSAMLProviderResponseDeserializer;
impl CreateSAMLProviderResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateSAMLProviderResponse, XmlParseError> {
deserialize_elements::<_, CreateSAMLProviderResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SAMLProviderArn" => {
obj.saml_provider_arn =
Some(ArnTypeDeserializer::deserialize("SAMLProviderArn", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateServiceLinkedRoleRequest {
pub aws_service_name: String,
pub custom_suffix: Option<String>,
pub description: Option<String>,
}
struct CreateServiceLinkedRoleRequestSerializer;
impl CreateServiceLinkedRoleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateServiceLinkedRoleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AWSServiceName"),
&obj.aws_service_name,
);
if let Some(ref field_value) = obj.custom_suffix {
params.put(&format!("{}{}", prefix, "CustomSuffix"), &field_value);
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateServiceLinkedRoleResponse {
pub role: Option<Role>,
}
struct CreateServiceLinkedRoleResponseDeserializer;
impl CreateServiceLinkedRoleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateServiceLinkedRoleResponse, XmlParseError> {
deserialize_elements::<_, CreateServiceLinkedRoleResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Role" => {
obj.role = Some(RoleDeserializer::deserialize("Role", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateServiceSpecificCredentialRequest {
pub service_name: String,
pub user_name: String,
}
struct CreateServiceSpecificCredentialRequestSerializer;
impl CreateServiceSpecificCredentialRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateServiceSpecificCredentialRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ServiceName"), &obj.service_name);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateServiceSpecificCredentialResponse {
pub service_specific_credential: Option<ServiceSpecificCredential>,
}
struct CreateServiceSpecificCredentialResponseDeserializer;
impl CreateServiceSpecificCredentialResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateServiceSpecificCredentialResponse, XmlParseError> {
deserialize_elements::<_, CreateServiceSpecificCredentialResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ServiceSpecificCredential" => {
obj.service_specific_credential =
Some(ServiceSpecificCredentialDeserializer::deserialize(
"ServiceSpecificCredential",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateUserRequest {
pub path: Option<String>,
pub permissions_boundary: Option<String>,
pub tags: Option<Vec<Tag>>,
pub user_name: String,
}
struct CreateUserRequestSerializer;
impl CreateUserRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateUserRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.path {
params.put(&format!("{}{}", prefix, "Path"), &field_value);
}
if let Some(ref field_value) = obj.permissions_boundary {
params.put(
&format!("{}{}", prefix, "PermissionsBoundary"),
&field_value,
);
}
if let Some(ref field_value) = obj.tags {
TagListTypeSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateUserResponse {
pub user: Option<User>,
}
struct CreateUserResponseDeserializer;
impl CreateUserResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateUserResponse, XmlParseError> {
deserialize_elements::<_, CreateUserResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"User" => {
obj.user = Some(UserDeserializer::deserialize("User", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateVirtualMFADeviceRequest {
pub path: Option<String>,
pub virtual_mfa_device_name: String,
}
struct CreateVirtualMFADeviceRequestSerializer;
impl CreateVirtualMFADeviceRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateVirtualMFADeviceRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.path {
params.put(&format!("{}{}", prefix, "Path"), &field_value);
}
params.put(
&format!("{}{}", prefix, "VirtualMFADeviceName"),
&obj.virtual_mfa_device_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateVirtualMFADeviceResponse {
pub virtual_mfa_device: VirtualMFADevice,
}
struct CreateVirtualMFADeviceResponseDeserializer;
impl CreateVirtualMFADeviceResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateVirtualMFADeviceResponse, XmlParseError> {
deserialize_elements::<_, CreateVirtualMFADeviceResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"VirtualMFADevice" => {
obj.virtual_mfa_device =
VirtualMFADeviceDeserializer::deserialize("VirtualMFADevice", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DateTypeDeserializer;
impl DateTypeDeserializer {
#[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 DeactivateMFADeviceRequest {
pub serial_number: String,
pub user_name: String,
}
struct DeactivateMFADeviceRequestSerializer;
impl DeactivateMFADeviceRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeactivateMFADeviceRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "SerialNumber"), &obj.serial_number);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteAccessKeyRequest {
pub access_key_id: String,
pub user_name: Option<String>,
}
struct DeleteAccessKeyRequestSerializer;
impl DeleteAccessKeyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteAccessKeyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "AccessKeyId"), &obj.access_key_id);
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteAccountAliasRequest {
pub account_alias: String,
}
struct DeleteAccountAliasRequestSerializer;
impl DeleteAccountAliasRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteAccountAliasRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "AccountAlias"), &obj.account_alias);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteGroupPolicyRequest {
pub group_name: String,
pub policy_name: String,
}
struct DeleteGroupPolicyRequestSerializer;
impl DeleteGroupPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteGroupPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteGroupRequest {
pub group_name: String,
}
struct DeleteGroupRequestSerializer;
impl DeleteGroupRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteGroupRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteInstanceProfileRequest {
pub instance_profile_name: String,
}
struct DeleteInstanceProfileRequestSerializer;
impl DeleteInstanceProfileRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteInstanceProfileRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "InstanceProfileName"),
&obj.instance_profile_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteLoginProfileRequest {
pub user_name: String,
}
struct DeleteLoginProfileRequestSerializer;
impl DeleteLoginProfileRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteLoginProfileRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteOpenIDConnectProviderRequest {
pub open_id_connect_provider_arn: String,
}
struct DeleteOpenIDConnectProviderRequestSerializer;
impl DeleteOpenIDConnectProviderRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteOpenIDConnectProviderRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "OpenIDConnectProviderArn"),
&obj.open_id_connect_provider_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeletePolicyRequest {
pub policy_arn: String,
}
struct DeletePolicyRequestSerializer;
impl DeletePolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeletePolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeletePolicyVersionRequest {
pub policy_arn: String,
pub version_id: String,
}
struct DeletePolicyVersionRequestSerializer;
impl DeletePolicyVersionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeletePolicyVersionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
params.put(&format!("{}{}", prefix, "VersionId"), &obj.version_id);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteRolePermissionsBoundaryRequest {
pub role_name: String,
}
struct DeleteRolePermissionsBoundaryRequestSerializer;
impl DeleteRolePermissionsBoundaryRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteRolePermissionsBoundaryRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteRolePolicyRequest {
pub policy_name: String,
pub role_name: String,
}
struct DeleteRolePolicyRequestSerializer;
impl DeleteRolePolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteRolePolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteRoleRequest {
pub role_name: String,
}
struct DeleteRoleRequestSerializer;
impl DeleteRoleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteRoleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteSAMLProviderRequest {
pub saml_provider_arn: String,
}
struct DeleteSAMLProviderRequestSerializer;
impl DeleteSAMLProviderRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteSAMLProviderRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SAMLProviderArn"),
&obj.saml_provider_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteSSHPublicKeyRequest {
pub ssh_public_key_id: String,
pub user_name: String,
}
struct DeleteSSHPublicKeyRequestSerializer;
impl DeleteSSHPublicKeyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteSSHPublicKeyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SSHPublicKeyId"),
&obj.ssh_public_key_id,
);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteServerCertificateRequest {
pub server_certificate_name: String,
}
struct DeleteServerCertificateRequestSerializer;
impl DeleteServerCertificateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteServerCertificateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ServerCertificateName"),
&obj.server_certificate_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteServiceLinkedRoleRequest {
pub role_name: String,
}
struct DeleteServiceLinkedRoleRequestSerializer;
impl DeleteServiceLinkedRoleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteServiceLinkedRoleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteServiceLinkedRoleResponse {
pub deletion_task_id: String,
}
struct DeleteServiceLinkedRoleResponseDeserializer;
impl DeleteServiceLinkedRoleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteServiceLinkedRoleResponse, XmlParseError> {
deserialize_elements::<_, DeleteServiceLinkedRoleResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DeletionTaskId" => {
obj.deletion_task_id =
DeletionTaskIdTypeDeserializer::deserialize("DeletionTaskId", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteServiceSpecificCredentialRequest {
pub service_specific_credential_id: String,
pub user_name: Option<String>,
}
struct DeleteServiceSpecificCredentialRequestSerializer;
impl DeleteServiceSpecificCredentialRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteServiceSpecificCredentialRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ServiceSpecificCredentialId"),
&obj.service_specific_credential_id,
);
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteSigningCertificateRequest {
pub certificate_id: String,
pub user_name: Option<String>,
}
struct DeleteSigningCertificateRequestSerializer;
impl DeleteSigningCertificateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteSigningCertificateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "CertificateId"),
&obj.certificate_id,
);
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteUserPermissionsBoundaryRequest {
pub user_name: String,
}
struct DeleteUserPermissionsBoundaryRequestSerializer;
impl DeleteUserPermissionsBoundaryRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteUserPermissionsBoundaryRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteUserPolicyRequest {
pub policy_name: String,
pub user_name: String,
}
struct DeleteUserPolicyRequestSerializer;
impl DeleteUserPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteUserPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteUserRequest {
pub user_name: String,
}
struct DeleteUserRequestSerializer;
impl DeleteUserRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteUserRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteVirtualMFADeviceRequest {
pub serial_number: String,
}
struct DeleteVirtualMFADeviceRequestSerializer;
impl DeleteVirtualMFADeviceRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteVirtualMFADeviceRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "SerialNumber"), &obj.serial_number);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeletionTaskFailureReasonType {
pub reason: Option<String>,
pub role_usage_list: Option<Vec<RoleUsageType>>,
}
struct DeletionTaskFailureReasonTypeDeserializer;
impl DeletionTaskFailureReasonTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeletionTaskFailureReasonType, XmlParseError> {
deserialize_elements::<_, DeletionTaskFailureReasonType, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Reason" => {
obj.reason = Some(ReasonTypeDeserializer::deserialize("Reason", stack)?);
}
"RoleUsageList" => {
obj.role_usage_list.get_or_insert(vec![]).extend(
RoleUsageListTypeDeserializer::deserialize("RoleUsageList", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DeletionTaskIdTypeDeserializer;
impl DeletionTaskIdTypeDeserializer {
#[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 DeletionTaskStatusTypeDeserializer;
impl DeletionTaskStatusTypeDeserializer {
#[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 DetachGroupPolicyRequest {
pub group_name: String,
pub policy_arn: String,
}
struct DetachGroupPolicyRequestSerializer;
impl DetachGroupPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DetachGroupPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DetachRolePolicyRequest {
pub policy_arn: String,
pub role_name: String,
}
struct DetachRolePolicyRequestSerializer;
impl DetachRolePolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DetachRolePolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DetachUserPolicyRequest {
pub policy_arn: String,
pub user_name: String,
}
struct DetachUserPolicyRequestSerializer;
impl DetachUserPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DetachUserPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnableMFADeviceRequest {
pub authentication_code_1: String,
pub authentication_code_2: String,
pub serial_number: String,
pub user_name: String,
}
struct EnableMFADeviceRequestSerializer;
impl EnableMFADeviceRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &EnableMFADeviceRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AuthenticationCode1"),
&obj.authentication_code_1,
);
params.put(
&format!("{}{}", prefix, "AuthenticationCode2"),
&obj.authentication_code_2,
);
params.put(&format!("{}{}", prefix, "SerialNumber"), &obj.serial_number);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EntityDetails {
pub entity_info: EntityInfo,
pub last_authenticated: Option<String>,
}
struct EntityDetailsDeserializer;
impl EntityDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EntityDetails, XmlParseError> {
deserialize_elements::<_, EntityDetails, _>(tag_name, stack, |name, stack, obj| {
match name {
"EntityInfo" => {
obj.entity_info = EntityInfoDeserializer::deserialize("EntityInfo", stack)?;
}
"LastAuthenticated" => {
obj.last_authenticated = Some(DateTypeDeserializer::deserialize(
"LastAuthenticated",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EntityDetailsListTypeDeserializer;
impl EntityDetailsListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EntityDetails>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(EntityDetailsDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EntityInfo {
pub arn: String,
pub id: String,
pub name: String,
pub path: Option<String>,
pub type_: String,
}
struct EntityInfoDeserializer;
impl EntityInfoDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EntityInfo, XmlParseError> {
deserialize_elements::<_, EntityInfo, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = ArnTypeDeserializer::deserialize("Arn", stack)?;
}
"Id" => {
obj.id = IdTypeDeserializer::deserialize("Id", stack)?;
}
"Name" => {
obj.name = UserNameTypeDeserializer::deserialize("Name", stack)?;
}
"Path" => {
obj.path = Some(PathTypeDeserializer::deserialize("Path", stack)?);
}
"Type" => {
obj.type_ = PolicyOwnerEntityTypeDeserializer::deserialize("Type", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EntityListTypeSerializer;
impl EntityListTypeSerializer {
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 EntityNameTypeDeserializer;
impl EntityNameTypeDeserializer {
#[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 ErrorDetails {
pub code: String,
pub message: String,
}
struct ErrorDetailsDeserializer;
impl ErrorDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ErrorDetails, XmlParseError> {
deserialize_elements::<_, ErrorDetails, _>(tag_name, stack, |name, stack, obj| {
match name {
"Code" => {
obj.code = StringTypeDeserializer::deserialize("Code", stack)?;
}
"Message" => {
obj.message = StringTypeDeserializer::deserialize("Message", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EvalDecisionDetailsTypeDeserializer;
impl EvalDecisionDetailsTypeDeserializer {
#[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 = EvalDecisionSourceTypeDeserializer::deserialize("key", stack)?;
let value = PolicyEvaluationDecisionTypeDeserializer::deserialize("value", stack)?;
obj.insert(key, value);
end_element("entry", stack)?;
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EvalDecisionSourceTypeDeserializer;
impl EvalDecisionSourceTypeDeserializer {
#[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 EvaluationResult {
pub eval_action_name: String,
pub eval_decision: String,
pub eval_decision_details: Option<::std::collections::HashMap<String, String>>,
pub eval_resource_name: Option<String>,
pub matched_statements: Option<Vec<Statement>>,
pub missing_context_values: Option<Vec<String>>,
pub organizations_decision_detail: Option<OrganizationsDecisionDetail>,
pub resource_specific_results: Option<Vec<ResourceSpecificResult>>,
}
struct EvaluationResultDeserializer;
impl EvaluationResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EvaluationResult, XmlParseError> {
deserialize_elements::<_, EvaluationResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"EvalActionName" => {
obj.eval_action_name =
ActionNameTypeDeserializer::deserialize("EvalActionName", stack)?;
}
"EvalDecision" => {
obj.eval_decision = PolicyEvaluationDecisionTypeDeserializer::deserialize(
"EvalDecision",
stack,
)?;
}
"EvalDecisionDetails" => {
obj.eval_decision_details =
Some(EvalDecisionDetailsTypeDeserializer::deserialize(
"EvalDecisionDetails",
stack,
)?);
}
"EvalResourceName" => {
obj.eval_resource_name = Some(ResourceNameTypeDeserializer::deserialize(
"EvalResourceName",
stack,
)?);
}
"MatchedStatements" => {
obj.matched_statements.get_or_insert(vec![]).extend(
StatementListTypeDeserializer::deserialize("MatchedStatements", stack)?,
);
}
"MissingContextValues" => {
obj.missing_context_values.get_or_insert(vec![]).extend(
ContextKeyNamesResultListTypeDeserializer::deserialize(
"MissingContextValues",
stack,
)?,
);
}
"OrganizationsDecisionDetail" => {
obj.organizations_decision_detail =
Some(OrganizationsDecisionDetailDeserializer::deserialize(
"OrganizationsDecisionDetail",
stack,
)?);
}
"ResourceSpecificResults" => {
obj.resource_specific_results.get_or_insert(vec![]).extend(
ResourceSpecificResultListTypeDeserializer::deserialize(
"ResourceSpecificResults",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EvaluationResultsListTypeDeserializer;
impl EvaluationResultsListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EvaluationResult>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(EvaluationResultDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ExistingUserNameTypeDeserializer;
impl ExistingUserNameTypeDeserializer {
#[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 GenerateCredentialReportResponse {
pub description: Option<String>,
pub state: Option<String>,
}
struct GenerateCredentialReportResponseDeserializer;
impl GenerateCredentialReportResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GenerateCredentialReportResponse, XmlParseError> {
deserialize_elements::<_, GenerateCredentialReportResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Description" => {
obj.description =
Some(ReportStateDescriptionTypeDeserializer::deserialize(
"Description",
stack,
)?);
}
"State" => {
obj.state = Some(ReportStateTypeDeserializer::deserialize("State", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GenerateServiceLastAccessedDetailsRequest {
pub arn: String,
}
struct GenerateServiceLastAccessedDetailsRequestSerializer;
impl GenerateServiceLastAccessedDetailsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GenerateServiceLastAccessedDetailsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Arn"), &obj.arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GenerateServiceLastAccessedDetailsResponse {
pub job_id: Option<String>,
}
struct GenerateServiceLastAccessedDetailsResponseDeserializer;
impl GenerateServiceLastAccessedDetailsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GenerateServiceLastAccessedDetailsResponse, XmlParseError> {
deserialize_elements::<_, GenerateServiceLastAccessedDetailsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"JobId" => {
obj.job_id = Some(JobIDTypeDeserializer::deserialize("JobId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetAccessKeyLastUsedRequest {
pub access_key_id: String,
}
struct GetAccessKeyLastUsedRequestSerializer;
impl GetAccessKeyLastUsedRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetAccessKeyLastUsedRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "AccessKeyId"), &obj.access_key_id);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetAccessKeyLastUsedResponse {
pub access_key_last_used: Option<AccessKeyLastUsed>,
pub user_name: Option<String>,
}
struct GetAccessKeyLastUsedResponseDeserializer;
impl GetAccessKeyLastUsedResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetAccessKeyLastUsedResponse, XmlParseError> {
deserialize_elements::<_, GetAccessKeyLastUsedResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AccessKeyLastUsed" => {
obj.access_key_last_used = Some(
AccessKeyLastUsedDeserializer::deserialize("AccessKeyLastUsed", stack)?,
);
}
"UserName" => {
obj.user_name = Some(ExistingUserNameTypeDeserializer::deserialize(
"UserName", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetAccountAuthorizationDetailsRequest {
pub filter: Option<Vec<String>>,
pub marker: Option<String>,
pub max_items: Option<i64>,
}
struct GetAccountAuthorizationDetailsRequestSerializer;
impl GetAccountAuthorizationDetailsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetAccountAuthorizationDetailsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.filter {
EntityListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetAccountAuthorizationDetailsResponse {
pub group_detail_list: Option<Vec<GroupDetail>>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub policies: Option<Vec<ManagedPolicyDetail>>,
pub role_detail_list: Option<Vec<RoleDetail>>,
pub user_detail_list: Option<Vec<UserDetail>>,
}
struct GetAccountAuthorizationDetailsResponseDeserializer;
impl GetAccountAuthorizationDetailsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetAccountAuthorizationDetailsResponse, XmlParseError> {
deserialize_elements::<_, GetAccountAuthorizationDetailsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"GroupDetailList" => {
obj.group_detail_list.get_or_insert(vec![]).extend(
GroupDetailListTypeDeserializer::deserialize("GroupDetailList", stack)?,
);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"Policies" => {
obj.policies.get_or_insert(vec![]).extend(
ManagedPolicyDetailListTypeDeserializer::deserialize(
"Policies", stack,
)?,
);
}
"RoleDetailList" => {
obj.role_detail_list.get_or_insert(vec![]).extend(
RoleDetailListTypeDeserializer::deserialize("RoleDetailList", stack)?,
);
}
"UserDetailList" => {
obj.user_detail_list.get_or_insert(vec![]).extend(
UserDetailListTypeDeserializer::deserialize("UserDetailList", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetAccountPasswordPolicyResponse {
pub password_policy: PasswordPolicy,
}
struct GetAccountPasswordPolicyResponseDeserializer;
impl GetAccountPasswordPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetAccountPasswordPolicyResponse, XmlParseError> {
deserialize_elements::<_, GetAccountPasswordPolicyResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PasswordPolicy" => {
obj.password_policy =
PasswordPolicyDeserializer::deserialize("PasswordPolicy", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetAccountSummaryResponse {
pub summary_map: Option<::std::collections::HashMap<String, i64>>,
}
struct GetAccountSummaryResponseDeserializer;
impl GetAccountSummaryResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetAccountSummaryResponse, XmlParseError> {
deserialize_elements::<_, GetAccountSummaryResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SummaryMap" => {
obj.summary_map = Some(SummaryMapTypeDeserializer::deserialize(
"SummaryMap",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetContextKeysForCustomPolicyRequest {
pub policy_input_list: Vec<String>,
}
struct GetContextKeysForCustomPolicyRequestSerializer;
impl GetContextKeysForCustomPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetContextKeysForCustomPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
SimulationPolicyListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyInputList"),
&obj.policy_input_list,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetContextKeysForPolicyResponse {
pub context_key_names: Option<Vec<String>>,
}
struct GetContextKeysForPolicyResponseDeserializer;
impl GetContextKeysForPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetContextKeysForPolicyResponse, XmlParseError> {
deserialize_elements::<_, GetContextKeysForPolicyResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ContextKeyNames" => {
obj.context_key_names.get_or_insert(vec![]).extend(
ContextKeyNamesResultListTypeDeserializer::deserialize(
"ContextKeyNames",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetContextKeysForPrincipalPolicyRequest {
pub policy_input_list: Option<Vec<String>>,
pub policy_source_arn: String,
}
struct GetContextKeysForPrincipalPolicyRequestSerializer;
impl GetContextKeysForPrincipalPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetContextKeysForPrincipalPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.policy_input_list {
SimulationPolicyListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyInputList"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "PolicySourceArn"),
&obj.policy_source_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetCredentialReportResponse {
pub content: Option<bytes::Bytes>,
pub generated_time: Option<String>,
pub report_format: Option<String>,
}
struct GetCredentialReportResponseDeserializer;
impl GetCredentialReportResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetCredentialReportResponse, XmlParseError> {
deserialize_elements::<_, GetCredentialReportResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Content" => {
obj.content = Some(ReportContentTypeDeserializer::deserialize(
"Content", stack,
)?);
}
"GeneratedTime" => {
obj.generated_time =
Some(DateTypeDeserializer::deserialize("GeneratedTime", stack)?);
}
"ReportFormat" => {
obj.report_format = Some(ReportFormatTypeDeserializer::deserialize(
"ReportFormat",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetGroupPolicyRequest {
pub group_name: String,
pub policy_name: String,
}
struct GetGroupPolicyRequestSerializer;
impl GetGroupPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetGroupPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetGroupPolicyResponse {
pub group_name: String,
pub policy_document: String,
pub policy_name: String,
}
struct GetGroupPolicyResponseDeserializer;
impl GetGroupPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetGroupPolicyResponse, XmlParseError> {
deserialize_elements::<_, GetGroupPolicyResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"GroupName" => {
obj.group_name = GroupNameTypeDeserializer::deserialize("GroupName", stack)?;
}
"PolicyDocument" => {
obj.policy_document =
PolicyDocumentTypeDeserializer::deserialize("PolicyDocument", stack)?;
}
"PolicyName" => {
obj.policy_name = PolicyNameTypeDeserializer::deserialize("PolicyName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetGroupRequest {
pub group_name: String,
pub marker: Option<String>,
pub max_items: Option<i64>,
}
struct GetGroupRequestSerializer;
impl GetGroupRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetGroupRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetGroupResponse {
pub group: Group,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub users: Vec<User>,
}
struct GetGroupResponseDeserializer;
impl GetGroupResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetGroupResponse, XmlParseError> {
deserialize_elements::<_, GetGroupResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Group" => {
obj.group = GroupDeserializer::deserialize("Group", stack)?;
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"Users" => {
obj.users
.extend(UserListTypeDeserializer::deserialize("Users", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetInstanceProfileRequest {
pub instance_profile_name: String,
}
struct GetInstanceProfileRequestSerializer;
impl GetInstanceProfileRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetInstanceProfileRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "InstanceProfileName"),
&obj.instance_profile_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetInstanceProfileResponse {
pub instance_profile: InstanceProfile,
}
struct GetInstanceProfileResponseDeserializer;
impl GetInstanceProfileResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetInstanceProfileResponse, XmlParseError> {
deserialize_elements::<_, GetInstanceProfileResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"InstanceProfile" => {
obj.instance_profile =
InstanceProfileDeserializer::deserialize("InstanceProfile", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetLoginProfileRequest {
pub user_name: String,
}
struct GetLoginProfileRequestSerializer;
impl GetLoginProfileRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetLoginProfileRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetLoginProfileResponse {
pub login_profile: LoginProfile,
}
struct GetLoginProfileResponseDeserializer;
impl GetLoginProfileResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetLoginProfileResponse, XmlParseError> {
deserialize_elements::<_, GetLoginProfileResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LoginProfile" => {
obj.login_profile =
LoginProfileDeserializer::deserialize("LoginProfile", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetOpenIDConnectProviderRequest {
pub open_id_connect_provider_arn: String,
}
struct GetOpenIDConnectProviderRequestSerializer;
impl GetOpenIDConnectProviderRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetOpenIDConnectProviderRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "OpenIDConnectProviderArn"),
&obj.open_id_connect_provider_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetOpenIDConnectProviderResponse {
pub client_id_list: Option<Vec<String>>,
pub create_date: Option<String>,
pub thumbprint_list: Option<Vec<String>>,
pub url: Option<String>,
}
struct GetOpenIDConnectProviderResponseDeserializer;
impl GetOpenIDConnectProviderResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetOpenIDConnectProviderResponse, XmlParseError> {
deserialize_elements::<_, GetOpenIDConnectProviderResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClientIDList" => {
obj.client_id_list.get_or_insert(vec![]).extend(
ClientIDListTypeDeserializer::deserialize("ClientIDList", stack)?,
);
}
"CreateDate" => {
obj.create_date =
Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"ThumbprintList" => {
obj.thumbprint_list.get_or_insert(vec![]).extend(
ThumbprintListTypeDeserializer::deserialize("ThumbprintList", stack)?,
);
}
"Url" => {
obj.url = Some(OpenIDConnectProviderUrlTypeDeserializer::deserialize(
"Url", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetPolicyRequest {
pub policy_arn: String,
}
struct GetPolicyRequestSerializer;
impl GetPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetPolicyResponse {
pub policy: Option<Policy>,
}
struct GetPolicyResponseDeserializer;
impl GetPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetPolicyResponse, XmlParseError> {
deserialize_elements::<_, GetPolicyResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Policy" => {
obj.policy = Some(PolicyDeserializer::deserialize("Policy", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetPolicyVersionRequest {
pub policy_arn: String,
pub version_id: String,
}
struct GetPolicyVersionRequestSerializer;
impl GetPolicyVersionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetPolicyVersionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
params.put(&format!("{}{}", prefix, "VersionId"), &obj.version_id);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetPolicyVersionResponse {
pub policy_version: Option<PolicyVersion>,
}
struct GetPolicyVersionResponseDeserializer;
impl GetPolicyVersionResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetPolicyVersionResponse, XmlParseError> {
deserialize_elements::<_, GetPolicyVersionResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PolicyVersion" => {
obj.policy_version = Some(PolicyVersionDeserializer::deserialize(
"PolicyVersion",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetRolePolicyRequest {
pub policy_name: String,
pub role_name: String,
}
struct GetRolePolicyRequestSerializer;
impl GetRolePolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetRolePolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetRolePolicyResponse {
pub policy_document: String,
pub policy_name: String,
pub role_name: String,
}
struct GetRolePolicyResponseDeserializer;
impl GetRolePolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetRolePolicyResponse, XmlParseError> {
deserialize_elements::<_, GetRolePolicyResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"PolicyDocument" => {
obj.policy_document =
PolicyDocumentTypeDeserializer::deserialize("PolicyDocument", stack)?;
}
"PolicyName" => {
obj.policy_name = PolicyNameTypeDeserializer::deserialize("PolicyName", stack)?;
}
"RoleName" => {
obj.role_name = RoleNameTypeDeserializer::deserialize("RoleName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetRoleRequest {
pub role_name: String,
}
struct GetRoleRequestSerializer;
impl GetRoleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetRoleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetRoleResponse {
pub role: Role,
}
struct GetRoleResponseDeserializer;
impl GetRoleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetRoleResponse, XmlParseError> {
deserialize_elements::<_, GetRoleResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Role" => {
obj.role = RoleDeserializer::deserialize("Role", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetSAMLProviderRequest {
pub saml_provider_arn: String,
}
struct GetSAMLProviderRequestSerializer;
impl GetSAMLProviderRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetSAMLProviderRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SAMLProviderArn"),
&obj.saml_provider_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetSAMLProviderResponse {
pub create_date: Option<String>,
pub saml_metadata_document: Option<String>,
pub valid_until: Option<String>,
}
struct GetSAMLProviderResponseDeserializer;
impl GetSAMLProviderResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetSAMLProviderResponse, XmlParseError> {
deserialize_elements::<_, GetSAMLProviderResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"CreateDate" => {
obj.create_date =
Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"SAMLMetadataDocument" => {
obj.saml_metadata_document =
Some(SAMLMetadataDocumentTypeDeserializer::deserialize(
"SAMLMetadataDocument",
stack,
)?);
}
"ValidUntil" => {
obj.valid_until =
Some(DateTypeDeserializer::deserialize("ValidUntil", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetSSHPublicKeyRequest {
pub encoding: String,
pub ssh_public_key_id: String,
pub user_name: String,
}
struct GetSSHPublicKeyRequestSerializer;
impl GetSSHPublicKeyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetSSHPublicKeyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Encoding"), &obj.encoding);
params.put(
&format!("{}{}", prefix, "SSHPublicKeyId"),
&obj.ssh_public_key_id,
);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetSSHPublicKeyResponse {
pub ssh_public_key: Option<SSHPublicKey>,
}
struct GetSSHPublicKeyResponseDeserializer;
impl GetSSHPublicKeyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetSSHPublicKeyResponse, XmlParseError> {
deserialize_elements::<_, GetSSHPublicKeyResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SSHPublicKey" => {
obj.ssh_public_key = Some(SSHPublicKeyDeserializer::deserialize(
"SSHPublicKey",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetServerCertificateRequest {
pub server_certificate_name: String,
}
struct GetServerCertificateRequestSerializer;
impl GetServerCertificateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetServerCertificateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ServerCertificateName"),
&obj.server_certificate_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetServerCertificateResponse {
pub server_certificate: ServerCertificate,
}
struct GetServerCertificateResponseDeserializer;
impl GetServerCertificateResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetServerCertificateResponse, XmlParseError> {
deserialize_elements::<_, GetServerCertificateResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ServerCertificate" => {
obj.server_certificate =
ServerCertificateDeserializer::deserialize("ServerCertificate", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetServiceLastAccessedDetailsRequest {
pub job_id: String,
pub marker: Option<String>,
pub max_items: Option<i64>,
}
struct GetServiceLastAccessedDetailsRequestSerializer;
impl GetServiceLastAccessedDetailsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetServiceLastAccessedDetailsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "JobId"), &obj.job_id);
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetServiceLastAccessedDetailsResponse {
pub error: Option<ErrorDetails>,
pub is_truncated: Option<bool>,
pub job_completion_date: String,
pub job_creation_date: String,
pub job_status: String,
pub marker: Option<String>,
pub services_last_accessed: Vec<ServiceLastAccessed>,
}
struct GetServiceLastAccessedDetailsResponseDeserializer;
impl GetServiceLastAccessedDetailsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetServiceLastAccessedDetailsResponse, XmlParseError> {
deserialize_elements::<_, GetServiceLastAccessedDetailsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Error" => {
obj.error = Some(ErrorDetailsDeserializer::deserialize("Error", stack)?);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"JobCompletionDate" => {
obj.job_completion_date =
DateTypeDeserializer::deserialize("JobCompletionDate", stack)?;
}
"JobCreationDate" => {
obj.job_creation_date =
DateTypeDeserializer::deserialize("JobCreationDate", stack)?;
}
"JobStatus" => {
obj.job_status =
JobStatusTypeDeserializer::deserialize("JobStatus", stack)?;
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"ServicesLastAccessed" => {
obj.services_last_accessed.extend(
ServicesLastAccessedDeserializer::deserialize(
"ServicesLastAccessed",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetServiceLastAccessedDetailsWithEntitiesRequest {
pub job_id: String,
pub marker: Option<String>,
pub max_items: Option<i64>,
pub service_namespace: String,
}
struct GetServiceLastAccessedDetailsWithEntitiesRequestSerializer;
impl GetServiceLastAccessedDetailsWithEntitiesRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &GetServiceLastAccessedDetailsWithEntitiesRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "JobId"), &obj.job_id);
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ServiceNamespace"),
&obj.service_namespace,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetServiceLastAccessedDetailsWithEntitiesResponse {
pub entity_details_list: Vec<EntityDetails>,
pub error: Option<ErrorDetails>,
pub is_truncated: Option<bool>,
pub job_completion_date: String,
pub job_creation_date: String,
pub job_status: String,
pub marker: Option<String>,
}
struct GetServiceLastAccessedDetailsWithEntitiesResponseDeserializer;
impl GetServiceLastAccessedDetailsWithEntitiesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetServiceLastAccessedDetailsWithEntitiesResponse, XmlParseError> {
deserialize_elements::<_, GetServiceLastAccessedDetailsWithEntitiesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EntityDetailsList" => {
obj.entity_details_list.extend(
EntityDetailsListTypeDeserializer::deserialize(
"EntityDetailsList",
stack,
)?,
);
}
"Error" => {
obj.error = Some(ErrorDetailsDeserializer::deserialize("Error", stack)?);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"JobCompletionDate" => {
obj.job_completion_date =
DateTypeDeserializer::deserialize("JobCompletionDate", stack)?;
}
"JobCreationDate" => {
obj.job_creation_date =
DateTypeDeserializer::deserialize("JobCreationDate", stack)?;
}
"JobStatus" => {
obj.job_status =
JobStatusTypeDeserializer::deserialize("JobStatus", stack)?;
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetServiceLinkedRoleDeletionStatusRequest {
pub deletion_task_id: String,
}
struct GetServiceLinkedRoleDeletionStatusRequestSerializer;
impl GetServiceLinkedRoleDeletionStatusRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetServiceLinkedRoleDeletionStatusRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DeletionTaskId"),
&obj.deletion_task_id,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetServiceLinkedRoleDeletionStatusResponse {
pub reason: Option<DeletionTaskFailureReasonType>,
pub status: String,
}
struct GetServiceLinkedRoleDeletionStatusResponseDeserializer;
impl GetServiceLinkedRoleDeletionStatusResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetServiceLinkedRoleDeletionStatusResponse, XmlParseError> {
deserialize_elements::<_, GetServiceLinkedRoleDeletionStatusResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Reason" => {
obj.reason = Some(DeletionTaskFailureReasonTypeDeserializer::deserialize(
"Reason", stack,
)?);
}
"Status" => {
obj.status =
DeletionTaskStatusTypeDeserializer::deserialize("Status", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetUserPolicyRequest {
pub policy_name: String,
pub user_name: String,
}
struct GetUserPolicyRequestSerializer;
impl GetUserPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetUserPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetUserPolicyResponse {
pub policy_document: String,
pub policy_name: String,
pub user_name: String,
}
struct GetUserPolicyResponseDeserializer;
impl GetUserPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetUserPolicyResponse, XmlParseError> {
deserialize_elements::<_, GetUserPolicyResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"PolicyDocument" => {
obj.policy_document =
PolicyDocumentTypeDeserializer::deserialize("PolicyDocument", stack)?;
}
"PolicyName" => {
obj.policy_name = PolicyNameTypeDeserializer::deserialize("PolicyName", stack)?;
}
"UserName" => {
obj.user_name =
ExistingUserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetUserRequest {
pub user_name: Option<String>,
}
struct GetUserRequestSerializer;
impl GetUserRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetUserRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetUserResponse {
pub user: User,
}
struct GetUserResponseDeserializer;
impl GetUserResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetUserResponse, XmlParseError> {
deserialize_elements::<_, GetUserResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"User" => {
obj.user = UserDeserializer::deserialize("User", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Group {
pub arn: String,
pub create_date: String,
pub group_id: String,
pub group_name: String,
pub path: String,
}
struct GroupDeserializer;
impl GroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Group, XmlParseError> {
deserialize_elements::<_, Group, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = ArnTypeDeserializer::deserialize("Arn", stack)?;
}
"CreateDate" => {
obj.create_date = DateTypeDeserializer::deserialize("CreateDate", stack)?;
}
"GroupId" => {
obj.group_id = IdTypeDeserializer::deserialize("GroupId", stack)?;
}
"GroupName" => {
obj.group_name = GroupNameTypeDeserializer::deserialize("GroupName", stack)?;
}
"Path" => {
obj.path = PathTypeDeserializer::deserialize("Path", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GroupDetail {
pub arn: Option<String>,
pub attached_managed_policies: Option<Vec<AttachedPolicy>>,
pub create_date: Option<String>,
pub group_id: Option<String>,
pub group_name: Option<String>,
pub group_policy_list: Option<Vec<PolicyDetail>>,
pub path: Option<String>,
}
struct GroupDetailDeserializer;
impl GroupDetailDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GroupDetail, XmlParseError> {
deserialize_elements::<_, GroupDetail, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = Some(ArnTypeDeserializer::deserialize("Arn", stack)?);
}
"AttachedManagedPolicies" => {
obj.attached_managed_policies.get_or_insert(vec![]).extend(
AttachedPoliciesListTypeDeserializer::deserialize(
"AttachedManagedPolicies",
stack,
)?,
);
}
"CreateDate" => {
obj.create_date = Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"GroupId" => {
obj.group_id = Some(IdTypeDeserializer::deserialize("GroupId", stack)?);
}
"GroupName" => {
obj.group_name =
Some(GroupNameTypeDeserializer::deserialize("GroupName", stack)?);
}
"GroupPolicyList" => {
obj.group_policy_list.get_or_insert(vec![]).extend(
PolicyDetailListTypeDeserializer::deserialize("GroupPolicyList", stack)?,
);
}
"Path" => {
obj.path = Some(PathTypeDeserializer::deserialize("Path", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct GroupDetailListTypeDeserializer;
impl GroupDetailListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<GroupDetail>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(GroupDetailDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct GroupListTypeDeserializer;
impl GroupListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Group>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(GroupDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct GroupNameListTypeDeserializer;
impl GroupNameListTypeDeserializer {
#[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(GroupNameTypeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct GroupNameTypeDeserializer;
impl GroupNameTypeDeserializer {
#[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 IdTypeDeserializer;
impl IdTypeDeserializer {
#[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 InstanceProfile {
pub arn: String,
pub create_date: String,
pub instance_profile_id: String,
pub instance_profile_name: String,
pub path: String,
pub roles: Vec<Role>,
}
struct InstanceProfileDeserializer;
impl InstanceProfileDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<InstanceProfile, XmlParseError> {
deserialize_elements::<_, InstanceProfile, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = ArnTypeDeserializer::deserialize("Arn", stack)?;
}
"CreateDate" => {
obj.create_date = DateTypeDeserializer::deserialize("CreateDate", stack)?;
}
"InstanceProfileId" => {
obj.instance_profile_id =
IdTypeDeserializer::deserialize("InstanceProfileId", stack)?;
}
"InstanceProfileName" => {
obj.instance_profile_name = InstanceProfileNameTypeDeserializer::deserialize(
"InstanceProfileName",
stack,
)?;
}
"Path" => {
obj.path = PathTypeDeserializer::deserialize("Path", stack)?;
}
"Roles" => {
obj.roles
.extend(RoleListTypeDeserializer::deserialize("Roles", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct InstanceProfileListTypeDeserializer;
impl InstanceProfileListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<InstanceProfile>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(InstanceProfileDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct InstanceProfileNameTypeDeserializer;
impl InstanceProfileNameTypeDeserializer {
#[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 IntegerTypeDeserializer;
impl IntegerTypeDeserializer {
#[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)
}
}
struct JobIDTypeDeserializer;
impl JobIDTypeDeserializer {
#[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 JobStatusTypeDeserializer;
impl JobStatusTypeDeserializer {
#[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 LineNumberDeserializer;
impl LineNumberDeserializer {
#[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 ListAccessKeysRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub user_name: Option<String>,
}
struct ListAccessKeysRequestSerializer;
impl ListAccessKeysRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListAccessKeysRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAccessKeysResponse {
pub access_key_metadata: Vec<AccessKeyMetadata>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListAccessKeysResponseDeserializer;
impl ListAccessKeysResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListAccessKeysResponse, XmlParseError> {
deserialize_elements::<_, ListAccessKeysResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"AccessKeyMetadata" => {
obj.access_key_metadata.extend(
AccessKeyMetadataListTypeDeserializer::deserialize(
"AccessKeyMetadata",
stack,
)?,
);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAccountAliasesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
}
struct ListAccountAliasesRequestSerializer;
impl ListAccountAliasesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListAccountAliasesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAccountAliasesResponse {
pub account_aliases: Vec<String>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListAccountAliasesResponseDeserializer;
impl ListAccountAliasesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListAccountAliasesResponse, XmlParseError> {
deserialize_elements::<_, ListAccountAliasesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AccountAliases" => {
obj.account_aliases
.extend(AccountAliasListTypeDeserializer::deserialize(
"AccountAliases",
stack,
)?);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAttachedGroupPoliciesRequest {
pub group_name: String,
pub marker: Option<String>,
pub max_items: Option<i64>,
pub path_prefix: Option<String>,
}
struct ListAttachedGroupPoliciesRequestSerializer;
impl ListAttachedGroupPoliciesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListAttachedGroupPoliciesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAttachedGroupPoliciesResponse {
pub attached_policies: Option<Vec<AttachedPolicy>>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListAttachedGroupPoliciesResponseDeserializer;
impl ListAttachedGroupPoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListAttachedGroupPoliciesResponse, XmlParseError> {
deserialize_elements::<_, ListAttachedGroupPoliciesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AttachedPolicies" => {
obj.attached_policies.get_or_insert(vec![]).extend(
AttachedPoliciesListTypeDeserializer::deserialize(
"AttachedPolicies",
stack,
)?,
);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAttachedRolePoliciesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub path_prefix: Option<String>,
pub role_name: String,
}
struct ListAttachedRolePoliciesRequestSerializer;
impl ListAttachedRolePoliciesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListAttachedRolePoliciesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAttachedRolePoliciesResponse {
pub attached_policies: Option<Vec<AttachedPolicy>>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListAttachedRolePoliciesResponseDeserializer;
impl ListAttachedRolePoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListAttachedRolePoliciesResponse, XmlParseError> {
deserialize_elements::<_, ListAttachedRolePoliciesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AttachedPolicies" => {
obj.attached_policies.get_or_insert(vec![]).extend(
AttachedPoliciesListTypeDeserializer::deserialize(
"AttachedPolicies",
stack,
)?,
);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAttachedUserPoliciesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub path_prefix: Option<String>,
pub user_name: String,
}
struct ListAttachedUserPoliciesRequestSerializer;
impl ListAttachedUserPoliciesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListAttachedUserPoliciesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAttachedUserPoliciesResponse {
pub attached_policies: Option<Vec<AttachedPolicy>>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListAttachedUserPoliciesResponseDeserializer;
impl ListAttachedUserPoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListAttachedUserPoliciesResponse, XmlParseError> {
deserialize_elements::<_, ListAttachedUserPoliciesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AttachedPolicies" => {
obj.attached_policies.get_or_insert(vec![]).extend(
AttachedPoliciesListTypeDeserializer::deserialize(
"AttachedPolicies",
stack,
)?,
);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListEntitiesForPolicyRequest {
pub entity_filter: Option<String>,
pub marker: Option<String>,
pub max_items: Option<i64>,
pub path_prefix: Option<String>,
pub policy_arn: String,
pub policy_usage_filter: Option<String>,
}
struct ListEntitiesForPolicyRequestSerializer;
impl ListEntitiesForPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListEntitiesForPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.entity_filter {
params.put(&format!("{}{}", prefix, "EntityFilter"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
if let Some(ref field_value) = obj.policy_usage_filter {
params.put(&format!("{}{}", prefix, "PolicyUsageFilter"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListEntitiesForPolicyResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub policy_groups: Option<Vec<PolicyGroup>>,
pub policy_roles: Option<Vec<PolicyRole>>,
pub policy_users: Option<Vec<PolicyUser>>,
}
struct ListEntitiesForPolicyResponseDeserializer;
impl ListEntitiesForPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListEntitiesForPolicyResponse, XmlParseError> {
deserialize_elements::<_, ListEntitiesForPolicyResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"PolicyGroups" => {
obj.policy_groups.get_or_insert(vec![]).extend(
PolicyGroupListTypeDeserializer::deserialize("PolicyGroups", stack)?,
);
}
"PolicyRoles" => {
obj.policy_roles.get_or_insert(vec![]).extend(
PolicyRoleListTypeDeserializer::deserialize("PolicyRoles", stack)?,
);
}
"PolicyUsers" => {
obj.policy_users.get_or_insert(vec![]).extend(
PolicyUserListTypeDeserializer::deserialize("PolicyUsers", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListGroupPoliciesRequest {
pub group_name: String,
pub marker: Option<String>,
pub max_items: Option<i64>,
}
struct ListGroupPoliciesRequestSerializer;
impl ListGroupPoliciesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListGroupPoliciesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListGroupPoliciesResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub policy_names: Vec<String>,
}
struct ListGroupPoliciesResponseDeserializer;
impl ListGroupPoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListGroupPoliciesResponse, XmlParseError> {
deserialize_elements::<_, ListGroupPoliciesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"PolicyNames" => {
obj.policy_names
.extend(PolicyNameListTypeDeserializer::deserialize(
"PolicyNames",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListGroupsForUserRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub user_name: String,
}
struct ListGroupsForUserRequestSerializer;
impl ListGroupsForUserRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListGroupsForUserRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListGroupsForUserResponse {
pub groups: Vec<Group>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListGroupsForUserResponseDeserializer;
impl ListGroupsForUserResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListGroupsForUserResponse, XmlParseError> {
deserialize_elements::<_, ListGroupsForUserResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Groups" => {
obj.groups
.extend(GroupListTypeDeserializer::deserialize("Groups", stack)?);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListGroupsRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub path_prefix: Option<String>,
}
struct ListGroupsRequestSerializer;
impl ListGroupsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListGroupsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListGroupsResponse {
pub groups: Vec<Group>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListGroupsResponseDeserializer;
impl ListGroupsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListGroupsResponse, XmlParseError> {
deserialize_elements::<_, ListGroupsResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Groups" => {
obj.groups
.extend(GroupListTypeDeserializer::deserialize("Groups", stack)?);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListInstanceProfilesForRoleRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub role_name: String,
}
struct ListInstanceProfilesForRoleRequestSerializer;
impl ListInstanceProfilesForRoleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListInstanceProfilesForRoleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListInstanceProfilesForRoleResponse {
pub instance_profiles: Vec<InstanceProfile>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListInstanceProfilesForRoleResponseDeserializer;
impl ListInstanceProfilesForRoleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListInstanceProfilesForRoleResponse, XmlParseError> {
deserialize_elements::<_, ListInstanceProfilesForRoleResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"InstanceProfiles" => {
obj.instance_profiles.extend(
InstanceProfileListTypeDeserializer::deserialize(
"InstanceProfiles",
stack,
)?,
);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListInstanceProfilesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub path_prefix: Option<String>,
}
struct ListInstanceProfilesRequestSerializer;
impl ListInstanceProfilesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListInstanceProfilesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListInstanceProfilesResponse {
pub instance_profiles: Vec<InstanceProfile>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListInstanceProfilesResponseDeserializer;
impl ListInstanceProfilesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListInstanceProfilesResponse, XmlParseError> {
deserialize_elements::<_, ListInstanceProfilesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"InstanceProfiles" => {
obj.instance_profiles.extend(
InstanceProfileListTypeDeserializer::deserialize(
"InstanceProfiles",
stack,
)?,
);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListMFADevicesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub user_name: Option<String>,
}
struct ListMFADevicesRequestSerializer;
impl ListMFADevicesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListMFADevicesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListMFADevicesResponse {
pub is_truncated: Option<bool>,
pub mfa_devices: Vec<MFADevice>,
pub marker: Option<String>,
}
struct ListMFADevicesResponseDeserializer;
impl ListMFADevicesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListMFADevicesResponse, XmlParseError> {
deserialize_elements::<_, ListMFADevicesResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"MFADevices" => {
obj.mfa_devices
.extend(MfaDeviceListTypeDeserializer::deserialize(
"MFADevices",
stack,
)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListOpenIDConnectProvidersRequest {}
struct ListOpenIDConnectProvidersRequestSerializer;
impl ListOpenIDConnectProvidersRequestSerializer {
fn serialize(_params: &mut Params, name: &str, _obj: &ListOpenIDConnectProvidersRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListOpenIDConnectProvidersResponse {
pub open_id_connect_provider_list: Option<Vec<OpenIDConnectProviderListEntry>>,
}
struct ListOpenIDConnectProvidersResponseDeserializer;
impl ListOpenIDConnectProvidersResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListOpenIDConnectProvidersResponse, XmlParseError> {
deserialize_elements::<_, ListOpenIDConnectProvidersResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"OpenIDConnectProviderList" => {
obj.open_id_connect_provider_list
.get_or_insert(vec![])
.extend(OpenIDConnectProviderListTypeDeserializer::deserialize(
"OpenIDConnectProviderList",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListPoliciesGrantingServiceAccessEntry {
pub policies: Option<Vec<PolicyGrantingServiceAccess>>,
pub service_namespace: Option<String>,
}
struct ListPoliciesGrantingServiceAccessEntryDeserializer;
impl ListPoliciesGrantingServiceAccessEntryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListPoliciesGrantingServiceAccessEntry, XmlParseError> {
deserialize_elements::<_, ListPoliciesGrantingServiceAccessEntry, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Policies" => {
obj.policies.get_or_insert(vec![]).extend(
PolicyGrantingServiceAccessListTypeDeserializer::deserialize(
"Policies", stack,
)?,
);
}
"ServiceNamespace" => {
obj.service_namespace =
Some(ServiceNamespaceTypeDeserializer::deserialize(
"ServiceNamespace",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListPoliciesGrantingServiceAccessRequest {
pub arn: String,
pub marker: Option<String>,
pub service_namespaces: Vec<String>,
}
struct ListPoliciesGrantingServiceAccessRequestSerializer;
impl ListPoliciesGrantingServiceAccessRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListPoliciesGrantingServiceAccessRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Arn"), &obj.arn);
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
ServiceNamespaceListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ServiceNamespaces"),
&obj.service_namespaces,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListPoliciesGrantingServiceAccessResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub policies_granting_service_access: Vec<ListPoliciesGrantingServiceAccessEntry>,
}
struct ListPoliciesGrantingServiceAccessResponseDeserializer;
impl ListPoliciesGrantingServiceAccessResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListPoliciesGrantingServiceAccessResponse, XmlParseError> {
deserialize_elements::<_, ListPoliciesGrantingServiceAccessResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"PoliciesGrantingServiceAccess" => {
obj.policies_granting_service_access.extend(ListPolicyGrantingServiceAccessResponseListTypeDeserializer::deserialize("PoliciesGrantingServiceAccess", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListPoliciesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub only_attached: Option<bool>,
pub path_prefix: Option<String>,
pub policy_usage_filter: Option<String>,
pub scope: Option<String>,
}
struct ListPoliciesRequestSerializer;
impl ListPoliciesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListPoliciesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.only_attached {
params.put(&format!("{}{}", prefix, "OnlyAttached"), &field_value);
}
if let Some(ref field_value) = obj.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
if let Some(ref field_value) = obj.policy_usage_filter {
params.put(&format!("{}{}", prefix, "PolicyUsageFilter"), &field_value);
}
if let Some(ref field_value) = obj.scope {
params.put(&format!("{}{}", prefix, "Scope"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListPoliciesResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub policies: Option<Vec<Policy>>,
}
struct ListPoliciesResponseDeserializer;
impl ListPoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListPoliciesResponse, XmlParseError> {
deserialize_elements::<_, ListPoliciesResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"Policies" => {
obj.policies
.get_or_insert(vec![])
.extend(PolicyListTypeDeserializer::deserialize("Policies", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ListPolicyGrantingServiceAccessResponseListTypeDeserializer;
impl ListPolicyGrantingServiceAccessResponseListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ListPoliciesGrantingServiceAccessEntry>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(
ListPoliciesGrantingServiceAccessEntryDeserializer::deserialize(
"member", stack,
)?,
);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListPolicyVersionsRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub policy_arn: String,
}
struct ListPolicyVersionsRequestSerializer;
impl ListPolicyVersionsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListPolicyVersionsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListPolicyVersionsResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub versions: Option<Vec<PolicyVersion>>,
}
struct ListPolicyVersionsResponseDeserializer;
impl ListPolicyVersionsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListPolicyVersionsResponse, XmlParseError> {
deserialize_elements::<_, ListPolicyVersionsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"Versions" => {
obj.versions.get_or_insert(vec![]).extend(
PolicyDocumentVersionListTypeDeserializer::deserialize(
"Versions", stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListRolePoliciesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub role_name: String,
}
struct ListRolePoliciesRequestSerializer;
impl ListRolePoliciesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListRolePoliciesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListRolePoliciesResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub policy_names: Vec<String>,
}
struct ListRolePoliciesResponseDeserializer;
impl ListRolePoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListRolePoliciesResponse, XmlParseError> {
deserialize_elements::<_, ListRolePoliciesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"PolicyNames" => {
obj.policy_names
.extend(PolicyNameListTypeDeserializer::deserialize(
"PolicyNames",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListRoleTagsRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub role_name: String,
}
struct ListRoleTagsRequestSerializer;
impl ListRoleTagsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListRoleTagsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListRoleTagsResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub tags: Vec<Tag>,
}
struct ListRoleTagsResponseDeserializer;
impl ListRoleTagsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListRoleTagsResponse, XmlParseError> {
deserialize_elements::<_, ListRoleTagsResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"Tags" => {
obj.tags
.extend(TagListTypeDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListRolesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub path_prefix: Option<String>,
}
struct ListRolesRequestSerializer;
impl ListRolesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListRolesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListRolesResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub roles: Vec<Role>,
}
struct ListRolesResponseDeserializer;
impl ListRolesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListRolesResponse, XmlParseError> {
deserialize_elements::<_, ListRolesResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"Roles" => {
obj.roles
.extend(RoleListTypeDeserializer::deserialize("Roles", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListSAMLProvidersRequest {}
struct ListSAMLProvidersRequestSerializer;
impl ListSAMLProvidersRequestSerializer {
fn serialize(_params: &mut Params, name: &str, _obj: &ListSAMLProvidersRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListSAMLProvidersResponse {
pub saml_provider_list: Option<Vec<SAMLProviderListEntry>>,
}
struct ListSAMLProvidersResponseDeserializer;
impl ListSAMLProvidersResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListSAMLProvidersResponse, XmlParseError> {
deserialize_elements::<_, ListSAMLProvidersResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SAMLProviderList" => {
obj.saml_provider_list.get_or_insert(vec![]).extend(
SAMLProviderListTypeDeserializer::deserialize(
"SAMLProviderList",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListSSHPublicKeysRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub user_name: Option<String>,
}
struct ListSSHPublicKeysRequestSerializer;
impl ListSSHPublicKeysRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListSSHPublicKeysRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListSSHPublicKeysResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub ssh_public_keys: Option<Vec<SSHPublicKeyMetadata>>,
}
struct ListSSHPublicKeysResponseDeserializer;
impl ListSSHPublicKeysResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListSSHPublicKeysResponse, XmlParseError> {
deserialize_elements::<_, ListSSHPublicKeysResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"SSHPublicKeys" => {
obj.ssh_public_keys.get_or_insert(vec![]).extend(
SSHPublicKeyListTypeDeserializer::deserialize("SSHPublicKeys", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListServerCertificatesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub path_prefix: Option<String>,
}
struct ListServerCertificatesRequestSerializer;
impl ListServerCertificatesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListServerCertificatesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListServerCertificatesResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub server_certificate_metadata_list: Vec<ServerCertificateMetadata>,
}
struct ListServerCertificatesResponseDeserializer;
impl ListServerCertificatesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListServerCertificatesResponse, XmlParseError> {
deserialize_elements::<_, ListServerCertificatesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"ServerCertificateMetadataList" => {
obj.server_certificate_metadata_list.extend(
ServerCertificateMetadataListTypeDeserializer::deserialize(
"ServerCertificateMetadataList",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListServiceSpecificCredentialsRequest {
pub service_name: Option<String>,
pub user_name: Option<String>,
}
struct ListServiceSpecificCredentialsRequestSerializer;
impl ListServiceSpecificCredentialsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListServiceSpecificCredentialsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.service_name {
params.put(&format!("{}{}", prefix, "ServiceName"), &field_value);
}
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListServiceSpecificCredentialsResponse {
pub service_specific_credentials: Option<Vec<ServiceSpecificCredentialMetadata>>,
}
struct ListServiceSpecificCredentialsResponseDeserializer;
impl ListServiceSpecificCredentialsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListServiceSpecificCredentialsResponse, XmlParseError> {
deserialize_elements::<_, ListServiceSpecificCredentialsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ServiceSpecificCredentials" => {
obj.service_specific_credentials
.get_or_insert(vec![])
.extend(ServiceSpecificCredentialsListTypeDeserializer::deserialize(
"ServiceSpecificCredentials",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListSigningCertificatesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub user_name: Option<String>,
}
struct ListSigningCertificatesRequestSerializer;
impl ListSigningCertificatesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListSigningCertificatesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListSigningCertificatesResponse {
pub certificates: Vec<SigningCertificate>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct ListSigningCertificatesResponseDeserializer;
impl ListSigningCertificatesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListSigningCertificatesResponse, XmlParseError> {
deserialize_elements::<_, ListSigningCertificatesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Certificates" => {
obj.certificates
.extend(CertificateListTypeDeserializer::deserialize(
"Certificates",
stack,
)?);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListUserPoliciesRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub user_name: String,
}
struct ListUserPoliciesRequestSerializer;
impl ListUserPoliciesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListUserPoliciesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListUserPoliciesResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub policy_names: Vec<String>,
}
struct ListUserPoliciesResponseDeserializer;
impl ListUserPoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListUserPoliciesResponse, XmlParseError> {
deserialize_elements::<_, ListUserPoliciesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"PolicyNames" => {
obj.policy_names
.extend(PolicyNameListTypeDeserializer::deserialize(
"PolicyNames",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListUserTagsRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub user_name: String,
}
struct ListUserTagsRequestSerializer;
impl ListUserTagsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListUserTagsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListUserTagsResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub tags: Vec<Tag>,
}
struct ListUserTagsResponseDeserializer;
impl ListUserTagsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListUserTagsResponse, XmlParseError> {
deserialize_elements::<_, ListUserTagsResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"Tags" => {
obj.tags
.extend(TagListTypeDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListUsersRequest {
pub marker: Option<String>,
pub max_items: Option<i64>,
pub path_prefix: Option<String>,
}
struct ListUsersRequestSerializer;
impl ListUsersRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListUsersRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.path_prefix {
params.put(&format!("{}{}", prefix, "PathPrefix"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListUsersResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub users: Vec<User>,
}
struct ListUsersResponseDeserializer;
impl ListUsersResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListUsersResponse, XmlParseError> {
deserialize_elements::<_, ListUsersResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"Users" => {
obj.users
.extend(UserListTypeDeserializer::deserialize("Users", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListVirtualMFADevicesRequest {
pub assignment_status: Option<String>,
pub marker: Option<String>,
pub max_items: Option<i64>,
}
struct ListVirtualMFADevicesRequestSerializer;
impl ListVirtualMFADevicesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListVirtualMFADevicesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.assignment_status {
params.put(&format!("{}{}", prefix, "AssignmentStatus"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListVirtualMFADevicesResponse {
pub is_truncated: Option<bool>,
pub marker: Option<String>,
pub virtual_mfa_devices: Vec<VirtualMFADevice>,
}
struct ListVirtualMFADevicesResponseDeserializer;
impl ListVirtualMFADevicesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListVirtualMFADevicesResponse, XmlParseError> {
deserialize_elements::<_, ListVirtualMFADevicesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
"VirtualMFADevices" => {
obj.virtual_mfa_devices.extend(
VirtualMFADeviceListTypeDeserializer::deserialize(
"VirtualMFADevices",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LoginProfile {
pub create_date: String,
pub password_reset_required: Option<bool>,
pub user_name: String,
}
struct LoginProfileDeserializer;
impl LoginProfileDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoginProfile, XmlParseError> {
deserialize_elements::<_, LoginProfile, _>(tag_name, stack, |name, stack, obj| {
match name {
"CreateDate" => {
obj.create_date = DateTypeDeserializer::deserialize("CreateDate", stack)?;
}
"PasswordResetRequired" => {
obj.password_reset_required = Some(BooleanTypeDeserializer::deserialize(
"PasswordResetRequired",
stack,
)?);
}
"UserName" => {
obj.user_name = UserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct MFADevice {
pub enable_date: String,
pub serial_number: String,
pub user_name: String,
}
struct MFADeviceDeserializer;
impl MFADeviceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<MFADevice, XmlParseError> {
deserialize_elements::<_, MFADevice, _>(tag_name, stack, |name, stack, obj| {
match name {
"EnableDate" => {
obj.enable_date = DateTypeDeserializer::deserialize("EnableDate", stack)?;
}
"SerialNumber" => {
obj.serial_number =
SerialNumberTypeDeserializer::deserialize("SerialNumber", stack)?;
}
"UserName" => {
obj.user_name = UserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ManagedPolicyDetail {
pub arn: Option<String>,
pub attachment_count: Option<i64>,
pub create_date: Option<String>,
pub default_version_id: Option<String>,
pub description: Option<String>,
pub is_attachable: Option<bool>,
pub path: Option<String>,
pub permissions_boundary_usage_count: Option<i64>,
pub policy_id: Option<String>,
pub policy_name: Option<String>,
pub policy_version_list: Option<Vec<PolicyVersion>>,
pub update_date: Option<String>,
}
struct ManagedPolicyDetailDeserializer;
impl ManagedPolicyDetailDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ManagedPolicyDetail, XmlParseError> {
deserialize_elements::<_, ManagedPolicyDetail, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = Some(ArnTypeDeserializer::deserialize("Arn", stack)?);
}
"AttachmentCount" => {
obj.attachment_count = Some(AttachmentCountTypeDeserializer::deserialize(
"AttachmentCount",
stack,
)?);
}
"CreateDate" => {
obj.create_date = Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"DefaultVersionId" => {
obj.default_version_id = Some(PolicyVersionIdTypeDeserializer::deserialize(
"DefaultVersionId",
stack,
)?);
}
"Description" => {
obj.description = Some(PolicyDescriptionTypeDeserializer::deserialize(
"Description",
stack,
)?);
}
"IsAttachable" => {
obj.is_attachable =
Some(BooleanTypeDeserializer::deserialize("IsAttachable", stack)?);
}
"Path" => {
obj.path = Some(PolicyPathTypeDeserializer::deserialize("Path", stack)?);
}
"PermissionsBoundaryUsageCount" => {
obj.permissions_boundary_usage_count =
Some(AttachmentCountTypeDeserializer::deserialize(
"PermissionsBoundaryUsageCount",
stack,
)?);
}
"PolicyId" => {
obj.policy_id = Some(IdTypeDeserializer::deserialize("PolicyId", stack)?);
}
"PolicyName" => {
obj.policy_name = Some(PolicyNameTypeDeserializer::deserialize(
"PolicyName",
stack,
)?);
}
"PolicyVersionList" => {
obj.policy_version_list.get_or_insert(vec![]).extend(
PolicyDocumentVersionListTypeDeserializer::deserialize(
"PolicyVersionList",
stack,
)?,
);
}
"UpdateDate" => {
obj.update_date = Some(DateTypeDeserializer::deserialize("UpdateDate", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ManagedPolicyDetailListTypeDeserializer;
impl ManagedPolicyDetailListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ManagedPolicyDetail>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ManagedPolicyDetailDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct MaxPasswordAgeTypeDeserializer;
impl MaxPasswordAgeTypeDeserializer {
#[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)
}
}
struct MfaDeviceListTypeDeserializer;
impl MfaDeviceListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<MFADevice>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(MFADeviceDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct MinimumPasswordLengthTypeDeserializer;
impl MinimumPasswordLengthTypeDeserializer {
#[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 OpenIDConnectProviderListEntry {
pub arn: Option<String>,
}
struct OpenIDConnectProviderListEntryDeserializer;
impl OpenIDConnectProviderListEntryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OpenIDConnectProviderListEntry, XmlParseError> {
deserialize_elements::<_, OpenIDConnectProviderListEntry, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Arn" => {
obj.arn = Some(ArnTypeDeserializer::deserialize("Arn", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct OpenIDConnectProviderListTypeDeserializer;
impl OpenIDConnectProviderListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OpenIDConnectProviderListEntry>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(OpenIDConnectProviderListEntryDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct OpenIDConnectProviderUrlTypeDeserializer;
impl OpenIDConnectProviderUrlTypeDeserializer {
#[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 OrganizationsDecisionDetail {
pub allowed_by_organizations: Option<bool>,
}
struct OrganizationsDecisionDetailDeserializer;
impl OrganizationsDecisionDetailDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OrganizationsDecisionDetail, XmlParseError> {
deserialize_elements::<_, OrganizationsDecisionDetail, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AllowedByOrganizations" => {
obj.allowed_by_organizations = Some(BooleanTypeDeserializer::deserialize(
"AllowedByOrganizations",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PasswordPolicy {
pub allow_users_to_change_password: Option<bool>,
pub expire_passwords: Option<bool>,
pub hard_expiry: Option<bool>,
pub max_password_age: Option<i64>,
pub minimum_password_length: Option<i64>,
pub password_reuse_prevention: Option<i64>,
pub require_lowercase_characters: Option<bool>,
pub require_numbers: Option<bool>,
pub require_symbols: Option<bool>,
pub require_uppercase_characters: Option<bool>,
}
struct PasswordPolicyDeserializer;
impl PasswordPolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PasswordPolicy, XmlParseError> {
deserialize_elements::<_, PasswordPolicy, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllowUsersToChangePassword" => {
obj.allow_users_to_change_password = Some(
BooleanTypeDeserializer::deserialize("AllowUsersToChangePassword", stack)?,
);
}
"ExpirePasswords" => {
obj.expire_passwords = Some(BooleanTypeDeserializer::deserialize(
"ExpirePasswords",
stack,
)?);
}
"HardExpiry" => {
obj.hard_expiry = Some(BooleanObjectTypeDeserializer::deserialize(
"HardExpiry",
stack,
)?);
}
"MaxPasswordAge" => {
obj.max_password_age = Some(MaxPasswordAgeTypeDeserializer::deserialize(
"MaxPasswordAge",
stack,
)?);
}
"MinimumPasswordLength" => {
obj.minimum_password_length =
Some(MinimumPasswordLengthTypeDeserializer::deserialize(
"MinimumPasswordLength",
stack,
)?);
}
"PasswordReusePrevention" => {
obj.password_reuse_prevention =
Some(PasswordReusePreventionTypeDeserializer::deserialize(
"PasswordReusePrevention",
stack,
)?);
}
"RequireLowercaseCharacters" => {
obj.require_lowercase_characters = Some(BooleanTypeDeserializer::deserialize(
"RequireLowercaseCharacters",
stack,
)?);
}
"RequireNumbers" => {
obj.require_numbers = Some(BooleanTypeDeserializer::deserialize(
"RequireNumbers",
stack,
)?);
}
"RequireSymbols" => {
obj.require_symbols = Some(BooleanTypeDeserializer::deserialize(
"RequireSymbols",
stack,
)?);
}
"RequireUppercaseCharacters" => {
obj.require_uppercase_characters = Some(BooleanTypeDeserializer::deserialize(
"RequireUppercaseCharacters",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PasswordReusePreventionTypeDeserializer;
impl PasswordReusePreventionTypeDeserializer {
#[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)
}
}
struct PathTypeDeserializer;
impl PathTypeDeserializer {
#[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 PermissionsBoundaryAttachmentTypeDeserializer;
impl PermissionsBoundaryAttachmentTypeDeserializer {
#[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 Policy {
pub arn: Option<String>,
pub attachment_count: Option<i64>,
pub create_date: Option<String>,
pub default_version_id: Option<String>,
pub description: Option<String>,
pub is_attachable: Option<bool>,
pub path: Option<String>,
pub permissions_boundary_usage_count: Option<i64>,
pub policy_id: Option<String>,
pub policy_name: Option<String>,
pub update_date: Option<String>,
}
struct PolicyDeserializer;
impl PolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Policy, XmlParseError> {
deserialize_elements::<_, Policy, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = Some(ArnTypeDeserializer::deserialize("Arn", stack)?);
}
"AttachmentCount" => {
obj.attachment_count = Some(AttachmentCountTypeDeserializer::deserialize(
"AttachmentCount",
stack,
)?);
}
"CreateDate" => {
obj.create_date = Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"DefaultVersionId" => {
obj.default_version_id = Some(PolicyVersionIdTypeDeserializer::deserialize(
"DefaultVersionId",
stack,
)?);
}
"Description" => {
obj.description = Some(PolicyDescriptionTypeDeserializer::deserialize(
"Description",
stack,
)?);
}
"IsAttachable" => {
obj.is_attachable =
Some(BooleanTypeDeserializer::deserialize("IsAttachable", stack)?);
}
"Path" => {
obj.path = Some(PolicyPathTypeDeserializer::deserialize("Path", stack)?);
}
"PermissionsBoundaryUsageCount" => {
obj.permissions_boundary_usage_count =
Some(AttachmentCountTypeDeserializer::deserialize(
"PermissionsBoundaryUsageCount",
stack,
)?);
}
"PolicyId" => {
obj.policy_id = Some(IdTypeDeserializer::deserialize("PolicyId", stack)?);
}
"PolicyName" => {
obj.policy_name = Some(PolicyNameTypeDeserializer::deserialize(
"PolicyName",
stack,
)?);
}
"UpdateDate" => {
obj.update_date = Some(DateTypeDeserializer::deserialize("UpdateDate", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PolicyDescriptionTypeDeserializer;
impl PolicyDescriptionTypeDeserializer {
#[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 PolicyDetail {
pub policy_document: Option<String>,
pub policy_name: Option<String>,
}
struct PolicyDetailDeserializer;
impl PolicyDetailDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyDetail, XmlParseError> {
deserialize_elements::<_, PolicyDetail, _>(tag_name, stack, |name, stack, obj| {
match name {
"PolicyDocument" => {
obj.policy_document = Some(PolicyDocumentTypeDeserializer::deserialize(
"PolicyDocument",
stack,
)?);
}
"PolicyName" => {
obj.policy_name = Some(PolicyNameTypeDeserializer::deserialize(
"PolicyName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PolicyDetailListTypeDeserializer;
impl PolicyDetailListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyDetail>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyDetailDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyDocumentTypeDeserializer;
impl PolicyDocumentTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = rusoto_core::signature::decode_uri(&characters(stack)?);
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PolicyDocumentVersionListTypeDeserializer;
impl PolicyDocumentVersionListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyVersion>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyVersionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyEvaluationDecisionTypeDeserializer;
impl PolicyEvaluationDecisionTypeDeserializer {
#[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 PolicyGrantingServiceAccess {
pub entity_name: Option<String>,
pub entity_type: Option<String>,
pub policy_arn: Option<String>,
pub policy_name: String,
pub policy_type: String,
}
struct PolicyGrantingServiceAccessDeserializer;
impl PolicyGrantingServiceAccessDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyGrantingServiceAccess, XmlParseError> {
deserialize_elements::<_, PolicyGrantingServiceAccess, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EntityName" => {
obj.entity_name = Some(EntityNameTypeDeserializer::deserialize(
"EntityName",
stack,
)?);
}
"EntityType" => {
obj.entity_type = Some(PolicyOwnerEntityTypeDeserializer::deserialize(
"EntityType",
stack,
)?);
}
"PolicyArn" => {
obj.policy_arn =
Some(ArnTypeDeserializer::deserialize("PolicyArn", stack)?);
}
"PolicyName" => {
obj.policy_name =
PolicyNameTypeDeserializer::deserialize("PolicyName", stack)?;
}
"PolicyType" => {
obj.policy_type = PolicyTypeDeserializer::deserialize("PolicyType", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct PolicyGrantingServiceAccessListTypeDeserializer;
impl PolicyGrantingServiceAccessListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyGrantingServiceAccess>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyGrantingServiceAccessDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PolicyGroup {
pub group_id: Option<String>,
pub group_name: Option<String>,
}
struct PolicyGroupDeserializer;
impl PolicyGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyGroup, XmlParseError> {
deserialize_elements::<_, PolicyGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"GroupId" => {
obj.group_id = Some(IdTypeDeserializer::deserialize("GroupId", stack)?);
}
"GroupName" => {
obj.group_name =
Some(GroupNameTypeDeserializer::deserialize("GroupName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PolicyGroupListTypeDeserializer;
impl PolicyGroupListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyGroupDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyIdentifierTypeDeserializer;
impl PolicyIdentifierTypeDeserializer {
#[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 PolicyListTypeDeserializer;
impl PolicyListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Policy>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyNameListTypeDeserializer;
impl PolicyNameListTypeDeserializer {
#[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(PolicyNameTypeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyNameTypeDeserializer;
impl PolicyNameTypeDeserializer {
#[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 PolicyOwnerEntityTypeDeserializer;
impl PolicyOwnerEntityTypeDeserializer {
#[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 PolicyPathTypeDeserializer;
impl PolicyPathTypeDeserializer {
#[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 PolicyRole {
pub role_id: Option<String>,
pub role_name: Option<String>,
}
struct PolicyRoleDeserializer;
impl PolicyRoleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyRole, XmlParseError> {
deserialize_elements::<_, PolicyRole, _>(tag_name, stack, |name, stack, obj| {
match name {
"RoleId" => {
obj.role_id = Some(IdTypeDeserializer::deserialize("RoleId", stack)?);
}
"RoleName" => {
obj.role_name = Some(RoleNameTypeDeserializer::deserialize("RoleName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PolicyRoleListTypeDeserializer;
impl PolicyRoleListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyRole>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyRoleDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicySourceTypeDeserializer;
impl PolicySourceTypeDeserializer {
#[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 PolicyTypeDeserializer;
impl PolicyTypeDeserializer {
#[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 PolicyUser {
pub user_id: Option<String>,
pub user_name: Option<String>,
}
struct PolicyUserDeserializer;
impl PolicyUserDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyUser, XmlParseError> {
deserialize_elements::<_, PolicyUser, _>(tag_name, stack, |name, stack, obj| {
match name {
"UserId" => {
obj.user_id = Some(IdTypeDeserializer::deserialize("UserId", stack)?);
}
"UserName" => {
obj.user_name = Some(UserNameTypeDeserializer::deserialize("UserName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PolicyUserListTypeDeserializer;
impl PolicyUserListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyUser>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyUserDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PolicyVersion {
pub create_date: Option<String>,
pub document: Option<String>,
pub is_default_version: Option<bool>,
pub version_id: Option<String>,
}
struct PolicyVersionDeserializer;
impl PolicyVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyVersion, XmlParseError> {
deserialize_elements::<_, PolicyVersion, _>(tag_name, stack, |name, stack, obj| {
match name {
"CreateDate" => {
obj.create_date = Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"Document" => {
obj.document = Some(PolicyDocumentTypeDeserializer::deserialize(
"Document", stack,
)?);
}
"IsDefaultVersion" => {
obj.is_default_version = Some(BooleanTypeDeserializer::deserialize(
"IsDefaultVersion",
stack,
)?);
}
"VersionId" => {
obj.version_id = Some(PolicyVersionIdTypeDeserializer::deserialize(
"VersionId",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PolicyVersionIdTypeDeserializer;
impl PolicyVersionIdTypeDeserializer {
#[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 Position {
pub column: Option<i64>,
pub line: Option<i64>,
}
struct PositionDeserializer;
impl PositionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Position, XmlParseError> {
deserialize_elements::<_, Position, _>(tag_name, stack, |name, stack, obj| {
match name {
"Column" => {
obj.column = Some(ColumnNumberDeserializer::deserialize("Column", stack)?);
}
"Line" => {
obj.line = Some(LineNumberDeserializer::deserialize("Line", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PublicKeyFingerprintTypeDeserializer;
impl PublicKeyFingerprintTypeDeserializer {
#[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 PublicKeyIdTypeDeserializer;
impl PublicKeyIdTypeDeserializer {
#[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 PublicKeyMaterialTypeDeserializer;
impl PublicKeyMaterialTypeDeserializer {
#[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 PutGroupPolicyRequest {
pub group_name: String,
pub policy_document: String,
pub policy_name: String,
}
struct PutGroupPolicyRequestSerializer;
impl PutGroupPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PutGroupPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
params.put(
&format!("{}{}", prefix, "PolicyDocument"),
&obj.policy_document,
);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PutRolePermissionsBoundaryRequest {
pub permissions_boundary: String,
pub role_name: String,
}
struct PutRolePermissionsBoundaryRequestSerializer;
impl PutRolePermissionsBoundaryRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PutRolePermissionsBoundaryRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "PermissionsBoundary"),
&obj.permissions_boundary,
);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PutRolePolicyRequest {
pub policy_document: String,
pub policy_name: String,
pub role_name: String,
}
struct PutRolePolicyRequestSerializer;
impl PutRolePolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PutRolePolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "PolicyDocument"),
&obj.policy_document,
);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PutUserPermissionsBoundaryRequest {
pub permissions_boundary: String,
pub user_name: String,
}
struct PutUserPermissionsBoundaryRequestSerializer;
impl PutUserPermissionsBoundaryRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PutUserPermissionsBoundaryRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "PermissionsBoundary"),
&obj.permissions_boundary,
);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PutUserPolicyRequest {
pub policy_document: String,
pub policy_name: String,
pub user_name: String,
}
struct PutUserPolicyRequestSerializer;
impl PutUserPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PutUserPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "PolicyDocument"),
&obj.policy_document,
);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
struct ReasonTypeDeserializer;
impl ReasonTypeDeserializer {
#[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 RegionNameTypeDeserializer;
impl RegionNameTypeDeserializer {
#[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 RemoveClientIDFromOpenIDConnectProviderRequest {
pub client_id: String,
pub open_id_connect_provider_arn: String,
}
struct RemoveClientIDFromOpenIDConnectProviderRequestSerializer;
impl RemoveClientIDFromOpenIDConnectProviderRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &RemoveClientIDFromOpenIDConnectProviderRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ClientID"), &obj.client_id);
params.put(
&format!("{}{}", prefix, "OpenIDConnectProviderArn"),
&obj.open_id_connect_provider_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveRoleFromInstanceProfileRequest {
pub instance_profile_name: String,
pub role_name: String,
}
struct RemoveRoleFromInstanceProfileRequestSerializer;
impl RemoveRoleFromInstanceProfileRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveRoleFromInstanceProfileRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "InstanceProfileName"),
&obj.instance_profile_name,
);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveUserFromGroupRequest {
pub group_name: String,
pub user_name: String,
}
struct RemoveUserFromGroupRequestSerializer;
impl RemoveUserFromGroupRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveUserFromGroupRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
struct ReportContentTypeDeserializer;
impl ReportContentTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<bytes::Bytes, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?.into();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ReportFormatTypeDeserializer;
impl ReportFormatTypeDeserializer {
#[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 ReportStateDescriptionTypeDeserializer;
impl ReportStateDescriptionTypeDeserializer {
#[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 ReportStateTypeDeserializer;
impl ReportStateTypeDeserializer {
#[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 ResetServiceSpecificCredentialRequest {
pub service_specific_credential_id: String,
pub user_name: Option<String>,
}
struct ResetServiceSpecificCredentialRequestSerializer;
impl ResetServiceSpecificCredentialRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ResetServiceSpecificCredentialRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ServiceSpecificCredentialId"),
&obj.service_specific_credential_id,
);
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResetServiceSpecificCredentialResponse {
pub service_specific_credential: Option<ServiceSpecificCredential>,
}
struct ResetServiceSpecificCredentialResponseDeserializer;
impl ResetServiceSpecificCredentialResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResetServiceSpecificCredentialResponse, XmlParseError> {
deserialize_elements::<_, ResetServiceSpecificCredentialResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ServiceSpecificCredential" => {
obj.service_specific_credential =
Some(ServiceSpecificCredentialDeserializer::deserialize(
"ServiceSpecificCredential",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ResourceNameListTypeSerializer;
impl ResourceNameListTypeSerializer {
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 ResourceNameTypeDeserializer;
impl ResourceNameTypeDeserializer {
#[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 ResourceSpecificResult {
pub eval_decision_details: Option<::std::collections::HashMap<String, String>>,
pub eval_resource_decision: String,
pub eval_resource_name: String,
pub matched_statements: Option<Vec<Statement>>,
pub missing_context_values: Option<Vec<String>>,
}
struct ResourceSpecificResultDeserializer;
impl ResourceSpecificResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceSpecificResult, XmlParseError> {
deserialize_elements::<_, ResourceSpecificResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"EvalDecisionDetails" => {
obj.eval_decision_details =
Some(EvalDecisionDetailsTypeDeserializer::deserialize(
"EvalDecisionDetails",
stack,
)?);
}
"EvalResourceDecision" => {
obj.eval_resource_decision =
PolicyEvaluationDecisionTypeDeserializer::deserialize(
"EvalResourceDecision",
stack,
)?;
}
"EvalResourceName" => {
obj.eval_resource_name =
ResourceNameTypeDeserializer::deserialize("EvalResourceName", stack)?;
}
"MatchedStatements" => {
obj.matched_statements.get_or_insert(vec![]).extend(
StatementListTypeDeserializer::deserialize("MatchedStatements", stack)?,
);
}
"MissingContextValues" => {
obj.missing_context_values.get_or_insert(vec![]).extend(
ContextKeyNamesResultListTypeDeserializer::deserialize(
"MissingContextValues",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ResourceSpecificResultListTypeDeserializer;
impl ResourceSpecificResultListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ResourceSpecificResult>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ResourceSpecificResultDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ResponseMarkerTypeDeserializer;
impl ResponseMarkerTypeDeserializer {
#[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 ResyncMFADeviceRequest {
pub authentication_code_1: String,
pub authentication_code_2: String,
pub serial_number: String,
pub user_name: String,
}
struct ResyncMFADeviceRequestSerializer;
impl ResyncMFADeviceRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ResyncMFADeviceRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AuthenticationCode1"),
&obj.authentication_code_1,
);
params.put(
&format!("{}{}", prefix, "AuthenticationCode2"),
&obj.authentication_code_2,
);
params.put(&format!("{}{}", prefix, "SerialNumber"), &obj.serial_number);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Role {
pub arn: String,
pub assume_role_policy_document: Option<String>,
pub create_date: String,
pub description: Option<String>,
pub max_session_duration: Option<i64>,
pub path: String,
pub permissions_boundary: Option<AttachedPermissionsBoundary>,
pub role_id: String,
pub role_name: String,
pub tags: Option<Vec<Tag>>,
}
struct RoleDeserializer;
impl RoleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Role, XmlParseError> {
deserialize_elements::<_, Role, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = ArnTypeDeserializer::deserialize("Arn", stack)?;
}
"AssumeRolePolicyDocument" => {
obj.assume_role_policy_document =
Some(PolicyDocumentTypeDeserializer::deserialize(
"AssumeRolePolicyDocument",
stack,
)?);
}
"CreateDate" => {
obj.create_date = DateTypeDeserializer::deserialize("CreateDate", stack)?;
}
"Description" => {
obj.description = Some(RoleDescriptionTypeDeserializer::deserialize(
"Description",
stack,
)?);
}
"MaxSessionDuration" => {
obj.max_session_duration =
Some(RoleMaxSessionDurationTypeDeserializer::deserialize(
"MaxSessionDuration",
stack,
)?);
}
"Path" => {
obj.path = PathTypeDeserializer::deserialize("Path", stack)?;
}
"PermissionsBoundary" => {
obj.permissions_boundary =
Some(AttachedPermissionsBoundaryDeserializer::deserialize(
"PermissionsBoundary",
stack,
)?);
}
"RoleId" => {
obj.role_id = IdTypeDeserializer::deserialize("RoleId", stack)?;
}
"RoleName" => {
obj.role_name = RoleNameTypeDeserializer::deserialize("RoleName", stack)?;
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListTypeDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RoleDescriptionTypeDeserializer;
impl RoleDescriptionTypeDeserializer {
#[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 RoleDetail {
pub arn: Option<String>,
pub assume_role_policy_document: Option<String>,
pub attached_managed_policies: Option<Vec<AttachedPolicy>>,
pub create_date: Option<String>,
pub instance_profile_list: Option<Vec<InstanceProfile>>,
pub path: Option<String>,
pub permissions_boundary: Option<AttachedPermissionsBoundary>,
pub role_id: Option<String>,
pub role_name: Option<String>,
pub role_policy_list: Option<Vec<PolicyDetail>>,
pub tags: Option<Vec<Tag>>,
}
struct RoleDetailDeserializer;
impl RoleDetailDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RoleDetail, XmlParseError> {
deserialize_elements::<_, RoleDetail, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = Some(ArnTypeDeserializer::deserialize("Arn", stack)?);
}
"AssumeRolePolicyDocument" => {
obj.assume_role_policy_document =
Some(PolicyDocumentTypeDeserializer::deserialize(
"AssumeRolePolicyDocument",
stack,
)?);
}
"AttachedManagedPolicies" => {
obj.attached_managed_policies.get_or_insert(vec![]).extend(
AttachedPoliciesListTypeDeserializer::deserialize(
"AttachedManagedPolicies",
stack,
)?,
);
}
"CreateDate" => {
obj.create_date = Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"InstanceProfileList" => {
obj.instance_profile_list.get_or_insert(vec![]).extend(
InstanceProfileListTypeDeserializer::deserialize(
"InstanceProfileList",
stack,
)?,
);
}
"Path" => {
obj.path = Some(PathTypeDeserializer::deserialize("Path", stack)?);
}
"PermissionsBoundary" => {
obj.permissions_boundary =
Some(AttachedPermissionsBoundaryDeserializer::deserialize(
"PermissionsBoundary",
stack,
)?);
}
"RoleId" => {
obj.role_id = Some(IdTypeDeserializer::deserialize("RoleId", stack)?);
}
"RoleName" => {
obj.role_name = Some(RoleNameTypeDeserializer::deserialize("RoleName", stack)?);
}
"RolePolicyList" => {
obj.role_policy_list.get_or_insert(vec![]).extend(
PolicyDetailListTypeDeserializer::deserialize("RolePolicyList", stack)?,
);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListTypeDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RoleDetailListTypeDeserializer;
impl RoleDetailListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<RoleDetail>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(RoleDetailDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct RoleListTypeDeserializer;
impl RoleListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Role>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(RoleDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct RoleMaxSessionDurationTypeDeserializer;
impl RoleMaxSessionDurationTypeDeserializer {
#[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)
}
}
struct RoleNameTypeDeserializer;
impl RoleNameTypeDeserializer {
#[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 RoleUsageListTypeDeserializer;
impl RoleUsageListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<RoleUsageType>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(RoleUsageTypeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RoleUsageType {
pub region: Option<String>,
pub resources: Option<Vec<String>>,
}
struct RoleUsageTypeDeserializer;
impl RoleUsageTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RoleUsageType, XmlParseError> {
deserialize_elements::<_, RoleUsageType, _>(tag_name, stack, |name, stack, obj| {
match name {
"Region" => {
obj.region = Some(RegionNameTypeDeserializer::deserialize("Region", stack)?);
}
"Resources" => {
obj.resources
.get_or_insert(vec![])
.extend(ArnListTypeDeserializer::deserialize("Resources", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SAMLMetadataDocumentTypeDeserializer;
impl SAMLMetadataDocumentTypeDeserializer {
#[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 SAMLProviderListEntry {
pub arn: Option<String>,
pub create_date: Option<String>,
pub valid_until: Option<String>,
}
struct SAMLProviderListEntryDeserializer;
impl SAMLProviderListEntryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SAMLProviderListEntry, XmlParseError> {
deserialize_elements::<_, SAMLProviderListEntry, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = Some(ArnTypeDeserializer::deserialize("Arn", stack)?);
}
"CreateDate" => {
obj.create_date = Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"ValidUntil" => {
obj.valid_until = Some(DateTypeDeserializer::deserialize("ValidUntil", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SAMLProviderListTypeDeserializer;
impl SAMLProviderListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SAMLProviderListEntry>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SAMLProviderListEntryDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SSHPublicKey {
pub fingerprint: String,
pub ssh_public_key_body: String,
pub ssh_public_key_id: String,
pub status: String,
pub upload_date: Option<String>,
pub user_name: String,
}
struct SSHPublicKeyDeserializer;
impl SSHPublicKeyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SSHPublicKey, XmlParseError> {
deserialize_elements::<_, SSHPublicKey, _>(tag_name, stack, |name, stack, obj| {
match name {
"Fingerprint" => {
obj.fingerprint =
PublicKeyFingerprintTypeDeserializer::deserialize("Fingerprint", stack)?;
}
"SSHPublicKeyBody" => {
obj.ssh_public_key_body =
PublicKeyMaterialTypeDeserializer::deserialize("SSHPublicKeyBody", stack)?;
}
"SSHPublicKeyId" => {
obj.ssh_public_key_id =
PublicKeyIdTypeDeserializer::deserialize("SSHPublicKeyId", stack)?;
}
"Status" => {
obj.status = StatusTypeDeserializer::deserialize("Status", stack)?;
}
"UploadDate" => {
obj.upload_date = Some(DateTypeDeserializer::deserialize("UploadDate", stack)?);
}
"UserName" => {
obj.user_name = UserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SSHPublicKeyListTypeDeserializer;
impl SSHPublicKeyListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SSHPublicKeyMetadata>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SSHPublicKeyMetadataDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SSHPublicKeyMetadata {
pub ssh_public_key_id: String,
pub status: String,
pub upload_date: String,
pub user_name: String,
}
struct SSHPublicKeyMetadataDeserializer;
impl SSHPublicKeyMetadataDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SSHPublicKeyMetadata, XmlParseError> {
deserialize_elements::<_, SSHPublicKeyMetadata, _>(tag_name, stack, |name, stack, obj| {
match name {
"SSHPublicKeyId" => {
obj.ssh_public_key_id =
PublicKeyIdTypeDeserializer::deserialize("SSHPublicKeyId", stack)?;
}
"Status" => {
obj.status = StatusTypeDeserializer::deserialize("Status", stack)?;
}
"UploadDate" => {
obj.upload_date = DateTypeDeserializer::deserialize("UploadDate", stack)?;
}
"UserName" => {
obj.user_name = UserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SerialNumberTypeDeserializer;
impl SerialNumberTypeDeserializer {
#[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 ServerCertificate {
pub certificate_body: String,
pub certificate_chain: Option<String>,
pub server_certificate_metadata: ServerCertificateMetadata,
}
struct ServerCertificateDeserializer;
impl ServerCertificateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ServerCertificate, XmlParseError> {
deserialize_elements::<_, ServerCertificate, _>(tag_name, stack, |name, stack, obj| {
match name {
"CertificateBody" => {
obj.certificate_body =
CertificateBodyTypeDeserializer::deserialize("CertificateBody", stack)?;
}
"CertificateChain" => {
obj.certificate_chain = Some(CertificateChainTypeDeserializer::deserialize(
"CertificateChain",
stack,
)?);
}
"ServerCertificateMetadata" => {
obj.server_certificate_metadata =
ServerCertificateMetadataDeserializer::deserialize(
"ServerCertificateMetadata",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ServerCertificateMetadata {
pub arn: String,
pub expiration: Option<String>,
pub path: String,
pub server_certificate_id: String,
pub server_certificate_name: String,
pub upload_date: Option<String>,
}
struct ServerCertificateMetadataDeserializer;
impl ServerCertificateMetadataDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ServerCertificateMetadata, XmlParseError> {
deserialize_elements::<_, ServerCertificateMetadata, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Arn" => {
obj.arn = ArnTypeDeserializer::deserialize("Arn", stack)?;
}
"Expiration" => {
obj.expiration =
Some(DateTypeDeserializer::deserialize("Expiration", stack)?);
}
"Path" => {
obj.path = PathTypeDeserializer::deserialize("Path", stack)?;
}
"ServerCertificateId" => {
obj.server_certificate_id =
IdTypeDeserializer::deserialize("ServerCertificateId", stack)?;
}
"ServerCertificateName" => {
obj.server_certificate_name =
ServerCertificateNameTypeDeserializer::deserialize(
"ServerCertificateName",
stack,
)?;
}
"UploadDate" => {
obj.upload_date =
Some(DateTypeDeserializer::deserialize("UploadDate", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ServerCertificateMetadataListTypeDeserializer;
impl ServerCertificateMetadataListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ServerCertificateMetadata>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ServerCertificateMetadataDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ServerCertificateNameTypeDeserializer;
impl ServerCertificateNameTypeDeserializer {
#[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 ServiceLastAccessed {
pub last_authenticated: Option<String>,
pub last_authenticated_entity: Option<String>,
pub service_name: String,
pub service_namespace: String,
pub total_authenticated_entities: Option<i64>,
}
struct ServiceLastAccessedDeserializer;
impl ServiceLastAccessedDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ServiceLastAccessed, XmlParseError> {
deserialize_elements::<_, ServiceLastAccessed, _>(tag_name, stack, |name, stack, obj| {
match name {
"LastAuthenticated" => {
obj.last_authenticated = Some(DateTypeDeserializer::deserialize(
"LastAuthenticated",
stack,
)?);
}
"LastAuthenticatedEntity" => {
obj.last_authenticated_entity = Some(ArnTypeDeserializer::deserialize(
"LastAuthenticatedEntity",
stack,
)?);
}
"ServiceName" => {
obj.service_name =
ServiceNameTypeDeserializer::deserialize("ServiceName", stack)?;
}
"ServiceNamespace" => {
obj.service_namespace =
ServiceNamespaceTypeDeserializer::deserialize("ServiceNamespace", stack)?;
}
"TotalAuthenticatedEntities" => {
obj.total_authenticated_entities = Some(IntegerTypeDeserializer::deserialize(
"TotalAuthenticatedEntities",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ServiceNameDeserializer;
impl ServiceNameDeserializer {
#[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 ServiceNameTypeDeserializer;
impl ServiceNameTypeDeserializer {
#[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 ServiceNamespaceListTypeSerializer;
impl ServiceNamespaceListTypeSerializer {
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 ServiceNamespaceTypeDeserializer;
impl ServiceNamespaceTypeDeserializer {
#[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 ServicePasswordDeserializer;
impl ServicePasswordDeserializer {
#[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 ServiceSpecificCredential {
pub create_date: String,
pub service_name: String,
pub service_password: String,
pub service_specific_credential_id: String,
pub service_user_name: String,
pub status: String,
pub user_name: String,
}
struct ServiceSpecificCredentialDeserializer;
impl ServiceSpecificCredentialDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ServiceSpecificCredential, XmlParseError> {
deserialize_elements::<_, ServiceSpecificCredential, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"CreateDate" => {
obj.create_date = DateTypeDeserializer::deserialize("CreateDate", stack)?;
}
"ServiceName" => {
obj.service_name =
ServiceNameDeserializer::deserialize("ServiceName", stack)?;
}
"ServicePassword" => {
obj.service_password =
ServicePasswordDeserializer::deserialize("ServicePassword", stack)?;
}
"ServiceSpecificCredentialId" => {
obj.service_specific_credential_id =
ServiceSpecificCredentialIdDeserializer::deserialize(
"ServiceSpecificCredentialId",
stack,
)?;
}
"ServiceUserName" => {
obj.service_user_name =
ServiceUserNameDeserializer::deserialize("ServiceUserName", stack)?;
}
"Status" => {
obj.status = StatusTypeDeserializer::deserialize("Status", stack)?;
}
"UserName" => {
obj.user_name = UserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ServiceSpecificCredentialIdDeserializer;
impl ServiceSpecificCredentialIdDeserializer {
#[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 ServiceSpecificCredentialMetadata {
pub create_date: String,
pub service_name: String,
pub service_specific_credential_id: String,
pub service_user_name: String,
pub status: String,
pub user_name: String,
}
struct ServiceSpecificCredentialMetadataDeserializer;
impl ServiceSpecificCredentialMetadataDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ServiceSpecificCredentialMetadata, XmlParseError> {
deserialize_elements::<_, ServiceSpecificCredentialMetadata, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"CreateDate" => {
obj.create_date = DateTypeDeserializer::deserialize("CreateDate", stack)?;
}
"ServiceName" => {
obj.service_name =
ServiceNameDeserializer::deserialize("ServiceName", stack)?;
}
"ServiceSpecificCredentialId" => {
obj.service_specific_credential_id =
ServiceSpecificCredentialIdDeserializer::deserialize(
"ServiceSpecificCredentialId",
stack,
)?;
}
"ServiceUserName" => {
obj.service_user_name =
ServiceUserNameDeserializer::deserialize("ServiceUserName", stack)?;
}
"Status" => {
obj.status = StatusTypeDeserializer::deserialize("Status", stack)?;
}
"UserName" => {
obj.user_name = UserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ServiceSpecificCredentialsListTypeDeserializer;
impl ServiceSpecificCredentialsListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ServiceSpecificCredentialMetadata>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ServiceSpecificCredentialMetadataDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ServiceUserNameDeserializer;
impl ServiceUserNameDeserializer {
#[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 ServicesLastAccessedDeserializer;
impl ServicesLastAccessedDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ServiceLastAccessed>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ServiceLastAccessedDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetDefaultPolicyVersionRequest {
pub policy_arn: String,
pub version_id: String,
}
struct SetDefaultPolicyVersionRequestSerializer;
impl SetDefaultPolicyVersionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetDefaultPolicyVersionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "PolicyArn"), &obj.policy_arn);
params.put(&format!("{}{}", prefix, "VersionId"), &obj.version_id);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetSecurityTokenServicePreferencesRequest {
pub global_endpoint_token_version: String,
}
struct SetSecurityTokenServicePreferencesRequestSerializer;
impl SetSecurityTokenServicePreferencesRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetSecurityTokenServicePreferencesRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "GlobalEndpointTokenVersion"),
&obj.global_endpoint_token_version,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SigningCertificate {
pub certificate_body: String,
pub certificate_id: String,
pub status: String,
pub upload_date: Option<String>,
pub user_name: String,
}
struct SigningCertificateDeserializer;
impl SigningCertificateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SigningCertificate, XmlParseError> {
deserialize_elements::<_, SigningCertificate, _>(tag_name, stack, |name, stack, obj| {
match name {
"CertificateBody" => {
obj.certificate_body =
CertificateBodyTypeDeserializer::deserialize("CertificateBody", stack)?;
}
"CertificateId" => {
obj.certificate_id =
CertificateIdTypeDeserializer::deserialize("CertificateId", stack)?;
}
"Status" => {
obj.status = StatusTypeDeserializer::deserialize("Status", stack)?;
}
"UploadDate" => {
obj.upload_date = Some(DateTypeDeserializer::deserialize("UploadDate", stack)?);
}
"UserName" => {
obj.user_name = UserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SimulateCustomPolicyRequest {
pub action_names: Vec<String>,
pub caller_arn: Option<String>,
pub context_entries: Option<Vec<ContextEntry>>,
pub marker: Option<String>,
pub max_items: Option<i64>,
pub policy_input_list: Vec<String>,
pub resource_arns: Option<Vec<String>>,
pub resource_handling_option: Option<String>,
pub resource_owner: Option<String>,
pub resource_policy: Option<String>,
}
struct SimulateCustomPolicyRequestSerializer;
impl SimulateCustomPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SimulateCustomPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ActionNameListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ActionNames"),
&obj.action_names,
);
if let Some(ref field_value) = obj.caller_arn {
params.put(&format!("{}{}", prefix, "CallerArn"), &field_value);
}
if let Some(ref field_value) = obj.context_entries {
ContextEntryListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ContextEntries"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(&format!("{}{}", prefix, "MaxItems"), &field_value);
}
SimulationPolicyListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyInputList"),
&obj.policy_input_list,
);
if let Some(ref field_value) = obj.resource_arns {
ResourceNameListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceArns"),
field_value,
);
}
if let Some(ref field_value) = obj.resource_handling_option {
params.put(
&format!("{}{}", prefix, "ResourceHandlingOption"),
&field_value,
);
}
if let Some(ref field_value) = obj.resource_owner {
params.put(&format!("{}{}", prefix, "ResourceOwner"), &field_value);
}
if let Some(ref field_value) = obj.resource_policy {
params.put(&format!("{}{}", prefix, "ResourcePolicy"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SimulatePolicyResponse {
pub evaluation_results: Option<Vec<EvaluationResult>>,
pub is_truncated: Option<bool>,
pub marker: Option<String>,
}
struct SimulatePolicyResponseDeserializer;
impl SimulatePolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SimulatePolicyResponse, XmlParseError> {
deserialize_elements::<_, SimulatePolicyResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"EvaluationResults" => {
obj.evaluation_results.get_or_insert(vec![]).extend(
EvaluationResultsListTypeDeserializer::deserialize(
"EvaluationResults",
stack,
)?,
);
}
"IsTruncated" => {
obj.is_truncated =
Some(BooleanTypeDeserializer::deserialize("IsTruncated", stack)?);
}
"Marker" => {
obj.marker = Some(ResponseMarkerTypeDeserializer::deserialize(
"Marker", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SimulatePrincipalPolicyRequest {
pub action_names: Vec<String>,
pub caller_arn: Option<String>,
pub context_entries: Option<Vec<ContextEntry>>,
pub marker: Option<String>,
pub max_items: Option<i64>,
pub policy_input_list: Option<Vec<String>>,
pub policy_source_arn: String,
pub resource_arns: Option<Vec<String>>,
pub resource_handling_option: Option<String>,
pub resource_owner: Option<String>,
pub resource_policy: Option<String>,
}
struct SimulatePrincipalPolicyRequestSerializer;
impl SimulatePrincipalPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SimulatePrincipalPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ActionNameListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ActionNames"),
&obj.action_names,
);
if let Some(ref field_value) = obj.caller_arn {
params.put(&format!("{}{}", prefix, "CallerArn"), &field_value);
}
if let Some(ref field_value) = obj.context_entries {
ContextEntryListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ContextEntries"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &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.policy_input_list {
SimulationPolicyListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyInputList"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "PolicySourceArn"),
&obj.policy_source_arn,
);
if let Some(ref field_value) = obj.resource_arns {
ResourceNameListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceArns"),
field_value,
);
}
if let Some(ref field_value) = obj.resource_handling_option {
params.put(
&format!("{}{}", prefix, "ResourceHandlingOption"),
&field_value,
);
}
if let Some(ref field_value) = obj.resource_owner {
params.put(&format!("{}{}", prefix, "ResourceOwner"), &field_value);
}
if let Some(ref field_value) = obj.resource_policy {
params.put(&format!("{}{}", prefix, "ResourcePolicy"), &field_value);
}
}
}
struct SimulationPolicyListTypeSerializer;
impl SimulationPolicyListTypeSerializer {
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 Statement {
pub end_position: Option<Position>,
pub source_policy_id: Option<String>,
pub source_policy_type: Option<String>,
pub start_position: Option<Position>,
}
struct StatementDeserializer;
impl StatementDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Statement, XmlParseError> {
deserialize_elements::<_, Statement, _>(tag_name, stack, |name, stack, obj| {
match name {
"EndPosition" => {
obj.end_position =
Some(PositionDeserializer::deserialize("EndPosition", stack)?);
}
"SourcePolicyId" => {
obj.source_policy_id = Some(PolicyIdentifierTypeDeserializer::deserialize(
"SourcePolicyId",
stack,
)?);
}
"SourcePolicyType" => {
obj.source_policy_type = Some(PolicySourceTypeDeserializer::deserialize(
"SourcePolicyType",
stack,
)?);
}
"StartPosition" => {
obj.start_position =
Some(PositionDeserializer::deserialize("StartPosition", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StatementListTypeDeserializer;
impl StatementListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Statement>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StatementDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct StatusTypeDeserializer;
impl StatusTypeDeserializer {
#[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 StringTypeDeserializer;
impl StringTypeDeserializer {
#[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 SummaryKeyTypeDeserializer;
impl SummaryKeyTypeDeserializer {
#[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 SummaryMapTypeDeserializer;
impl SummaryMapTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<::std::collections::HashMap<String, i64>, 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 = SummaryKeyTypeDeserializer::deserialize("key", stack)?;
let value = SummaryValueTypeDeserializer::deserialize("value", stack)?;
obj.insert(key, value);
end_element("entry", stack)?;
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SummaryValueTypeDeserializer;
impl SummaryValueTypeDeserializer {
#[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 Tag {
pub key: String,
pub value: String,
}
struct TagDeserializer;
impl TagDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = TagKeyTypeDeserializer::deserialize("Key", stack)?;
}
"Value" => {
obj.value = TagValueTypeDeserializer::deserialize("Value", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TagSerializer;
impl TagSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Tag) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Key"), &obj.key);
params.put(&format!("{}{}", prefix, "Value"), &obj.value);
}
}
struct TagKeyListTypeSerializer;
impl TagKeyListTypeSerializer {
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 TagKeyTypeDeserializer;
impl TagKeyTypeDeserializer {
#[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 TagListTypeDeserializer;
impl TagListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Tag>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TagDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TagListTypeSerializer;
impl TagListTypeSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Tag>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
TagSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TagRoleRequest {
pub role_name: String,
pub tags: Vec<Tag>,
}
struct TagRoleRequestSerializer;
impl TagRoleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &TagRoleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
TagListTypeSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), &obj.tags);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TagUserRequest {
pub tags: Vec<Tag>,
pub user_name: String,
}
struct TagUserRequestSerializer;
impl TagUserRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &TagUserRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
TagListTypeSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), &obj.tags);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
struct TagValueTypeDeserializer;
impl TagValueTypeDeserializer {
#[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 ThumbprintListTypeDeserializer;
impl ThumbprintListTypeDeserializer {
#[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(ThumbprintTypeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ThumbprintListTypeSerializer;
impl ThumbprintListTypeSerializer {
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 ThumbprintTypeDeserializer;
impl ThumbprintTypeDeserializer {
#[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 UntagRoleRequest {
pub role_name: String,
pub tag_keys: Vec<String>,
}
struct UntagRoleRequestSerializer;
impl UntagRoleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UntagRoleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
TagKeyListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKeys"),
&obj.tag_keys,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UntagUserRequest {
pub tag_keys: Vec<String>,
pub user_name: String,
}
struct UntagUserRequestSerializer;
impl UntagUserRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UntagUserRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
TagKeyListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKeys"),
&obj.tag_keys,
);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateAccessKeyRequest {
pub access_key_id: String,
pub status: String,
pub user_name: Option<String>,
}
struct UpdateAccessKeyRequestSerializer;
impl UpdateAccessKeyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateAccessKeyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "AccessKeyId"), &obj.access_key_id);
params.put(&format!("{}{}", prefix, "Status"), &obj.status);
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateAccountPasswordPolicyRequest {
pub allow_users_to_change_password: Option<bool>,
pub hard_expiry: Option<bool>,
pub max_password_age: Option<i64>,
pub minimum_password_length: Option<i64>,
pub password_reuse_prevention: Option<i64>,
pub require_lowercase_characters: Option<bool>,
pub require_numbers: Option<bool>,
pub require_symbols: Option<bool>,
pub require_uppercase_characters: Option<bool>,
}
struct UpdateAccountPasswordPolicyRequestSerializer;
impl UpdateAccountPasswordPolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateAccountPasswordPolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.allow_users_to_change_password {
params.put(
&format!("{}{}", prefix, "AllowUsersToChangePassword"),
&field_value,
);
}
if let Some(ref field_value) = obj.hard_expiry {
params.put(&format!("{}{}", prefix, "HardExpiry"), &field_value);
}
if let Some(ref field_value) = obj.max_password_age {
params.put(&format!("{}{}", prefix, "MaxPasswordAge"), &field_value);
}
if let Some(ref field_value) = obj.minimum_password_length {
params.put(
&format!("{}{}", prefix, "MinimumPasswordLength"),
&field_value,
);
}
if let Some(ref field_value) = obj.password_reuse_prevention {
params.put(
&format!("{}{}", prefix, "PasswordReusePrevention"),
&field_value,
);
}
if let Some(ref field_value) = obj.require_lowercase_characters {
params.put(
&format!("{}{}", prefix, "RequireLowercaseCharacters"),
&field_value,
);
}
if let Some(ref field_value) = obj.require_numbers {
params.put(&format!("{}{}", prefix, "RequireNumbers"), &field_value);
}
if let Some(ref field_value) = obj.require_symbols {
params.put(&format!("{}{}", prefix, "RequireSymbols"), &field_value);
}
if let Some(ref field_value) = obj.require_uppercase_characters {
params.put(
&format!("{}{}", prefix, "RequireUppercaseCharacters"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateAssumeRolePolicyRequest {
pub policy_document: String,
pub role_name: String,
}
struct UpdateAssumeRolePolicyRequestSerializer;
impl UpdateAssumeRolePolicyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateAssumeRolePolicyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "PolicyDocument"),
&obj.policy_document,
);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateGroupRequest {
pub group_name: String,
pub new_group_name: Option<String>,
pub new_path: Option<String>,
}
struct UpdateGroupRequestSerializer;
impl UpdateGroupRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateGroupRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "GroupName"), &obj.group_name);
if let Some(ref field_value) = obj.new_group_name {
params.put(&format!("{}{}", prefix, "NewGroupName"), &field_value);
}
if let Some(ref field_value) = obj.new_path {
params.put(&format!("{}{}", prefix, "NewPath"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateLoginProfileRequest {
pub password: Option<String>,
pub password_reset_required: Option<bool>,
pub user_name: String,
}
struct UpdateLoginProfileRequestSerializer;
impl UpdateLoginProfileRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateLoginProfileRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.password {
params.put(&format!("{}{}", prefix, "Password"), &field_value);
}
if let Some(ref field_value) = obj.password_reset_required {
params.put(
&format!("{}{}", prefix, "PasswordResetRequired"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateOpenIDConnectProviderThumbprintRequest {
pub open_id_connect_provider_arn: String,
pub thumbprint_list: Vec<String>,
}
struct UpdateOpenIDConnectProviderThumbprintRequestSerializer;
impl UpdateOpenIDConnectProviderThumbprintRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &UpdateOpenIDConnectProviderThumbprintRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "OpenIDConnectProviderArn"),
&obj.open_id_connect_provider_arn,
);
ThumbprintListTypeSerializer::serialize(
params,
&format!("{}{}", prefix, "ThumbprintList"),
&obj.thumbprint_list,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateRoleDescriptionRequest {
pub description: String,
pub role_name: String,
}
struct UpdateRoleDescriptionRequestSerializer;
impl UpdateRoleDescriptionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateRoleDescriptionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Description"), &obj.description);
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateRoleDescriptionResponse {
pub role: Option<Role>,
}
struct UpdateRoleDescriptionResponseDeserializer;
impl UpdateRoleDescriptionResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateRoleDescriptionResponse, XmlParseError> {
deserialize_elements::<_, UpdateRoleDescriptionResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Role" => {
obj.role = Some(RoleDeserializer::deserialize("Role", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateRoleRequest {
pub description: Option<String>,
pub max_session_duration: Option<i64>,
pub role_name: String,
}
struct UpdateRoleRequestSerializer;
impl UpdateRoleRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateRoleRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.max_session_duration {
params.put(&format!("{}{}", prefix, "MaxSessionDuration"), &field_value);
}
params.put(&format!("{}{}", prefix, "RoleName"), &obj.role_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateRoleResponse {}
struct UpdateRoleResponseDeserializer;
impl UpdateRoleResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateRoleResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = UpdateRoleResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateSAMLProviderRequest {
pub saml_metadata_document: String,
pub saml_provider_arn: String,
}
struct UpdateSAMLProviderRequestSerializer;
impl UpdateSAMLProviderRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateSAMLProviderRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SAMLMetadataDocument"),
&obj.saml_metadata_document,
);
params.put(
&format!("{}{}", prefix, "SAMLProviderArn"),
&obj.saml_provider_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateSAMLProviderResponse {
pub saml_provider_arn: Option<String>,
}
struct UpdateSAMLProviderResponseDeserializer;
impl UpdateSAMLProviderResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateSAMLProviderResponse, XmlParseError> {
deserialize_elements::<_, UpdateSAMLProviderResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SAMLProviderArn" => {
obj.saml_provider_arn =
Some(ArnTypeDeserializer::deserialize("SAMLProviderArn", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateSSHPublicKeyRequest {
pub ssh_public_key_id: String,
pub status: String,
pub user_name: String,
}
struct UpdateSSHPublicKeyRequestSerializer;
impl UpdateSSHPublicKeyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateSSHPublicKeyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SSHPublicKeyId"),
&obj.ssh_public_key_id,
);
params.put(&format!("{}{}", prefix, "Status"), &obj.status);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateServerCertificateRequest {
pub new_path: Option<String>,
pub new_server_certificate_name: Option<String>,
pub server_certificate_name: String,
}
struct UpdateServerCertificateRequestSerializer;
impl UpdateServerCertificateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateServerCertificateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.new_path {
params.put(&format!("{}{}", prefix, "NewPath"), &field_value);
}
if let Some(ref field_value) = obj.new_server_certificate_name {
params.put(
&format!("{}{}", prefix, "NewServerCertificateName"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "ServerCertificateName"),
&obj.server_certificate_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateServiceSpecificCredentialRequest {
pub service_specific_credential_id: String,
pub status: String,
pub user_name: Option<String>,
}
struct UpdateServiceSpecificCredentialRequestSerializer;
impl UpdateServiceSpecificCredentialRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateServiceSpecificCredentialRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ServiceSpecificCredentialId"),
&obj.service_specific_credential_id,
);
params.put(&format!("{}{}", prefix, "Status"), &obj.status);
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateSigningCertificateRequest {
pub certificate_id: String,
pub status: String,
pub user_name: Option<String>,
}
struct UpdateSigningCertificateRequestSerializer;
impl UpdateSigningCertificateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateSigningCertificateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "CertificateId"),
&obj.certificate_id,
);
params.put(&format!("{}{}", prefix, "Status"), &obj.status);
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateUserRequest {
pub new_path: Option<String>,
pub new_user_name: Option<String>,
pub user_name: String,
}
struct UpdateUserRequestSerializer;
impl UpdateUserRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateUserRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.new_path {
params.put(&format!("{}{}", prefix, "NewPath"), &field_value);
}
if let Some(ref field_value) = obj.new_user_name {
params.put(&format!("{}{}", prefix, "NewUserName"), &field_value);
}
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UploadSSHPublicKeyRequest {
pub ssh_public_key_body: String,
pub user_name: String,
}
struct UploadSSHPublicKeyRequestSerializer;
impl UploadSSHPublicKeyRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UploadSSHPublicKeyRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SSHPublicKeyBody"),
&obj.ssh_public_key_body,
);
params.put(&format!("{}{}", prefix, "UserName"), &obj.user_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UploadSSHPublicKeyResponse {
pub ssh_public_key: Option<SSHPublicKey>,
}
struct UploadSSHPublicKeyResponseDeserializer;
impl UploadSSHPublicKeyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UploadSSHPublicKeyResponse, XmlParseError> {
deserialize_elements::<_, UploadSSHPublicKeyResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SSHPublicKey" => {
obj.ssh_public_key = Some(SSHPublicKeyDeserializer::deserialize(
"SSHPublicKey",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UploadServerCertificateRequest {
pub certificate_body: String,
pub certificate_chain: Option<String>,
pub path: Option<String>,
pub private_key: String,
pub server_certificate_name: String,
}
struct UploadServerCertificateRequestSerializer;
impl UploadServerCertificateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UploadServerCertificateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "CertificateBody"),
&obj.certificate_body,
);
if let Some(ref field_value) = obj.certificate_chain {
params.put(&format!("{}{}", prefix, "CertificateChain"), &field_value);
}
if let Some(ref field_value) = obj.path {
params.put(&format!("{}{}", prefix, "Path"), &field_value);
}
params.put(&format!("{}{}", prefix, "PrivateKey"), &obj.private_key);
params.put(
&format!("{}{}", prefix, "ServerCertificateName"),
&obj.server_certificate_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UploadServerCertificateResponse {
pub server_certificate_metadata: Option<ServerCertificateMetadata>,
}
struct UploadServerCertificateResponseDeserializer;
impl UploadServerCertificateResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UploadServerCertificateResponse, XmlParseError> {
deserialize_elements::<_, UploadServerCertificateResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ServerCertificateMetadata" => {
obj.server_certificate_metadata =
Some(ServerCertificateMetadataDeserializer::deserialize(
"ServerCertificateMetadata",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UploadSigningCertificateRequest {
pub certificate_body: String,
pub user_name: Option<String>,
}
struct UploadSigningCertificateRequestSerializer;
impl UploadSigningCertificateRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UploadSigningCertificateRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "CertificateBody"),
&obj.certificate_body,
);
if let Some(ref field_value) = obj.user_name {
params.put(&format!("{}{}", prefix, "UserName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UploadSigningCertificateResponse {
pub certificate: SigningCertificate,
}
struct UploadSigningCertificateResponseDeserializer;
impl UploadSigningCertificateResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UploadSigningCertificateResponse, XmlParseError> {
deserialize_elements::<_, UploadSigningCertificateResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Certificate" => {
obj.certificate =
SigningCertificateDeserializer::deserialize("Certificate", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct User {
pub arn: String,
pub create_date: String,
pub password_last_used: Option<String>,
pub path: String,
pub permissions_boundary: Option<AttachedPermissionsBoundary>,
pub tags: Option<Vec<Tag>>,
pub user_id: String,
pub user_name: String,
}
struct UserDeserializer;
impl UserDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<User, XmlParseError> {
deserialize_elements::<_, User, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = ArnTypeDeserializer::deserialize("Arn", stack)?;
}
"CreateDate" => {
obj.create_date = DateTypeDeserializer::deserialize("CreateDate", stack)?;
}
"PasswordLastUsed" => {
obj.password_last_used = Some(DateTypeDeserializer::deserialize(
"PasswordLastUsed",
stack,
)?);
}
"Path" => {
obj.path = PathTypeDeserializer::deserialize("Path", stack)?;
}
"PermissionsBoundary" => {
obj.permissions_boundary =
Some(AttachedPermissionsBoundaryDeserializer::deserialize(
"PermissionsBoundary",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListTypeDeserializer::deserialize("Tags", stack)?);
}
"UserId" => {
obj.user_id = IdTypeDeserializer::deserialize("UserId", stack)?;
}
"UserName" => {
obj.user_name = UserNameTypeDeserializer::deserialize("UserName", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UserDetail {
pub arn: Option<String>,
pub attached_managed_policies: Option<Vec<AttachedPolicy>>,
pub create_date: Option<String>,
pub group_list: Option<Vec<String>>,
pub path: Option<String>,
pub permissions_boundary: Option<AttachedPermissionsBoundary>,
pub tags: Option<Vec<Tag>>,
pub user_id: Option<String>,
pub user_name: Option<String>,
pub user_policy_list: Option<Vec<PolicyDetail>>,
}
struct UserDetailDeserializer;
impl UserDetailDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UserDetail, XmlParseError> {
deserialize_elements::<_, UserDetail, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = Some(ArnTypeDeserializer::deserialize("Arn", stack)?);
}
"AttachedManagedPolicies" => {
obj.attached_managed_policies.get_or_insert(vec![]).extend(
AttachedPoliciesListTypeDeserializer::deserialize(
"AttachedManagedPolicies",
stack,
)?,
);
}
"CreateDate" => {
obj.create_date = Some(DateTypeDeserializer::deserialize("CreateDate", stack)?);
}
"GroupList" => {
obj.group_list.get_or_insert(vec![]).extend(
GroupNameListTypeDeserializer::deserialize("GroupList", stack)?,
);
}
"Path" => {
obj.path = Some(PathTypeDeserializer::deserialize("Path", stack)?);
}
"PermissionsBoundary" => {
obj.permissions_boundary =
Some(AttachedPermissionsBoundaryDeserializer::deserialize(
"PermissionsBoundary",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListTypeDeserializer::deserialize("Tags", stack)?);
}
"UserId" => {
obj.user_id = Some(IdTypeDeserializer::deserialize("UserId", stack)?);
}
"UserName" => {
obj.user_name = Some(UserNameTypeDeserializer::deserialize("UserName", stack)?);
}
"UserPolicyList" => {
obj.user_policy_list.get_or_insert(vec![]).extend(
PolicyDetailListTypeDeserializer::deserialize("UserPolicyList", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct UserDetailListTypeDeserializer;
impl UserDetailListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<UserDetail>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(UserDetailDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct UserListTypeDeserializer;
impl UserListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<User>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(UserDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct UserNameTypeDeserializer;
impl UserNameTypeDeserializer {
#[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 VirtualMFADevice {
pub base_32_string_seed: Option<bytes::Bytes>,
pub enable_date: Option<String>,
pub qr_code_png: Option<bytes::Bytes>,
pub serial_number: String,
pub user: Option<User>,
}
struct VirtualMFADeviceDeserializer;
impl VirtualMFADeviceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<VirtualMFADevice, XmlParseError> {
deserialize_elements::<_, VirtualMFADevice, _>(tag_name, stack, |name, stack, obj| {
match name {
"Base32StringSeed" => {
obj.base_32_string_seed = Some(BootstrapDatumDeserializer::deserialize(
"Base32StringSeed",
stack,
)?);
}
"EnableDate" => {
obj.enable_date = Some(DateTypeDeserializer::deserialize("EnableDate", stack)?);
}
"QRCodePNG" => {
obj.qr_code_png =
Some(BootstrapDatumDeserializer::deserialize("QRCodePNG", stack)?);
}
"SerialNumber" => {
obj.serial_number =
SerialNumberTypeDeserializer::deserialize("SerialNumber", stack)?;
}
"User" => {
obj.user = Some(UserDeserializer::deserialize("User", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct VirtualMFADeviceListTypeDeserializer;
impl VirtualMFADeviceListTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<VirtualMFADevice>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(VirtualMFADeviceDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Debug, PartialEq)]
pub enum AddClientIDToOpenIDConnectProviderError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl AddClientIDToOpenIDConnectProviderError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AddClientIDToOpenIDConnectProviderError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
AddClientIDToOpenIDConnectProviderError::InvalidInput(
parsed_error.message,
),
)
}
"LimitExceeded" => {
return RusotoError::Service(
AddClientIDToOpenIDConnectProviderError::LimitExceeded(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
AddClientIDToOpenIDConnectProviderError::NoSuchEntity(
parsed_error.message,
),
)
}
"ServiceFailure" => {
return RusotoError::Service(
AddClientIDToOpenIDConnectProviderError::ServiceFailure(
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 AddClientIDToOpenIDConnectProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddClientIDToOpenIDConnectProviderError {
fn description(&self) -> &str {
match *self {
AddClientIDToOpenIDConnectProviderError::InvalidInput(ref cause) => cause,
AddClientIDToOpenIDConnectProviderError::LimitExceeded(ref cause) => cause,
AddClientIDToOpenIDConnectProviderError::NoSuchEntity(ref cause) => cause,
AddClientIDToOpenIDConnectProviderError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddRoleToInstanceProfileError {
EntityAlreadyExists(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl AddRoleToInstanceProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddRoleToInstanceProfileError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(
AddRoleToInstanceProfileError::EntityAlreadyExists(
parsed_error.message,
),
)
}
"LimitExceeded" => {
return RusotoError::Service(AddRoleToInstanceProfileError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(AddRoleToInstanceProfileError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(AddRoleToInstanceProfileError::ServiceFailure(
parsed_error.message,
))
}
"UnmodifiableEntity" => {
return RusotoError::Service(
AddRoleToInstanceProfileError::UnmodifiableEntity(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 AddRoleToInstanceProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddRoleToInstanceProfileError {
fn description(&self) -> &str {
match *self {
AddRoleToInstanceProfileError::EntityAlreadyExists(ref cause) => cause,
AddRoleToInstanceProfileError::LimitExceeded(ref cause) => cause,
AddRoleToInstanceProfileError::NoSuchEntity(ref cause) => cause,
AddRoleToInstanceProfileError::ServiceFailure(ref cause) => cause,
AddRoleToInstanceProfileError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddUserToGroupError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl AddUserToGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddUserToGroupError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(AddUserToGroupError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(AddUserToGroupError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(AddUserToGroupError::ServiceFailure(
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 AddUserToGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddUserToGroupError {
fn description(&self) -> &str {
match *self {
AddUserToGroupError::LimitExceeded(ref cause) => cause,
AddUserToGroupError::NoSuchEntity(ref cause) => cause,
AddUserToGroupError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachGroupPolicyError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
PolicyNotAttachable(String),
ServiceFailure(String),
}
impl AttachGroupPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachGroupPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(AttachGroupPolicyError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(AttachGroupPolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(AttachGroupPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"PolicyNotAttachable" => {
return RusotoError::Service(AttachGroupPolicyError::PolicyNotAttachable(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(AttachGroupPolicyError::ServiceFailure(
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 AttachGroupPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachGroupPolicyError {
fn description(&self) -> &str {
match *self {
AttachGroupPolicyError::InvalidInput(ref cause) => cause,
AttachGroupPolicyError::LimitExceeded(ref cause) => cause,
AttachGroupPolicyError::NoSuchEntity(ref cause) => cause,
AttachGroupPolicyError::PolicyNotAttachable(ref cause) => cause,
AttachGroupPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachRolePolicyError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
PolicyNotAttachable(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl AttachRolePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachRolePolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(AttachRolePolicyError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(AttachRolePolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(AttachRolePolicyError::NoSuchEntity(
parsed_error.message,
))
}
"PolicyNotAttachable" => {
return RusotoError::Service(AttachRolePolicyError::PolicyNotAttachable(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(AttachRolePolicyError::ServiceFailure(
parsed_error.message,
))
}
"UnmodifiableEntity" => {
return RusotoError::Service(AttachRolePolicyError::UnmodifiableEntity(
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 AttachRolePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachRolePolicyError {
fn description(&self) -> &str {
match *self {
AttachRolePolicyError::InvalidInput(ref cause) => cause,
AttachRolePolicyError::LimitExceeded(ref cause) => cause,
AttachRolePolicyError::NoSuchEntity(ref cause) => cause,
AttachRolePolicyError::PolicyNotAttachable(ref cause) => cause,
AttachRolePolicyError::ServiceFailure(ref cause) => cause,
AttachRolePolicyError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachUserPolicyError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
PolicyNotAttachable(String),
ServiceFailure(String),
}
impl AttachUserPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachUserPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(AttachUserPolicyError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(AttachUserPolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(AttachUserPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"PolicyNotAttachable" => {
return RusotoError::Service(AttachUserPolicyError::PolicyNotAttachable(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(AttachUserPolicyError::ServiceFailure(
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 AttachUserPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachUserPolicyError {
fn description(&self) -> &str {
match *self {
AttachUserPolicyError::InvalidInput(ref cause) => cause,
AttachUserPolicyError::LimitExceeded(ref cause) => cause,
AttachUserPolicyError::NoSuchEntity(ref cause) => cause,
AttachUserPolicyError::PolicyNotAttachable(ref cause) => cause,
AttachUserPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ChangePasswordError {
EntityTemporarilyUnmodifiable(String),
InvalidUserType(String),
LimitExceeded(String),
NoSuchEntity(String),
PasswordPolicyViolation(String),
ServiceFailure(String),
}
impl ChangePasswordError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ChangePasswordError> {
{
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[..] {
"EntityTemporarilyUnmodifiable" => {
return RusotoError::Service(
ChangePasswordError::EntityTemporarilyUnmodifiable(
parsed_error.message,
),
)
}
"InvalidUserType" => {
return RusotoError::Service(ChangePasswordError::InvalidUserType(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(ChangePasswordError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(ChangePasswordError::NoSuchEntity(
parsed_error.message,
))
}
"PasswordPolicyViolation" => {
return RusotoError::Service(ChangePasswordError::PasswordPolicyViolation(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ChangePasswordError::ServiceFailure(
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 ChangePasswordError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ChangePasswordError {
fn description(&self) -> &str {
match *self {
ChangePasswordError::EntityTemporarilyUnmodifiable(ref cause) => cause,
ChangePasswordError::InvalidUserType(ref cause) => cause,
ChangePasswordError::LimitExceeded(ref cause) => cause,
ChangePasswordError::NoSuchEntity(ref cause) => cause,
ChangePasswordError::PasswordPolicyViolation(ref cause) => cause,
ChangePasswordError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateAccessKeyError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl CreateAccessKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAccessKeyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(CreateAccessKeyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(CreateAccessKeyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreateAccessKeyError::ServiceFailure(
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 CreateAccessKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAccessKeyError {
fn description(&self) -> &str {
match *self {
CreateAccessKeyError::LimitExceeded(ref cause) => cause,
CreateAccessKeyError::NoSuchEntity(ref cause) => cause,
CreateAccessKeyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateAccountAliasError {
EntityAlreadyExists(String),
LimitExceeded(String),
ServiceFailure(String),
}
impl CreateAccountAliasError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAccountAliasError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(CreateAccountAliasError::EntityAlreadyExists(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateAccountAliasError::LimitExceeded(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreateAccountAliasError::ServiceFailure(
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 CreateAccountAliasError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAccountAliasError {
fn description(&self) -> &str {
match *self {
CreateAccountAliasError::EntityAlreadyExists(ref cause) => cause,
CreateAccountAliasError::LimitExceeded(ref cause) => cause,
CreateAccountAliasError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateGroupError {
EntityAlreadyExists(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl CreateGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGroupError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(CreateGroupError::EntityAlreadyExists(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateGroupError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(CreateGroupError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreateGroupError::ServiceFailure(
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 CreateGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateGroupError {
fn description(&self) -> &str {
match *self {
CreateGroupError::EntityAlreadyExists(ref cause) => cause,
CreateGroupError::LimitExceeded(ref cause) => cause,
CreateGroupError::NoSuchEntity(ref cause) => cause,
CreateGroupError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateInstanceProfileError {
EntityAlreadyExists(String),
LimitExceeded(String),
ServiceFailure(String),
}
impl CreateInstanceProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateInstanceProfileError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(
CreateInstanceProfileError::EntityAlreadyExists(parsed_error.message),
)
}
"LimitExceeded" => {
return RusotoError::Service(CreateInstanceProfileError::LimitExceeded(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreateInstanceProfileError::ServiceFailure(
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 CreateInstanceProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateInstanceProfileError {
fn description(&self) -> &str {
match *self {
CreateInstanceProfileError::EntityAlreadyExists(ref cause) => cause,
CreateInstanceProfileError::LimitExceeded(ref cause) => cause,
CreateInstanceProfileError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLoginProfileError {
EntityAlreadyExists(String),
LimitExceeded(String),
NoSuchEntity(String),
PasswordPolicyViolation(String),
ServiceFailure(String),
}
impl CreateLoginProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLoginProfileError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(CreateLoginProfileError::EntityAlreadyExists(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateLoginProfileError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(CreateLoginProfileError::NoSuchEntity(
parsed_error.message,
))
}
"PasswordPolicyViolation" => {
return RusotoError::Service(
CreateLoginProfileError::PasswordPolicyViolation(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(CreateLoginProfileError::ServiceFailure(
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 CreateLoginProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateLoginProfileError {
fn description(&self) -> &str {
match *self {
CreateLoginProfileError::EntityAlreadyExists(ref cause) => cause,
CreateLoginProfileError::LimitExceeded(ref cause) => cause,
CreateLoginProfileError::NoSuchEntity(ref cause) => cause,
CreateLoginProfileError::PasswordPolicyViolation(ref cause) => cause,
CreateLoginProfileError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateOpenIDConnectProviderError {
EntityAlreadyExists(String),
InvalidInput(String),
LimitExceeded(String),
ServiceFailure(String),
}
impl CreateOpenIDConnectProviderError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateOpenIDConnectProviderError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(
CreateOpenIDConnectProviderError::EntityAlreadyExists(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(
CreateOpenIDConnectProviderError::InvalidInput(parsed_error.message),
)
}
"LimitExceeded" => {
return RusotoError::Service(
CreateOpenIDConnectProviderError::LimitExceeded(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(
CreateOpenIDConnectProviderError::ServiceFailure(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 CreateOpenIDConnectProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateOpenIDConnectProviderError {
fn description(&self) -> &str {
match *self {
CreateOpenIDConnectProviderError::EntityAlreadyExists(ref cause) => cause,
CreateOpenIDConnectProviderError::InvalidInput(ref cause) => cause,
CreateOpenIDConnectProviderError::LimitExceeded(ref cause) => cause,
CreateOpenIDConnectProviderError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePolicyError {
EntityAlreadyExists(String),
InvalidInput(String),
LimitExceeded(String),
MalformedPolicyDocument(String),
ServiceFailure(String),
}
impl CreatePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePolicyError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(CreatePolicyError::EntityAlreadyExists(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(CreatePolicyError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreatePolicyError::LimitExceeded(
parsed_error.message,
))
}
"MalformedPolicyDocument" => {
return RusotoError::Service(CreatePolicyError::MalformedPolicyDocument(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreatePolicyError::ServiceFailure(
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 CreatePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePolicyError {
fn description(&self) -> &str {
match *self {
CreatePolicyError::EntityAlreadyExists(ref cause) => cause,
CreatePolicyError::InvalidInput(ref cause) => cause,
CreatePolicyError::LimitExceeded(ref cause) => cause,
CreatePolicyError::MalformedPolicyDocument(ref cause) => cause,
CreatePolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePolicyVersionError {
InvalidInput(String),
LimitExceeded(String),
MalformedPolicyDocument(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl CreatePolicyVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePolicyVersionError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(CreatePolicyVersionError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreatePolicyVersionError::LimitExceeded(
parsed_error.message,
))
}
"MalformedPolicyDocument" => {
return RusotoError::Service(
CreatePolicyVersionError::MalformedPolicyDocument(parsed_error.message),
)
}
"NoSuchEntity" => {
return RusotoError::Service(CreatePolicyVersionError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreatePolicyVersionError::ServiceFailure(
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 CreatePolicyVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePolicyVersionError {
fn description(&self) -> &str {
match *self {
CreatePolicyVersionError::InvalidInput(ref cause) => cause,
CreatePolicyVersionError::LimitExceeded(ref cause) => cause,
CreatePolicyVersionError::MalformedPolicyDocument(ref cause) => cause,
CreatePolicyVersionError::NoSuchEntity(ref cause) => cause,
CreatePolicyVersionError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateRoleError {
ConcurrentModification(String),
EntityAlreadyExists(String),
InvalidInput(String),
LimitExceeded(String),
MalformedPolicyDocument(String),
ServiceFailure(String),
}
impl CreateRoleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRoleError> {
{
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[..] {
"ConcurrentModification" => {
return RusotoError::Service(CreateRoleError::ConcurrentModification(
parsed_error.message,
))
}
"EntityAlreadyExists" => {
return RusotoError::Service(CreateRoleError::EntityAlreadyExists(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(CreateRoleError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateRoleError::LimitExceeded(
parsed_error.message,
))
}
"MalformedPolicyDocument" => {
return RusotoError::Service(CreateRoleError::MalformedPolicyDocument(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreateRoleError::ServiceFailure(
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 CreateRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateRoleError {
fn description(&self) -> &str {
match *self {
CreateRoleError::ConcurrentModification(ref cause) => cause,
CreateRoleError::EntityAlreadyExists(ref cause) => cause,
CreateRoleError::InvalidInput(ref cause) => cause,
CreateRoleError::LimitExceeded(ref cause) => cause,
CreateRoleError::MalformedPolicyDocument(ref cause) => cause,
CreateRoleError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSAMLProviderError {
EntityAlreadyExists(String),
InvalidInput(String),
LimitExceeded(String),
ServiceFailure(String),
}
impl CreateSAMLProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSAMLProviderError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(CreateSAMLProviderError::EntityAlreadyExists(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(CreateSAMLProviderError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateSAMLProviderError::LimitExceeded(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreateSAMLProviderError::ServiceFailure(
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 CreateSAMLProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSAMLProviderError {
fn description(&self) -> &str {
match *self {
CreateSAMLProviderError::EntityAlreadyExists(ref cause) => cause,
CreateSAMLProviderError::InvalidInput(ref cause) => cause,
CreateSAMLProviderError::LimitExceeded(ref cause) => cause,
CreateSAMLProviderError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateServiceLinkedRoleError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl CreateServiceLinkedRoleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateServiceLinkedRoleError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(CreateServiceLinkedRoleError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateServiceLinkedRoleError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(CreateServiceLinkedRoleError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreateServiceLinkedRoleError::ServiceFailure(
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 CreateServiceLinkedRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateServiceLinkedRoleError {
fn description(&self) -> &str {
match *self {
CreateServiceLinkedRoleError::InvalidInput(ref cause) => cause,
CreateServiceLinkedRoleError::LimitExceeded(ref cause) => cause,
CreateServiceLinkedRoleError::NoSuchEntity(ref cause) => cause,
CreateServiceLinkedRoleError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateServiceSpecificCredentialError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceNotSupported(String),
}
impl CreateServiceSpecificCredentialError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateServiceSpecificCredentialError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(
CreateServiceSpecificCredentialError::LimitExceeded(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
CreateServiceSpecificCredentialError::NoSuchEntity(
parsed_error.message,
),
)
}
"NotSupportedService" => {
return RusotoError::Service(
CreateServiceSpecificCredentialError::ServiceNotSupported(
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 CreateServiceSpecificCredentialError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateServiceSpecificCredentialError {
fn description(&self) -> &str {
match *self {
CreateServiceSpecificCredentialError::LimitExceeded(ref cause) => cause,
CreateServiceSpecificCredentialError::NoSuchEntity(ref cause) => cause,
CreateServiceSpecificCredentialError::ServiceNotSupported(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateUserError {
ConcurrentModification(String),
EntityAlreadyExists(String),
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl CreateUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserError> {
{
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[..] {
"ConcurrentModification" => {
return RusotoError::Service(CreateUserError::ConcurrentModification(
parsed_error.message,
))
}
"EntityAlreadyExists" => {
return RusotoError::Service(CreateUserError::EntityAlreadyExists(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(CreateUserError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(CreateUserError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(CreateUserError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreateUserError::ServiceFailure(
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 CreateUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUserError {
fn description(&self) -> &str {
match *self {
CreateUserError::ConcurrentModification(ref cause) => cause,
CreateUserError::EntityAlreadyExists(ref cause) => cause,
CreateUserError::InvalidInput(ref cause) => cause,
CreateUserError::LimitExceeded(ref cause) => cause,
CreateUserError::NoSuchEntity(ref cause) => cause,
CreateUserError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateVirtualMFADeviceError {
EntityAlreadyExists(String),
LimitExceeded(String),
ServiceFailure(String),
}
impl CreateVirtualMFADeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVirtualMFADeviceError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(
CreateVirtualMFADeviceError::EntityAlreadyExists(parsed_error.message),
)
}
"LimitExceeded" => {
return RusotoError::Service(CreateVirtualMFADeviceError::LimitExceeded(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(CreateVirtualMFADeviceError::ServiceFailure(
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 CreateVirtualMFADeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateVirtualMFADeviceError {
fn description(&self) -> &str {
match *self {
CreateVirtualMFADeviceError::EntityAlreadyExists(ref cause) => cause,
CreateVirtualMFADeviceError::LimitExceeded(ref cause) => cause,
CreateVirtualMFADeviceError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeactivateMFADeviceError {
EntityTemporarilyUnmodifiable(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeactivateMFADeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeactivateMFADeviceError> {
{
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[..] {
"EntityTemporarilyUnmodifiable" => {
return RusotoError::Service(
DeactivateMFADeviceError::EntityTemporarilyUnmodifiable(
parsed_error.message,
),
)
}
"LimitExceeded" => {
return RusotoError::Service(DeactivateMFADeviceError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeactivateMFADeviceError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeactivateMFADeviceError::ServiceFailure(
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 DeactivateMFADeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeactivateMFADeviceError {
fn description(&self) -> &str {
match *self {
DeactivateMFADeviceError::EntityTemporarilyUnmodifiable(ref cause) => cause,
DeactivateMFADeviceError::LimitExceeded(ref cause) => cause,
DeactivateMFADeviceError::NoSuchEntity(ref cause) => cause,
DeactivateMFADeviceError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAccessKeyError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteAccessKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAccessKeyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(DeleteAccessKeyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteAccessKeyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteAccessKeyError::ServiceFailure(
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 DeleteAccessKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAccessKeyError {
fn description(&self) -> &str {
match *self {
DeleteAccessKeyError::LimitExceeded(ref cause) => cause,
DeleteAccessKeyError::NoSuchEntity(ref cause) => cause,
DeleteAccessKeyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAccountAliasError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteAccountAliasError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAccountAliasError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(DeleteAccountAliasError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteAccountAliasError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteAccountAliasError::ServiceFailure(
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 DeleteAccountAliasError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAccountAliasError {
fn description(&self) -> &str {
match *self {
DeleteAccountAliasError::LimitExceeded(ref cause) => cause,
DeleteAccountAliasError::NoSuchEntity(ref cause) => cause,
DeleteAccountAliasError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAccountPasswordPolicyError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteAccountPasswordPolicyError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteAccountPasswordPolicyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(
DeleteAccountPasswordPolicyError::LimitExceeded(parsed_error.message),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
DeleteAccountPasswordPolicyError::NoSuchEntity(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(
DeleteAccountPasswordPolicyError::ServiceFailure(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 DeleteAccountPasswordPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAccountPasswordPolicyError {
fn description(&self) -> &str {
match *self {
DeleteAccountPasswordPolicyError::LimitExceeded(ref cause) => cause,
DeleteAccountPasswordPolicyError::NoSuchEntity(ref cause) => cause,
DeleteAccountPasswordPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteGroupError {
DeleteConflict(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGroupError> {
{
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[..] {
"DeleteConflict" => {
return RusotoError::Service(DeleteGroupError::DeleteConflict(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DeleteGroupError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteGroupError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteGroupError::ServiceFailure(
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 DeleteGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteGroupError {
fn description(&self) -> &str {
match *self {
DeleteGroupError::DeleteConflict(ref cause) => cause,
DeleteGroupError::LimitExceeded(ref cause) => cause,
DeleteGroupError::NoSuchEntity(ref cause) => cause,
DeleteGroupError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteGroupPolicyError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteGroupPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGroupPolicyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(DeleteGroupPolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteGroupPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteGroupPolicyError::ServiceFailure(
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 DeleteGroupPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteGroupPolicyError {
fn description(&self) -> &str {
match *self {
DeleteGroupPolicyError::LimitExceeded(ref cause) => cause,
DeleteGroupPolicyError::NoSuchEntity(ref cause) => cause,
DeleteGroupPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteInstanceProfileError {
DeleteConflict(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteInstanceProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteInstanceProfileError> {
{
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[..] {
"DeleteConflict" => {
return RusotoError::Service(DeleteInstanceProfileError::DeleteConflict(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DeleteInstanceProfileError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteInstanceProfileError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteInstanceProfileError::ServiceFailure(
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 DeleteInstanceProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteInstanceProfileError {
fn description(&self) -> &str {
match *self {
DeleteInstanceProfileError::DeleteConflict(ref cause) => cause,
DeleteInstanceProfileError::LimitExceeded(ref cause) => cause,
DeleteInstanceProfileError::NoSuchEntity(ref cause) => cause,
DeleteInstanceProfileError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteLoginProfileError {
EntityTemporarilyUnmodifiable(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteLoginProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLoginProfileError> {
{
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[..] {
"EntityTemporarilyUnmodifiable" => {
return RusotoError::Service(
DeleteLoginProfileError::EntityTemporarilyUnmodifiable(
parsed_error.message,
),
)
}
"LimitExceeded" => {
return RusotoError::Service(DeleteLoginProfileError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteLoginProfileError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteLoginProfileError::ServiceFailure(
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 DeleteLoginProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteLoginProfileError {
fn description(&self) -> &str {
match *self {
DeleteLoginProfileError::EntityTemporarilyUnmodifiable(ref cause) => cause,
DeleteLoginProfileError::LimitExceeded(ref cause) => cause,
DeleteLoginProfileError::NoSuchEntity(ref cause) => cause,
DeleteLoginProfileError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteOpenIDConnectProviderError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteOpenIDConnectProviderError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteOpenIDConnectProviderError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
DeleteOpenIDConnectProviderError::InvalidInput(parsed_error.message),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
DeleteOpenIDConnectProviderError::NoSuchEntity(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(
DeleteOpenIDConnectProviderError::ServiceFailure(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 DeleteOpenIDConnectProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteOpenIDConnectProviderError {
fn description(&self) -> &str {
match *self {
DeleteOpenIDConnectProviderError::InvalidInput(ref cause) => cause,
DeleteOpenIDConnectProviderError::NoSuchEntity(ref cause) => cause,
DeleteOpenIDConnectProviderError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeletePolicyError {
DeleteConflict(String),
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeletePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePolicyError> {
{
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[..] {
"DeleteConflict" => {
return RusotoError::Service(DeletePolicyError::DeleteConflict(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(DeletePolicyError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DeletePolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeletePolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeletePolicyError::ServiceFailure(
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 DeletePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeletePolicyError {
fn description(&self) -> &str {
match *self {
DeletePolicyError::DeleteConflict(ref cause) => cause,
DeletePolicyError::InvalidInput(ref cause) => cause,
DeletePolicyError::LimitExceeded(ref cause) => cause,
DeletePolicyError::NoSuchEntity(ref cause) => cause,
DeletePolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeletePolicyVersionError {
DeleteConflict(String),
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeletePolicyVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePolicyVersionError> {
{
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[..] {
"DeleteConflict" => {
return RusotoError::Service(DeletePolicyVersionError::DeleteConflict(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(DeletePolicyVersionError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DeletePolicyVersionError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeletePolicyVersionError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeletePolicyVersionError::ServiceFailure(
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 DeletePolicyVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeletePolicyVersionError {
fn description(&self) -> &str {
match *self {
DeletePolicyVersionError::DeleteConflict(ref cause) => cause,
DeletePolicyVersionError::InvalidInput(ref cause) => cause,
DeletePolicyVersionError::LimitExceeded(ref cause) => cause,
DeletePolicyVersionError::NoSuchEntity(ref cause) => cause,
DeletePolicyVersionError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRoleError {
ConcurrentModification(String),
DeleteConflict(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl DeleteRoleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRoleError> {
{
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[..] {
"ConcurrentModification" => {
return RusotoError::Service(DeleteRoleError::ConcurrentModification(
parsed_error.message,
))
}
"DeleteConflict" => {
return RusotoError::Service(DeleteRoleError::DeleteConflict(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DeleteRoleError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteRoleError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteRoleError::ServiceFailure(
parsed_error.message,
))
}
"UnmodifiableEntity" => {
return RusotoError::Service(DeleteRoleError::UnmodifiableEntity(
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 DeleteRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRoleError {
fn description(&self) -> &str {
match *self {
DeleteRoleError::ConcurrentModification(ref cause) => cause,
DeleteRoleError::DeleteConflict(ref cause) => cause,
DeleteRoleError::LimitExceeded(ref cause) => cause,
DeleteRoleError::NoSuchEntity(ref cause) => cause,
DeleteRoleError::ServiceFailure(ref cause) => cause,
DeleteRoleError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRolePermissionsBoundaryError {
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl DeleteRolePermissionsBoundaryError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteRolePermissionsBoundaryError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(
DeleteRolePermissionsBoundaryError::NoSuchEntity(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(
DeleteRolePermissionsBoundaryError::ServiceFailure(
parsed_error.message,
),
)
}
"UnmodifiableEntity" => {
return RusotoError::Service(
DeleteRolePermissionsBoundaryError::UnmodifiableEntity(
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 DeleteRolePermissionsBoundaryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRolePermissionsBoundaryError {
fn description(&self) -> &str {
match *self {
DeleteRolePermissionsBoundaryError::NoSuchEntity(ref cause) => cause,
DeleteRolePermissionsBoundaryError::ServiceFailure(ref cause) => cause,
DeleteRolePermissionsBoundaryError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRolePolicyError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl DeleteRolePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRolePolicyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(DeleteRolePolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteRolePolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteRolePolicyError::ServiceFailure(
parsed_error.message,
))
}
"UnmodifiableEntity" => {
return RusotoError::Service(DeleteRolePolicyError::UnmodifiableEntity(
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 DeleteRolePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRolePolicyError {
fn description(&self) -> &str {
match *self {
DeleteRolePolicyError::LimitExceeded(ref cause) => cause,
DeleteRolePolicyError::NoSuchEntity(ref cause) => cause,
DeleteRolePolicyError::ServiceFailure(ref cause) => cause,
DeleteRolePolicyError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSAMLProviderError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteSAMLProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSAMLProviderError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(DeleteSAMLProviderError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DeleteSAMLProviderError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteSAMLProviderError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteSAMLProviderError::ServiceFailure(
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 DeleteSAMLProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSAMLProviderError {
fn description(&self) -> &str {
match *self {
DeleteSAMLProviderError::InvalidInput(ref cause) => cause,
DeleteSAMLProviderError::LimitExceeded(ref cause) => cause,
DeleteSAMLProviderError::NoSuchEntity(ref cause) => cause,
DeleteSAMLProviderError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSSHPublicKeyError {
NoSuchEntity(String),
}
impl DeleteSSHPublicKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSSHPublicKeyError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(DeleteSSHPublicKeyError::NoSuchEntity(
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 DeleteSSHPublicKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSSHPublicKeyError {
fn description(&self) -> &str {
match *self {
DeleteSSHPublicKeyError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteServerCertificateError {
DeleteConflict(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteServerCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteServerCertificateError> {
{
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[..] {
"DeleteConflict" => {
return RusotoError::Service(DeleteServerCertificateError::DeleteConflict(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DeleteServerCertificateError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteServerCertificateError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteServerCertificateError::ServiceFailure(
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 DeleteServerCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteServerCertificateError {
fn description(&self) -> &str {
match *self {
DeleteServerCertificateError::DeleteConflict(ref cause) => cause,
DeleteServerCertificateError::LimitExceeded(ref cause) => cause,
DeleteServerCertificateError::NoSuchEntity(ref cause) => cause,
DeleteServerCertificateError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteServiceLinkedRoleError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteServiceLinkedRoleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteServiceLinkedRoleError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(DeleteServiceLinkedRoleError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteServiceLinkedRoleError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteServiceLinkedRoleError::ServiceFailure(
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 DeleteServiceLinkedRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteServiceLinkedRoleError {
fn description(&self) -> &str {
match *self {
DeleteServiceLinkedRoleError::LimitExceeded(ref cause) => cause,
DeleteServiceLinkedRoleError::NoSuchEntity(ref cause) => cause,
DeleteServiceLinkedRoleError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteServiceSpecificCredentialError {
NoSuchEntity(String),
}
impl DeleteServiceSpecificCredentialError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteServiceSpecificCredentialError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(
DeleteServiceSpecificCredentialError::NoSuchEntity(
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 DeleteServiceSpecificCredentialError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteServiceSpecificCredentialError {
fn description(&self) -> &str {
match *self {
DeleteServiceSpecificCredentialError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSigningCertificateError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteSigningCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSigningCertificateError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(DeleteSigningCertificateError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteSigningCertificateError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteSigningCertificateError::ServiceFailure(
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 DeleteSigningCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSigningCertificateError {
fn description(&self) -> &str {
match *self {
DeleteSigningCertificateError::LimitExceeded(ref cause) => cause,
DeleteSigningCertificateError::NoSuchEntity(ref cause) => cause,
DeleteSigningCertificateError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserError {
ConcurrentModification(String),
DeleteConflict(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserError> {
{
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[..] {
"ConcurrentModification" => {
return RusotoError::Service(DeleteUserError::ConcurrentModification(
parsed_error.message,
))
}
"DeleteConflict" => {
return RusotoError::Service(DeleteUserError::DeleteConflict(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DeleteUserError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteUserError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteUserError::ServiceFailure(
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 DeleteUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUserError {
fn description(&self) -> &str {
match *self {
DeleteUserError::ConcurrentModification(ref cause) => cause,
DeleteUserError::DeleteConflict(ref cause) => cause,
DeleteUserError::LimitExceeded(ref cause) => cause,
DeleteUserError::NoSuchEntity(ref cause) => cause,
DeleteUserError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserPermissionsBoundaryError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteUserPermissionsBoundaryError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteUserPermissionsBoundaryError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(
DeleteUserPermissionsBoundaryError::NoSuchEntity(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(
DeleteUserPermissionsBoundaryError::ServiceFailure(
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 DeleteUserPermissionsBoundaryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUserPermissionsBoundaryError {
fn description(&self) -> &str {
match *self {
DeleteUserPermissionsBoundaryError::NoSuchEntity(ref cause) => cause,
DeleteUserPermissionsBoundaryError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserPolicyError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteUserPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserPolicyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(DeleteUserPolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteUserPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteUserPolicyError::ServiceFailure(
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 DeleteUserPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUserPolicyError {
fn description(&self) -> &str {
match *self {
DeleteUserPolicyError::LimitExceeded(ref cause) => cause,
DeleteUserPolicyError::NoSuchEntity(ref cause) => cause,
DeleteUserPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteVirtualMFADeviceError {
DeleteConflict(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DeleteVirtualMFADeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVirtualMFADeviceError> {
{
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[..] {
"DeleteConflict" => {
return RusotoError::Service(DeleteVirtualMFADeviceError::DeleteConflict(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DeleteVirtualMFADeviceError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DeleteVirtualMFADeviceError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DeleteVirtualMFADeviceError::ServiceFailure(
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 DeleteVirtualMFADeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteVirtualMFADeviceError {
fn description(&self) -> &str {
match *self {
DeleteVirtualMFADeviceError::DeleteConflict(ref cause) => cause,
DeleteVirtualMFADeviceError::LimitExceeded(ref cause) => cause,
DeleteVirtualMFADeviceError::NoSuchEntity(ref cause) => cause,
DeleteVirtualMFADeviceError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachGroupPolicyError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DetachGroupPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachGroupPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(DetachGroupPolicyError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DetachGroupPolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DetachGroupPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DetachGroupPolicyError::ServiceFailure(
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 DetachGroupPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachGroupPolicyError {
fn description(&self) -> &str {
match *self {
DetachGroupPolicyError::InvalidInput(ref cause) => cause,
DetachGroupPolicyError::LimitExceeded(ref cause) => cause,
DetachGroupPolicyError::NoSuchEntity(ref cause) => cause,
DetachGroupPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachRolePolicyError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl DetachRolePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachRolePolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(DetachRolePolicyError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DetachRolePolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DetachRolePolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DetachRolePolicyError::ServiceFailure(
parsed_error.message,
))
}
"UnmodifiableEntity" => {
return RusotoError::Service(DetachRolePolicyError::UnmodifiableEntity(
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 DetachRolePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachRolePolicyError {
fn description(&self) -> &str {
match *self {
DetachRolePolicyError::InvalidInput(ref cause) => cause,
DetachRolePolicyError::LimitExceeded(ref cause) => cause,
DetachRolePolicyError::NoSuchEntity(ref cause) => cause,
DetachRolePolicyError::ServiceFailure(ref cause) => cause,
DetachRolePolicyError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachUserPolicyError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl DetachUserPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachUserPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(DetachUserPolicyError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(DetachUserPolicyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(DetachUserPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(DetachUserPolicyError::ServiceFailure(
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 DetachUserPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachUserPolicyError {
fn description(&self) -> &str {
match *self {
DetachUserPolicyError::InvalidInput(ref cause) => cause,
DetachUserPolicyError::LimitExceeded(ref cause) => cause,
DetachUserPolicyError::NoSuchEntity(ref cause) => cause,
DetachUserPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableMFADeviceError {
EntityAlreadyExists(String),
EntityTemporarilyUnmodifiable(String),
InvalidAuthenticationCode(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl EnableMFADeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableMFADeviceError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(EnableMFADeviceError::EntityAlreadyExists(
parsed_error.message,
))
}
"EntityTemporarilyUnmodifiable" => {
return RusotoError::Service(
EnableMFADeviceError::EntityTemporarilyUnmodifiable(
parsed_error.message,
),
)
}
"InvalidAuthenticationCode" => {
return RusotoError::Service(
EnableMFADeviceError::InvalidAuthenticationCode(parsed_error.message),
)
}
"LimitExceeded" => {
return RusotoError::Service(EnableMFADeviceError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(EnableMFADeviceError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(EnableMFADeviceError::ServiceFailure(
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 EnableMFADeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableMFADeviceError {
fn description(&self) -> &str {
match *self {
EnableMFADeviceError::EntityAlreadyExists(ref cause) => cause,
EnableMFADeviceError::EntityTemporarilyUnmodifiable(ref cause) => cause,
EnableMFADeviceError::InvalidAuthenticationCode(ref cause) => cause,
EnableMFADeviceError::LimitExceeded(ref cause) => cause,
EnableMFADeviceError::NoSuchEntity(ref cause) => cause,
EnableMFADeviceError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GenerateCredentialReportError {
LimitExceeded(String),
ServiceFailure(String),
}
impl GenerateCredentialReportError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GenerateCredentialReportError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(GenerateCredentialReportError::LimitExceeded(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GenerateCredentialReportError::ServiceFailure(
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 GenerateCredentialReportError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GenerateCredentialReportError {
fn description(&self) -> &str {
match *self {
GenerateCredentialReportError::LimitExceeded(ref cause) => cause,
GenerateCredentialReportError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GenerateServiceLastAccessedDetailsError {
InvalidInput(String),
NoSuchEntity(String),
}
impl GenerateServiceLastAccessedDetailsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GenerateServiceLastAccessedDetailsError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
GenerateServiceLastAccessedDetailsError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
GenerateServiceLastAccessedDetailsError::NoSuchEntity(
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 GenerateServiceLastAccessedDetailsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GenerateServiceLastAccessedDetailsError {
fn description(&self) -> &str {
match *self {
GenerateServiceLastAccessedDetailsError::InvalidInput(ref cause) => cause,
GenerateServiceLastAccessedDetailsError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAccessKeyLastUsedError {
NoSuchEntity(String),
}
impl GetAccessKeyLastUsedError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAccessKeyLastUsedError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetAccessKeyLastUsedError::NoSuchEntity(
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 GetAccessKeyLastUsedError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAccessKeyLastUsedError {
fn description(&self) -> &str {
match *self {
GetAccessKeyLastUsedError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAccountAuthorizationDetailsError {
ServiceFailure(String),
}
impl GetAccountAuthorizationDetailsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetAccountAuthorizationDetailsError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(
GetAccountAuthorizationDetailsError::ServiceFailure(
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 GetAccountAuthorizationDetailsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAccountAuthorizationDetailsError {
fn description(&self) -> &str {
match *self {
GetAccountAuthorizationDetailsError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAccountPasswordPolicyError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetAccountPasswordPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAccountPasswordPolicyError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetAccountPasswordPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetAccountPasswordPolicyError::ServiceFailure(
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 GetAccountPasswordPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAccountPasswordPolicyError {
fn description(&self) -> &str {
match *self {
GetAccountPasswordPolicyError::NoSuchEntity(ref cause) => cause,
GetAccountPasswordPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAccountSummaryError {
ServiceFailure(String),
}
impl GetAccountSummaryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAccountSummaryError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(GetAccountSummaryError::ServiceFailure(
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 GetAccountSummaryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAccountSummaryError {
fn description(&self) -> &str {
match *self {
GetAccountSummaryError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetContextKeysForCustomPolicyError {
InvalidInput(String),
}
impl GetContextKeysForCustomPolicyError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetContextKeysForCustomPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
GetContextKeysForCustomPolicyError::InvalidInput(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 GetContextKeysForCustomPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetContextKeysForCustomPolicyError {
fn description(&self) -> &str {
match *self {
GetContextKeysForCustomPolicyError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetContextKeysForPrincipalPolicyError {
InvalidInput(String),
NoSuchEntity(String),
}
impl GetContextKeysForPrincipalPolicyError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetContextKeysForPrincipalPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
GetContextKeysForPrincipalPolicyError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
GetContextKeysForPrincipalPolicyError::NoSuchEntity(
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 GetContextKeysForPrincipalPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetContextKeysForPrincipalPolicyError {
fn description(&self) -> &str {
match *self {
GetContextKeysForPrincipalPolicyError::InvalidInput(ref cause) => cause,
GetContextKeysForPrincipalPolicyError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCredentialReportError {
CredentialReportExpired(String),
CredentialReportNotPresent(String),
CredentialReportNotReady(String),
ServiceFailure(String),
}
impl GetCredentialReportError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCredentialReportError> {
{
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[..] {
"ReportExpired" => {
return RusotoError::Service(
GetCredentialReportError::CredentialReportExpired(parsed_error.message),
)
}
"ReportNotPresent" => {
return RusotoError::Service(
GetCredentialReportError::CredentialReportNotPresent(
parsed_error.message,
),
)
}
"ReportInProgress" => {
return RusotoError::Service(
GetCredentialReportError::CredentialReportNotReady(
parsed_error.message,
),
)
}
"ServiceFailure" => {
return RusotoError::Service(GetCredentialReportError::ServiceFailure(
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 GetCredentialReportError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCredentialReportError {
fn description(&self) -> &str {
match *self {
GetCredentialReportError::CredentialReportExpired(ref cause) => cause,
GetCredentialReportError::CredentialReportNotPresent(ref cause) => cause,
GetCredentialReportError::CredentialReportNotReady(ref cause) => cause,
GetCredentialReportError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGroupError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGroupError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetGroupError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetGroupError::ServiceFailure(
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 GetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGroupError {
fn description(&self) -> &str {
match *self {
GetGroupError::NoSuchEntity(ref cause) => cause,
GetGroupError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGroupPolicyError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetGroupPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGroupPolicyError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetGroupPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetGroupPolicyError::ServiceFailure(
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 GetGroupPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGroupPolicyError {
fn description(&self) -> &str {
match *self {
GetGroupPolicyError::NoSuchEntity(ref cause) => cause,
GetGroupPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetInstanceProfileError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetInstanceProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetInstanceProfileError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetInstanceProfileError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetInstanceProfileError::ServiceFailure(
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 GetInstanceProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetInstanceProfileError {
fn description(&self) -> &str {
match *self {
GetInstanceProfileError::NoSuchEntity(ref cause) => cause,
GetInstanceProfileError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetLoginProfileError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetLoginProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetLoginProfileError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetLoginProfileError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetLoginProfileError::ServiceFailure(
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 GetLoginProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetLoginProfileError {
fn description(&self) -> &str {
match *self {
GetLoginProfileError::NoSuchEntity(ref cause) => cause,
GetLoginProfileError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetOpenIDConnectProviderError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetOpenIDConnectProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetOpenIDConnectProviderError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(GetOpenIDConnectProviderError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(GetOpenIDConnectProviderError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetOpenIDConnectProviderError::ServiceFailure(
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 GetOpenIDConnectProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetOpenIDConnectProviderError {
fn description(&self) -> &str {
match *self {
GetOpenIDConnectProviderError::InvalidInput(ref cause) => cause,
GetOpenIDConnectProviderError::NoSuchEntity(ref cause) => cause,
GetOpenIDConnectProviderError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetPolicyError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(GetPolicyError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(GetPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetPolicyError::ServiceFailure(
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 GetPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetPolicyError {
fn description(&self) -> &str {
match *self {
GetPolicyError::InvalidInput(ref cause) => cause,
GetPolicyError::NoSuchEntity(ref cause) => cause,
GetPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetPolicyVersionError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetPolicyVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPolicyVersionError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(GetPolicyVersionError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(GetPolicyVersionError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetPolicyVersionError::ServiceFailure(
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 GetPolicyVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetPolicyVersionError {
fn description(&self) -> &str {
match *self {
GetPolicyVersionError::InvalidInput(ref cause) => cause,
GetPolicyVersionError::NoSuchEntity(ref cause) => cause,
GetPolicyVersionError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRoleError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetRoleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRoleError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetRoleError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetRoleError::ServiceFailure(
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 GetRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRoleError {
fn description(&self) -> &str {
match *self {
GetRoleError::NoSuchEntity(ref cause) => cause,
GetRoleError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRolePolicyError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetRolePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRolePolicyError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetRolePolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetRolePolicyError::ServiceFailure(
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 GetRolePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRolePolicyError {
fn description(&self) -> &str {
match *self {
GetRolePolicyError::NoSuchEntity(ref cause) => cause,
GetRolePolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSAMLProviderError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetSAMLProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSAMLProviderError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(GetSAMLProviderError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(GetSAMLProviderError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetSAMLProviderError::ServiceFailure(
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 GetSAMLProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSAMLProviderError {
fn description(&self) -> &str {
match *self {
GetSAMLProviderError::InvalidInput(ref cause) => cause,
GetSAMLProviderError::NoSuchEntity(ref cause) => cause,
GetSAMLProviderError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSSHPublicKeyError {
NoSuchEntity(String),
UnrecognizedPublicKeyEncoding(String),
}
impl GetSSHPublicKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSSHPublicKeyError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetSSHPublicKeyError::NoSuchEntity(
parsed_error.message,
))
}
"UnrecognizedPublicKeyEncoding" => {
return RusotoError::Service(
GetSSHPublicKeyError::UnrecognizedPublicKeyEncoding(
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 GetSSHPublicKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSSHPublicKeyError {
fn description(&self) -> &str {
match *self {
GetSSHPublicKeyError::NoSuchEntity(ref cause) => cause,
GetSSHPublicKeyError::UnrecognizedPublicKeyEncoding(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetServerCertificateError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetServerCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetServerCertificateError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetServerCertificateError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetServerCertificateError::ServiceFailure(
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 GetServerCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetServerCertificateError {
fn description(&self) -> &str {
match *self {
GetServerCertificateError::NoSuchEntity(ref cause) => cause,
GetServerCertificateError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetServiceLastAccessedDetailsError {
InvalidInput(String),
NoSuchEntity(String),
}
impl GetServiceLastAccessedDetailsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetServiceLastAccessedDetailsError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
GetServiceLastAccessedDetailsError::InvalidInput(parsed_error.message),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
GetServiceLastAccessedDetailsError::NoSuchEntity(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 GetServiceLastAccessedDetailsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetServiceLastAccessedDetailsError {
fn description(&self) -> &str {
match *self {
GetServiceLastAccessedDetailsError::InvalidInput(ref cause) => cause,
GetServiceLastAccessedDetailsError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetServiceLastAccessedDetailsWithEntitiesError {
InvalidInput(String),
NoSuchEntity(String),
}
impl GetServiceLastAccessedDetailsWithEntitiesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetServiceLastAccessedDetailsWithEntitiesError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
GetServiceLastAccessedDetailsWithEntitiesError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
GetServiceLastAccessedDetailsWithEntitiesError::NoSuchEntity(
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 GetServiceLastAccessedDetailsWithEntitiesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetServiceLastAccessedDetailsWithEntitiesError {
fn description(&self) -> &str {
match *self {
GetServiceLastAccessedDetailsWithEntitiesError::InvalidInput(ref cause) => cause,
GetServiceLastAccessedDetailsWithEntitiesError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetServiceLinkedRoleDeletionStatusError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetServiceLinkedRoleDeletionStatusError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetServiceLinkedRoleDeletionStatusError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
GetServiceLinkedRoleDeletionStatusError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
GetServiceLinkedRoleDeletionStatusError::NoSuchEntity(
parsed_error.message,
),
)
}
"ServiceFailure" => {
return RusotoError::Service(
GetServiceLinkedRoleDeletionStatusError::ServiceFailure(
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 GetServiceLinkedRoleDeletionStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetServiceLinkedRoleDeletionStatusError {
fn description(&self) -> &str {
match *self {
GetServiceLinkedRoleDeletionStatusError::InvalidInput(ref cause) => cause,
GetServiceLinkedRoleDeletionStatusError::NoSuchEntity(ref cause) => cause,
GetServiceLinkedRoleDeletionStatusError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetUserError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUserError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetUserError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetUserError::ServiceFailure(
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 GetUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUserError {
fn description(&self) -> &str {
match *self {
GetUserError::NoSuchEntity(ref cause) => cause,
GetUserError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetUserPolicyError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl GetUserPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUserPolicyError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(GetUserPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(GetUserPolicyError::ServiceFailure(
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 GetUserPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUserPolicyError {
fn description(&self) -> &str {
match *self {
GetUserPolicyError::NoSuchEntity(ref cause) => cause,
GetUserPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAccessKeysError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListAccessKeysError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAccessKeysError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListAccessKeysError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListAccessKeysError::ServiceFailure(
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 ListAccessKeysError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAccessKeysError {
fn description(&self) -> &str {
match *self {
ListAccessKeysError::NoSuchEntity(ref cause) => cause,
ListAccessKeysError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAccountAliasesError {
ServiceFailure(String),
}
impl ListAccountAliasesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAccountAliasesError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(ListAccountAliasesError::ServiceFailure(
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 ListAccountAliasesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAccountAliasesError {
fn description(&self) -> &str {
match *self {
ListAccountAliasesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAttachedGroupPoliciesError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListAttachedGroupPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAttachedGroupPoliciesError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(ListAttachedGroupPoliciesError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(ListAttachedGroupPoliciesError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(
ListAttachedGroupPoliciesError::ServiceFailure(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 ListAttachedGroupPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAttachedGroupPoliciesError {
fn description(&self) -> &str {
match *self {
ListAttachedGroupPoliciesError::InvalidInput(ref cause) => cause,
ListAttachedGroupPoliciesError::NoSuchEntity(ref cause) => cause,
ListAttachedGroupPoliciesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAttachedRolePoliciesError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListAttachedRolePoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAttachedRolePoliciesError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(ListAttachedRolePoliciesError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(ListAttachedRolePoliciesError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListAttachedRolePoliciesError::ServiceFailure(
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 ListAttachedRolePoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAttachedRolePoliciesError {
fn description(&self) -> &str {
match *self {
ListAttachedRolePoliciesError::InvalidInput(ref cause) => cause,
ListAttachedRolePoliciesError::NoSuchEntity(ref cause) => cause,
ListAttachedRolePoliciesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAttachedUserPoliciesError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListAttachedUserPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAttachedUserPoliciesError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(ListAttachedUserPoliciesError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(ListAttachedUserPoliciesError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListAttachedUserPoliciesError::ServiceFailure(
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 ListAttachedUserPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAttachedUserPoliciesError {
fn description(&self) -> &str {
match *self {
ListAttachedUserPoliciesError::InvalidInput(ref cause) => cause,
ListAttachedUserPoliciesError::NoSuchEntity(ref cause) => cause,
ListAttachedUserPoliciesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListEntitiesForPolicyError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListEntitiesForPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListEntitiesForPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(ListEntitiesForPolicyError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(ListEntitiesForPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListEntitiesForPolicyError::ServiceFailure(
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 ListEntitiesForPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListEntitiesForPolicyError {
fn description(&self) -> &str {
match *self {
ListEntitiesForPolicyError::InvalidInput(ref cause) => cause,
ListEntitiesForPolicyError::NoSuchEntity(ref cause) => cause,
ListEntitiesForPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListGroupPoliciesError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListGroupPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGroupPoliciesError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListGroupPoliciesError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListGroupPoliciesError::ServiceFailure(
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 ListGroupPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListGroupPoliciesError {
fn description(&self) -> &str {
match *self {
ListGroupPoliciesError::NoSuchEntity(ref cause) => cause,
ListGroupPoliciesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListGroupsError {
ServiceFailure(String),
}
impl ListGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGroupsError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(ListGroupsError::ServiceFailure(
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 ListGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListGroupsError {
fn description(&self) -> &str {
match *self {
ListGroupsError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListGroupsForUserError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListGroupsForUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGroupsForUserError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListGroupsForUserError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListGroupsForUserError::ServiceFailure(
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 ListGroupsForUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListGroupsForUserError {
fn description(&self) -> &str {
match *self {
ListGroupsForUserError::NoSuchEntity(ref cause) => cause,
ListGroupsForUserError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListInstanceProfilesError {
ServiceFailure(String),
}
impl ListInstanceProfilesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListInstanceProfilesError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(ListInstanceProfilesError::ServiceFailure(
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 ListInstanceProfilesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListInstanceProfilesError {
fn description(&self) -> &str {
match *self {
ListInstanceProfilesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListInstanceProfilesForRoleError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListInstanceProfilesForRoleError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListInstanceProfilesForRoleError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(
ListInstanceProfilesForRoleError::NoSuchEntity(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(
ListInstanceProfilesForRoleError::ServiceFailure(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 ListInstanceProfilesForRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListInstanceProfilesForRoleError {
fn description(&self) -> &str {
match *self {
ListInstanceProfilesForRoleError::NoSuchEntity(ref cause) => cause,
ListInstanceProfilesForRoleError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListMFADevicesError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListMFADevicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListMFADevicesError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListMFADevicesError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListMFADevicesError::ServiceFailure(
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 ListMFADevicesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListMFADevicesError {
fn description(&self) -> &str {
match *self {
ListMFADevicesError::NoSuchEntity(ref cause) => cause,
ListMFADevicesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListOpenIDConnectProvidersError {
ServiceFailure(String),
}
impl ListOpenIDConnectProvidersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListOpenIDConnectProvidersError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(
ListOpenIDConnectProvidersError::ServiceFailure(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 ListOpenIDConnectProvidersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListOpenIDConnectProvidersError {
fn description(&self) -> &str {
match *self {
ListOpenIDConnectProvidersError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPoliciesError {
ServiceFailure(String),
}
impl ListPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPoliciesError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(ListPoliciesError::ServiceFailure(
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 ListPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPoliciesError {
fn description(&self) -> &str {
match *self {
ListPoliciesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPoliciesGrantingServiceAccessError {
InvalidInput(String),
NoSuchEntity(String),
}
impl ListPoliciesGrantingServiceAccessError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListPoliciesGrantingServiceAccessError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
ListPoliciesGrantingServiceAccessError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
ListPoliciesGrantingServiceAccessError::NoSuchEntity(
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 ListPoliciesGrantingServiceAccessError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPoliciesGrantingServiceAccessError {
fn description(&self) -> &str {
match *self {
ListPoliciesGrantingServiceAccessError::InvalidInput(ref cause) => cause,
ListPoliciesGrantingServiceAccessError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPolicyVersionsError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListPolicyVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPolicyVersionsError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(ListPolicyVersionsError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(ListPolicyVersionsError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListPolicyVersionsError::ServiceFailure(
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 ListPolicyVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPolicyVersionsError {
fn description(&self) -> &str {
match *self {
ListPolicyVersionsError::InvalidInput(ref cause) => cause,
ListPolicyVersionsError::NoSuchEntity(ref cause) => cause,
ListPolicyVersionsError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListRolePoliciesError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListRolePoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRolePoliciesError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListRolePoliciesError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListRolePoliciesError::ServiceFailure(
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 ListRolePoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListRolePoliciesError {
fn description(&self) -> &str {
match *self {
ListRolePoliciesError::NoSuchEntity(ref cause) => cause,
ListRolePoliciesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListRoleTagsError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListRoleTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRoleTagsError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListRoleTagsError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListRoleTagsError::ServiceFailure(
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 ListRoleTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListRoleTagsError {
fn description(&self) -> &str {
match *self {
ListRoleTagsError::NoSuchEntity(ref cause) => cause,
ListRoleTagsError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListRolesError {
ServiceFailure(String),
}
impl ListRolesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRolesError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(ListRolesError::ServiceFailure(
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 ListRolesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListRolesError {
fn description(&self) -> &str {
match *self {
ListRolesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSAMLProvidersError {
ServiceFailure(String),
}
impl ListSAMLProvidersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSAMLProvidersError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(ListSAMLProvidersError::ServiceFailure(
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 ListSAMLProvidersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSAMLProvidersError {
fn description(&self) -> &str {
match *self {
ListSAMLProvidersError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSSHPublicKeysError {
NoSuchEntity(String),
}
impl ListSSHPublicKeysError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSSHPublicKeysError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListSSHPublicKeysError::NoSuchEntity(
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 ListSSHPublicKeysError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSSHPublicKeysError {
fn description(&self) -> &str {
match *self {
ListSSHPublicKeysError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListServerCertificatesError {
ServiceFailure(String),
}
impl ListServerCertificatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListServerCertificatesError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(ListServerCertificatesError::ServiceFailure(
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 ListServerCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListServerCertificatesError {
fn description(&self) -> &str {
match *self {
ListServerCertificatesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListServiceSpecificCredentialsError {
NoSuchEntity(String),
ServiceNotSupported(String),
}
impl ListServiceSpecificCredentialsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListServiceSpecificCredentialsError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(
ListServiceSpecificCredentialsError::NoSuchEntity(parsed_error.message),
)
}
"NotSupportedService" => {
return RusotoError::Service(
ListServiceSpecificCredentialsError::ServiceNotSupported(
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 ListServiceSpecificCredentialsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListServiceSpecificCredentialsError {
fn description(&self) -> &str {
match *self {
ListServiceSpecificCredentialsError::NoSuchEntity(ref cause) => cause,
ListServiceSpecificCredentialsError::ServiceNotSupported(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSigningCertificatesError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListSigningCertificatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSigningCertificatesError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListSigningCertificatesError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListSigningCertificatesError::ServiceFailure(
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 ListSigningCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSigningCertificatesError {
fn description(&self) -> &str {
match *self {
ListSigningCertificatesError::NoSuchEntity(ref cause) => cause,
ListSigningCertificatesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListUserPoliciesError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListUserPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUserPoliciesError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListUserPoliciesError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListUserPoliciesError::ServiceFailure(
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 ListUserPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListUserPoliciesError {
fn description(&self) -> &str {
match *self {
ListUserPoliciesError::NoSuchEntity(ref cause) => cause,
ListUserPoliciesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListUserTagsError {
NoSuchEntity(String),
ServiceFailure(String),
}
impl ListUserTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUserTagsError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(ListUserTagsError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ListUserTagsError::ServiceFailure(
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 ListUserTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListUserTagsError {
fn description(&self) -> &str {
match *self {
ListUserTagsError::NoSuchEntity(ref cause) => cause,
ListUserTagsError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListUsersError {
ServiceFailure(String),
}
impl ListUsersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUsersError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(ListUsersError::ServiceFailure(
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 ListUsersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListUsersError {
fn description(&self) -> &str {
match *self {
ListUsersError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListVirtualMFADevicesError {}
impl ListVirtualMFADevicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVirtualMFADevicesError> {
{
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 ListVirtualMFADevicesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListVirtualMFADevicesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum PutGroupPolicyError {
LimitExceeded(String),
MalformedPolicyDocument(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl PutGroupPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutGroupPolicyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(PutGroupPolicyError::LimitExceeded(
parsed_error.message,
))
}
"MalformedPolicyDocument" => {
return RusotoError::Service(PutGroupPolicyError::MalformedPolicyDocument(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(PutGroupPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(PutGroupPolicyError::ServiceFailure(
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 PutGroupPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutGroupPolicyError {
fn description(&self) -> &str {
match *self {
PutGroupPolicyError::LimitExceeded(ref cause) => cause,
PutGroupPolicyError::MalformedPolicyDocument(ref cause) => cause,
PutGroupPolicyError::NoSuchEntity(ref cause) => cause,
PutGroupPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutRolePermissionsBoundaryError {
InvalidInput(String),
NoSuchEntity(String),
PolicyNotAttachable(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl PutRolePermissionsBoundaryError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutRolePermissionsBoundaryError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(PutRolePermissionsBoundaryError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(PutRolePermissionsBoundaryError::NoSuchEntity(
parsed_error.message,
))
}
"PolicyNotAttachable" => {
return RusotoError::Service(
PutRolePermissionsBoundaryError::PolicyNotAttachable(
parsed_error.message,
),
)
}
"ServiceFailure" => {
return RusotoError::Service(
PutRolePermissionsBoundaryError::ServiceFailure(parsed_error.message),
)
}
"UnmodifiableEntity" => {
return RusotoError::Service(
PutRolePermissionsBoundaryError::UnmodifiableEntity(
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 PutRolePermissionsBoundaryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutRolePermissionsBoundaryError {
fn description(&self) -> &str {
match *self {
PutRolePermissionsBoundaryError::InvalidInput(ref cause) => cause,
PutRolePermissionsBoundaryError::NoSuchEntity(ref cause) => cause,
PutRolePermissionsBoundaryError::PolicyNotAttachable(ref cause) => cause,
PutRolePermissionsBoundaryError::ServiceFailure(ref cause) => cause,
PutRolePermissionsBoundaryError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutRolePolicyError {
LimitExceeded(String),
MalformedPolicyDocument(String),
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl PutRolePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutRolePolicyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(PutRolePolicyError::LimitExceeded(
parsed_error.message,
))
}
"MalformedPolicyDocument" => {
return RusotoError::Service(PutRolePolicyError::MalformedPolicyDocument(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(PutRolePolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(PutRolePolicyError::ServiceFailure(
parsed_error.message,
))
}
"UnmodifiableEntity" => {
return RusotoError::Service(PutRolePolicyError::UnmodifiableEntity(
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 PutRolePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutRolePolicyError {
fn description(&self) -> &str {
match *self {
PutRolePolicyError::LimitExceeded(ref cause) => cause,
PutRolePolicyError::MalformedPolicyDocument(ref cause) => cause,
PutRolePolicyError::NoSuchEntity(ref cause) => cause,
PutRolePolicyError::ServiceFailure(ref cause) => cause,
PutRolePolicyError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutUserPermissionsBoundaryError {
InvalidInput(String),
NoSuchEntity(String),
PolicyNotAttachable(String),
ServiceFailure(String),
}
impl PutUserPermissionsBoundaryError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutUserPermissionsBoundaryError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(PutUserPermissionsBoundaryError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(PutUserPermissionsBoundaryError::NoSuchEntity(
parsed_error.message,
))
}
"PolicyNotAttachable" => {
return RusotoError::Service(
PutUserPermissionsBoundaryError::PolicyNotAttachable(
parsed_error.message,
),
)
}
"ServiceFailure" => {
return RusotoError::Service(
PutUserPermissionsBoundaryError::ServiceFailure(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 PutUserPermissionsBoundaryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutUserPermissionsBoundaryError {
fn description(&self) -> &str {
match *self {
PutUserPermissionsBoundaryError::InvalidInput(ref cause) => cause,
PutUserPermissionsBoundaryError::NoSuchEntity(ref cause) => cause,
PutUserPermissionsBoundaryError::PolicyNotAttachable(ref cause) => cause,
PutUserPermissionsBoundaryError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutUserPolicyError {
LimitExceeded(String),
MalformedPolicyDocument(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl PutUserPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutUserPolicyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(PutUserPolicyError::LimitExceeded(
parsed_error.message,
))
}
"MalformedPolicyDocument" => {
return RusotoError::Service(PutUserPolicyError::MalformedPolicyDocument(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(PutUserPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(PutUserPolicyError::ServiceFailure(
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 PutUserPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutUserPolicyError {
fn description(&self) -> &str {
match *self {
PutUserPolicyError::LimitExceeded(ref cause) => cause,
PutUserPolicyError::MalformedPolicyDocument(ref cause) => cause,
PutUserPolicyError::NoSuchEntity(ref cause) => cause,
PutUserPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveClientIDFromOpenIDConnectProviderError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl RemoveClientIDFromOpenIDConnectProviderError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RemoveClientIDFromOpenIDConnectProviderError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
RemoveClientIDFromOpenIDConnectProviderError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
RemoveClientIDFromOpenIDConnectProviderError::NoSuchEntity(
parsed_error.message,
),
)
}
"ServiceFailure" => {
return RusotoError::Service(
RemoveClientIDFromOpenIDConnectProviderError::ServiceFailure(
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 RemoveClientIDFromOpenIDConnectProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveClientIDFromOpenIDConnectProviderError {
fn description(&self) -> &str {
match *self {
RemoveClientIDFromOpenIDConnectProviderError::InvalidInput(ref cause) => cause,
RemoveClientIDFromOpenIDConnectProviderError::NoSuchEntity(ref cause) => cause,
RemoveClientIDFromOpenIDConnectProviderError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveRoleFromInstanceProfileError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl RemoveRoleFromInstanceProfileError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RemoveRoleFromInstanceProfileError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(
RemoveRoleFromInstanceProfileError::LimitExceeded(parsed_error.message),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
RemoveRoleFromInstanceProfileError::NoSuchEntity(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(
RemoveRoleFromInstanceProfileError::ServiceFailure(
parsed_error.message,
),
)
}
"UnmodifiableEntity" => {
return RusotoError::Service(
RemoveRoleFromInstanceProfileError::UnmodifiableEntity(
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 RemoveRoleFromInstanceProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveRoleFromInstanceProfileError {
fn description(&self) -> &str {
match *self {
RemoveRoleFromInstanceProfileError::LimitExceeded(ref cause) => cause,
RemoveRoleFromInstanceProfileError::NoSuchEntity(ref cause) => cause,
RemoveRoleFromInstanceProfileError::ServiceFailure(ref cause) => cause,
RemoveRoleFromInstanceProfileError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveUserFromGroupError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl RemoveUserFromGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveUserFromGroupError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(RemoveUserFromGroupError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(RemoveUserFromGroupError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(RemoveUserFromGroupError::ServiceFailure(
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 RemoveUserFromGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveUserFromGroupError {
fn description(&self) -> &str {
match *self {
RemoveUserFromGroupError::LimitExceeded(ref cause) => cause,
RemoveUserFromGroupError::NoSuchEntity(ref cause) => cause,
RemoveUserFromGroupError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResetServiceSpecificCredentialError {
NoSuchEntity(String),
}
impl ResetServiceSpecificCredentialError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ResetServiceSpecificCredentialError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(
ResetServiceSpecificCredentialError::NoSuchEntity(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 ResetServiceSpecificCredentialError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResetServiceSpecificCredentialError {
fn description(&self) -> &str {
match *self {
ResetServiceSpecificCredentialError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResyncMFADeviceError {
InvalidAuthenticationCode(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl ResyncMFADeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResyncMFADeviceError> {
{
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[..] {
"InvalidAuthenticationCode" => {
return RusotoError::Service(
ResyncMFADeviceError::InvalidAuthenticationCode(parsed_error.message),
)
}
"LimitExceeded" => {
return RusotoError::Service(ResyncMFADeviceError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(ResyncMFADeviceError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(ResyncMFADeviceError::ServiceFailure(
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 ResyncMFADeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResyncMFADeviceError {
fn description(&self) -> &str {
match *self {
ResyncMFADeviceError::InvalidAuthenticationCode(ref cause) => cause,
ResyncMFADeviceError::LimitExceeded(ref cause) => cause,
ResyncMFADeviceError::NoSuchEntity(ref cause) => cause,
ResyncMFADeviceError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetDefaultPolicyVersionError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl SetDefaultPolicyVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetDefaultPolicyVersionError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(SetDefaultPolicyVersionError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(SetDefaultPolicyVersionError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(SetDefaultPolicyVersionError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(SetDefaultPolicyVersionError::ServiceFailure(
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 SetDefaultPolicyVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetDefaultPolicyVersionError {
fn description(&self) -> &str {
match *self {
SetDefaultPolicyVersionError::InvalidInput(ref cause) => cause,
SetDefaultPolicyVersionError::LimitExceeded(ref cause) => cause,
SetDefaultPolicyVersionError::NoSuchEntity(ref cause) => cause,
SetDefaultPolicyVersionError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetSecurityTokenServicePreferencesError {
ServiceFailure(String),
}
impl SetSecurityTokenServicePreferencesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<SetSecurityTokenServicePreferencesError> {
{
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[..] {
"ServiceFailure" => {
return RusotoError::Service(
SetSecurityTokenServicePreferencesError::ServiceFailure(
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 SetSecurityTokenServicePreferencesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetSecurityTokenServicePreferencesError {
fn description(&self) -> &str {
match *self {
SetSecurityTokenServicePreferencesError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SimulateCustomPolicyError {
InvalidInput(String),
PolicyEvaluation(String),
}
impl SimulateCustomPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SimulateCustomPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(SimulateCustomPolicyError::InvalidInput(
parsed_error.message,
))
}
"PolicyEvaluation" => {
return RusotoError::Service(SimulateCustomPolicyError::PolicyEvaluation(
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 SimulateCustomPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SimulateCustomPolicyError {
fn description(&self) -> &str {
match *self {
SimulateCustomPolicyError::InvalidInput(ref cause) => cause,
SimulateCustomPolicyError::PolicyEvaluation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SimulatePrincipalPolicyError {
InvalidInput(String),
NoSuchEntity(String),
PolicyEvaluation(String),
}
impl SimulatePrincipalPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SimulatePrincipalPolicyError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(SimulatePrincipalPolicyError::InvalidInput(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(SimulatePrincipalPolicyError::NoSuchEntity(
parsed_error.message,
))
}
"PolicyEvaluation" => {
return RusotoError::Service(
SimulatePrincipalPolicyError::PolicyEvaluation(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 SimulatePrincipalPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SimulatePrincipalPolicyError {
fn description(&self) -> &str {
match *self {
SimulatePrincipalPolicyError::InvalidInput(ref cause) => cause,
SimulatePrincipalPolicyError::NoSuchEntity(ref cause) => cause,
SimulatePrincipalPolicyError::PolicyEvaluation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagRoleError {
ConcurrentModification(String),
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl TagRoleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagRoleError> {
{
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[..] {
"ConcurrentModification" => {
return RusotoError::Service(TagRoleError::ConcurrentModification(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(TagRoleError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(TagRoleError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(TagRoleError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(TagRoleError::ServiceFailure(
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 TagRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagRoleError {
fn description(&self) -> &str {
match *self {
TagRoleError::ConcurrentModification(ref cause) => cause,
TagRoleError::InvalidInput(ref cause) => cause,
TagRoleError::LimitExceeded(ref cause) => cause,
TagRoleError::NoSuchEntity(ref cause) => cause,
TagRoleError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagUserError {
ConcurrentModification(String),
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl TagUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagUserError> {
{
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[..] {
"ConcurrentModification" => {
return RusotoError::Service(TagUserError::ConcurrentModification(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(TagUserError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(TagUserError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(TagUserError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(TagUserError::ServiceFailure(
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 TagUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagUserError {
fn description(&self) -> &str {
match *self {
TagUserError::ConcurrentModification(ref cause) => cause,
TagUserError::InvalidInput(ref cause) => cause,
TagUserError::LimitExceeded(ref cause) => cause,
TagUserError::NoSuchEntity(ref cause) => cause,
TagUserError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagRoleError {
ConcurrentModification(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UntagRoleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagRoleError> {
{
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[..] {
"ConcurrentModification" => {
return RusotoError::Service(UntagRoleError::ConcurrentModification(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UntagRoleError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UntagRoleError::ServiceFailure(
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 UntagRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagRoleError {
fn description(&self) -> &str {
match *self {
UntagRoleError::ConcurrentModification(ref cause) => cause,
UntagRoleError::NoSuchEntity(ref cause) => cause,
UntagRoleError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagUserError {
ConcurrentModification(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UntagUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagUserError> {
{
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[..] {
"ConcurrentModification" => {
return RusotoError::Service(UntagUserError::ConcurrentModification(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UntagUserError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UntagUserError::ServiceFailure(
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 UntagUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagUserError {
fn description(&self) -> &str {
match *self {
UntagUserError::ConcurrentModification(ref cause) => cause,
UntagUserError::NoSuchEntity(ref cause) => cause,
UntagUserError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAccessKeyError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UpdateAccessKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAccessKeyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(UpdateAccessKeyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UpdateAccessKeyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UpdateAccessKeyError::ServiceFailure(
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 UpdateAccessKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAccessKeyError {
fn description(&self) -> &str {
match *self {
UpdateAccessKeyError::LimitExceeded(ref cause) => cause,
UpdateAccessKeyError::NoSuchEntity(ref cause) => cause,
UpdateAccessKeyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAccountPasswordPolicyError {
LimitExceeded(String),
MalformedPolicyDocument(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UpdateAccountPasswordPolicyError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateAccountPasswordPolicyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(
UpdateAccountPasswordPolicyError::LimitExceeded(parsed_error.message),
)
}
"MalformedPolicyDocument" => {
return RusotoError::Service(
UpdateAccountPasswordPolicyError::MalformedPolicyDocument(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
UpdateAccountPasswordPolicyError::NoSuchEntity(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(
UpdateAccountPasswordPolicyError::ServiceFailure(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 UpdateAccountPasswordPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAccountPasswordPolicyError {
fn description(&self) -> &str {
match *self {
UpdateAccountPasswordPolicyError::LimitExceeded(ref cause) => cause,
UpdateAccountPasswordPolicyError::MalformedPolicyDocument(ref cause) => cause,
UpdateAccountPasswordPolicyError::NoSuchEntity(ref cause) => cause,
UpdateAccountPasswordPolicyError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAssumeRolePolicyError {
LimitExceeded(String),
MalformedPolicyDocument(String),
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl UpdateAssumeRolePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAssumeRolePolicyError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(UpdateAssumeRolePolicyError::LimitExceeded(
parsed_error.message,
))
}
"MalformedPolicyDocument" => {
return RusotoError::Service(
UpdateAssumeRolePolicyError::MalformedPolicyDocument(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(UpdateAssumeRolePolicyError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UpdateAssumeRolePolicyError::ServiceFailure(
parsed_error.message,
))
}
"UnmodifiableEntity" => {
return RusotoError::Service(
UpdateAssumeRolePolicyError::UnmodifiableEntity(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 UpdateAssumeRolePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAssumeRolePolicyError {
fn description(&self) -> &str {
match *self {
UpdateAssumeRolePolicyError::LimitExceeded(ref cause) => cause,
UpdateAssumeRolePolicyError::MalformedPolicyDocument(ref cause) => cause,
UpdateAssumeRolePolicyError::NoSuchEntity(ref cause) => cause,
UpdateAssumeRolePolicyError::ServiceFailure(ref cause) => cause,
UpdateAssumeRolePolicyError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateGroupError {
EntityAlreadyExists(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UpdateGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGroupError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(UpdateGroupError::EntityAlreadyExists(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(UpdateGroupError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UpdateGroupError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UpdateGroupError::ServiceFailure(
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 UpdateGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateGroupError {
fn description(&self) -> &str {
match *self {
UpdateGroupError::EntityAlreadyExists(ref cause) => cause,
UpdateGroupError::LimitExceeded(ref cause) => cause,
UpdateGroupError::NoSuchEntity(ref cause) => cause,
UpdateGroupError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateLoginProfileError {
EntityTemporarilyUnmodifiable(String),
LimitExceeded(String),
NoSuchEntity(String),
PasswordPolicyViolation(String),
ServiceFailure(String),
}
impl UpdateLoginProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateLoginProfileError> {
{
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[..] {
"EntityTemporarilyUnmodifiable" => {
return RusotoError::Service(
UpdateLoginProfileError::EntityTemporarilyUnmodifiable(
parsed_error.message,
),
)
}
"LimitExceeded" => {
return RusotoError::Service(UpdateLoginProfileError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UpdateLoginProfileError::NoSuchEntity(
parsed_error.message,
))
}
"PasswordPolicyViolation" => {
return RusotoError::Service(
UpdateLoginProfileError::PasswordPolicyViolation(parsed_error.message),
)
}
"ServiceFailure" => {
return RusotoError::Service(UpdateLoginProfileError::ServiceFailure(
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 UpdateLoginProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateLoginProfileError {
fn description(&self) -> &str {
match *self {
UpdateLoginProfileError::EntityTemporarilyUnmodifiable(ref cause) => cause,
UpdateLoginProfileError::LimitExceeded(ref cause) => cause,
UpdateLoginProfileError::NoSuchEntity(ref cause) => cause,
UpdateLoginProfileError::PasswordPolicyViolation(ref cause) => cause,
UpdateLoginProfileError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateOpenIDConnectProviderThumbprintError {
InvalidInput(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UpdateOpenIDConnectProviderThumbprintError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateOpenIDConnectProviderThumbprintError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(
UpdateOpenIDConnectProviderThumbprintError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(
UpdateOpenIDConnectProviderThumbprintError::NoSuchEntity(
parsed_error.message,
),
)
}
"ServiceFailure" => {
return RusotoError::Service(
UpdateOpenIDConnectProviderThumbprintError::ServiceFailure(
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 UpdateOpenIDConnectProviderThumbprintError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateOpenIDConnectProviderThumbprintError {
fn description(&self) -> &str {
match *self {
UpdateOpenIDConnectProviderThumbprintError::InvalidInput(ref cause) => cause,
UpdateOpenIDConnectProviderThumbprintError::NoSuchEntity(ref cause) => cause,
UpdateOpenIDConnectProviderThumbprintError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRoleError {
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl UpdateRoleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRoleError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(UpdateRoleError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UpdateRoleError::ServiceFailure(
parsed_error.message,
))
}
"UnmodifiableEntity" => {
return RusotoError::Service(UpdateRoleError::UnmodifiableEntity(
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 UpdateRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRoleError {
fn description(&self) -> &str {
match *self {
UpdateRoleError::NoSuchEntity(ref cause) => cause,
UpdateRoleError::ServiceFailure(ref cause) => cause,
UpdateRoleError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRoleDescriptionError {
NoSuchEntity(String),
ServiceFailure(String),
UnmodifiableEntity(String),
}
impl UpdateRoleDescriptionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRoleDescriptionError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(UpdateRoleDescriptionError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UpdateRoleDescriptionError::ServiceFailure(
parsed_error.message,
))
}
"UnmodifiableEntity" => {
return RusotoError::Service(
UpdateRoleDescriptionError::UnmodifiableEntity(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 UpdateRoleDescriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRoleDescriptionError {
fn description(&self) -> &str {
match *self {
UpdateRoleDescriptionError::NoSuchEntity(ref cause) => cause,
UpdateRoleDescriptionError::ServiceFailure(ref cause) => cause,
UpdateRoleDescriptionError::UnmodifiableEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSAMLProviderError {
InvalidInput(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UpdateSAMLProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSAMLProviderError> {
{
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[..] {
"InvalidInput" => {
return RusotoError::Service(UpdateSAMLProviderError::InvalidInput(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(UpdateSAMLProviderError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UpdateSAMLProviderError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UpdateSAMLProviderError::ServiceFailure(
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 UpdateSAMLProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSAMLProviderError {
fn description(&self) -> &str {
match *self {
UpdateSAMLProviderError::InvalidInput(ref cause) => cause,
UpdateSAMLProviderError::LimitExceeded(ref cause) => cause,
UpdateSAMLProviderError::NoSuchEntity(ref cause) => cause,
UpdateSAMLProviderError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSSHPublicKeyError {
NoSuchEntity(String),
}
impl UpdateSSHPublicKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSSHPublicKeyError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(UpdateSSHPublicKeyError::NoSuchEntity(
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 UpdateSSHPublicKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSSHPublicKeyError {
fn description(&self) -> &str {
match *self {
UpdateSSHPublicKeyError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateServerCertificateError {
EntityAlreadyExists(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UpdateServerCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateServerCertificateError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(
UpdateServerCertificateError::EntityAlreadyExists(parsed_error.message),
)
}
"LimitExceeded" => {
return RusotoError::Service(UpdateServerCertificateError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UpdateServerCertificateError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UpdateServerCertificateError::ServiceFailure(
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 UpdateServerCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateServerCertificateError {
fn description(&self) -> &str {
match *self {
UpdateServerCertificateError::EntityAlreadyExists(ref cause) => cause,
UpdateServerCertificateError::LimitExceeded(ref cause) => cause,
UpdateServerCertificateError::NoSuchEntity(ref cause) => cause,
UpdateServerCertificateError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateServiceSpecificCredentialError {
NoSuchEntity(String),
}
impl UpdateServiceSpecificCredentialError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateServiceSpecificCredentialError> {
{
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[..] {
"NoSuchEntity" => {
return RusotoError::Service(
UpdateServiceSpecificCredentialError::NoSuchEntity(
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 UpdateServiceSpecificCredentialError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateServiceSpecificCredentialError {
fn description(&self) -> &str {
match *self {
UpdateServiceSpecificCredentialError::NoSuchEntity(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSigningCertificateError {
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UpdateSigningCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSigningCertificateError> {
{
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[..] {
"LimitExceeded" => {
return RusotoError::Service(UpdateSigningCertificateError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UpdateSigningCertificateError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UpdateSigningCertificateError::ServiceFailure(
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 UpdateSigningCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSigningCertificateError {
fn description(&self) -> &str {
match *self {
UpdateSigningCertificateError::LimitExceeded(ref cause) => cause,
UpdateSigningCertificateError::NoSuchEntity(ref cause) => cause,
UpdateSigningCertificateError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateUserError {
ConcurrentModification(String),
EntityAlreadyExists(String),
EntityTemporarilyUnmodifiable(String),
LimitExceeded(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UpdateUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserError> {
{
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[..] {
"ConcurrentModification" => {
return RusotoError::Service(UpdateUserError::ConcurrentModification(
parsed_error.message,
))
}
"EntityAlreadyExists" => {
return RusotoError::Service(UpdateUserError::EntityAlreadyExists(
parsed_error.message,
))
}
"EntityTemporarilyUnmodifiable" => {
return RusotoError::Service(
UpdateUserError::EntityTemporarilyUnmodifiable(parsed_error.message),
)
}
"LimitExceeded" => {
return RusotoError::Service(UpdateUserError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UpdateUserError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UpdateUserError::ServiceFailure(
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 UpdateUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateUserError {
fn description(&self) -> &str {
match *self {
UpdateUserError::ConcurrentModification(ref cause) => cause,
UpdateUserError::EntityAlreadyExists(ref cause) => cause,
UpdateUserError::EntityTemporarilyUnmodifiable(ref cause) => cause,
UpdateUserError::LimitExceeded(ref cause) => cause,
UpdateUserError::NoSuchEntity(ref cause) => cause,
UpdateUserError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UploadSSHPublicKeyError {
DuplicateSSHPublicKey(String),
InvalidPublicKey(String),
LimitExceeded(String),
NoSuchEntity(String),
UnrecognizedPublicKeyEncoding(String),
}
impl UploadSSHPublicKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UploadSSHPublicKeyError> {
{
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[..] {
"DuplicateSSHPublicKey" => {
return RusotoError::Service(
UploadSSHPublicKeyError::DuplicateSSHPublicKey(parsed_error.message),
)
}
"InvalidPublicKey" => {
return RusotoError::Service(UploadSSHPublicKeyError::InvalidPublicKey(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(UploadSSHPublicKeyError::LimitExceeded(
parsed_error.message,
))
}
"NoSuchEntity" => {
return RusotoError::Service(UploadSSHPublicKeyError::NoSuchEntity(
parsed_error.message,
))
}
"UnrecognizedPublicKeyEncoding" => {
return RusotoError::Service(
UploadSSHPublicKeyError::UnrecognizedPublicKeyEncoding(
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 UploadSSHPublicKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UploadSSHPublicKeyError {
fn description(&self) -> &str {
match *self {
UploadSSHPublicKeyError::DuplicateSSHPublicKey(ref cause) => cause,
UploadSSHPublicKeyError::InvalidPublicKey(ref cause) => cause,
UploadSSHPublicKeyError::LimitExceeded(ref cause) => cause,
UploadSSHPublicKeyError::NoSuchEntity(ref cause) => cause,
UploadSSHPublicKeyError::UnrecognizedPublicKeyEncoding(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UploadServerCertificateError {
EntityAlreadyExists(String),
KeyPairMismatch(String),
LimitExceeded(String),
MalformedCertificate(String),
ServiceFailure(String),
}
impl UploadServerCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UploadServerCertificateError> {
{
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[..] {
"EntityAlreadyExists" => {
return RusotoError::Service(
UploadServerCertificateError::EntityAlreadyExists(parsed_error.message),
)
}
"KeyPairMismatch" => {
return RusotoError::Service(UploadServerCertificateError::KeyPairMismatch(
parsed_error.message,
))
}
"LimitExceeded" => {
return RusotoError::Service(UploadServerCertificateError::LimitExceeded(
parsed_error.message,
))
}
"MalformedCertificate" => {
return RusotoError::Service(
UploadServerCertificateError::MalformedCertificate(
parsed_error.message,
),
)
}
"ServiceFailure" => {
return RusotoError::Service(UploadServerCertificateError::ServiceFailure(
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 UploadServerCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UploadServerCertificateError {
fn description(&self) -> &str {
match *self {
UploadServerCertificateError::EntityAlreadyExists(ref cause) => cause,
UploadServerCertificateError::KeyPairMismatch(ref cause) => cause,
UploadServerCertificateError::LimitExceeded(ref cause) => cause,
UploadServerCertificateError::MalformedCertificate(ref cause) => cause,
UploadServerCertificateError::ServiceFailure(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UploadSigningCertificateError {
DuplicateCertificate(String),
EntityAlreadyExists(String),
InvalidCertificate(String),
LimitExceeded(String),
MalformedCertificate(String),
NoSuchEntity(String),
ServiceFailure(String),
}
impl UploadSigningCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UploadSigningCertificateError> {
{
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[..] {
"DuplicateCertificate" => {
return RusotoError::Service(
UploadSigningCertificateError::DuplicateCertificate(
parsed_error.message,
),
)
}
"EntityAlreadyExists" => {
return RusotoError::Service(
UploadSigningCertificateError::EntityAlreadyExists(
parsed_error.message,
),
)
}
"InvalidCertificate" => {
return RusotoError::Service(
UploadSigningCertificateError::InvalidCertificate(parsed_error.message),
)
}
"LimitExceeded" => {
return RusotoError::Service(UploadSigningCertificateError::LimitExceeded(
parsed_error.message,
))
}
"MalformedCertificate" => {
return RusotoError::Service(
UploadSigningCertificateError::MalformedCertificate(
parsed_error.message,
),
)
}
"NoSuchEntity" => {
return RusotoError::Service(UploadSigningCertificateError::NoSuchEntity(
parsed_error.message,
))
}
"ServiceFailure" => {
return RusotoError::Service(UploadSigningCertificateError::ServiceFailure(
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 UploadSigningCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UploadSigningCertificateError {
fn description(&self) -> &str {
match *self {
UploadSigningCertificateError::DuplicateCertificate(ref cause) => cause,
UploadSigningCertificateError::EntityAlreadyExists(ref cause) => cause,
UploadSigningCertificateError::InvalidCertificate(ref cause) => cause,
UploadSigningCertificateError::LimitExceeded(ref cause) => cause,
UploadSigningCertificateError::MalformedCertificate(ref cause) => cause,
UploadSigningCertificateError::NoSuchEntity(ref cause) => cause,
UploadSigningCertificateError::ServiceFailure(ref cause) => cause,
}
}
}
pub trait Iam {
fn add_client_id_to_open_id_connect_provider(
&self,
input: AddClientIDToOpenIDConnectProviderRequest,
) -> RusotoFuture<(), AddClientIDToOpenIDConnectProviderError>;
fn add_role_to_instance_profile(
&self,
input: AddRoleToInstanceProfileRequest,
) -> RusotoFuture<(), AddRoleToInstanceProfileError>;
fn add_user_to_group(
&self,
input: AddUserToGroupRequest,
) -> RusotoFuture<(), AddUserToGroupError>;
fn attach_group_policy(
&self,
input: AttachGroupPolicyRequest,
) -> RusotoFuture<(), AttachGroupPolicyError>;
fn attach_role_policy(
&self,
input: AttachRolePolicyRequest,
) -> RusotoFuture<(), AttachRolePolicyError>;
fn attach_user_policy(
&self,
input: AttachUserPolicyRequest,
) -> RusotoFuture<(), AttachUserPolicyError>;
fn change_password(
&self,
input: ChangePasswordRequest,
) -> RusotoFuture<(), ChangePasswordError>;
fn create_access_key(
&self,
input: CreateAccessKeyRequest,
) -> RusotoFuture<CreateAccessKeyResponse, CreateAccessKeyError>;
fn create_account_alias(
&self,
input: CreateAccountAliasRequest,
) -> RusotoFuture<(), CreateAccountAliasError>;
fn create_group(
&self,
input: CreateGroupRequest,
) -> RusotoFuture<CreateGroupResponse, CreateGroupError>;
fn create_instance_profile(
&self,
input: CreateInstanceProfileRequest,
) -> RusotoFuture<CreateInstanceProfileResponse, CreateInstanceProfileError>;
fn create_login_profile(
&self,
input: CreateLoginProfileRequest,
) -> RusotoFuture<CreateLoginProfileResponse, CreateLoginProfileError>;
fn create_open_id_connect_provider(
&self,
input: CreateOpenIDConnectProviderRequest,
) -> RusotoFuture<CreateOpenIDConnectProviderResponse, CreateOpenIDConnectProviderError>;
fn create_policy(
&self,
input: CreatePolicyRequest,
) -> RusotoFuture<CreatePolicyResponse, CreatePolicyError>;
fn create_policy_version(
&self,
input: CreatePolicyVersionRequest,
) -> RusotoFuture<CreatePolicyVersionResponse, CreatePolicyVersionError>;
fn create_role(
&self,
input: CreateRoleRequest,
) -> RusotoFuture<CreateRoleResponse, CreateRoleError>;
fn create_saml_provider(
&self,
input: CreateSAMLProviderRequest,
) -> RusotoFuture<CreateSAMLProviderResponse, CreateSAMLProviderError>;
fn create_service_linked_role(
&self,
input: CreateServiceLinkedRoleRequest,
) -> RusotoFuture<CreateServiceLinkedRoleResponse, CreateServiceLinkedRoleError>;
fn create_service_specific_credential(
&self,
input: CreateServiceSpecificCredentialRequest,
) -> RusotoFuture<CreateServiceSpecificCredentialResponse, CreateServiceSpecificCredentialError>;
fn create_user(
&self,
input: CreateUserRequest,
) -> RusotoFuture<CreateUserResponse, CreateUserError>;
fn create_virtual_mfa_device(
&self,
input: CreateVirtualMFADeviceRequest,
) -> RusotoFuture<CreateVirtualMFADeviceResponse, CreateVirtualMFADeviceError>;
fn deactivate_mfa_device(
&self,
input: DeactivateMFADeviceRequest,
) -> RusotoFuture<(), DeactivateMFADeviceError>;
fn delete_access_key(
&self,
input: DeleteAccessKeyRequest,
) -> RusotoFuture<(), DeleteAccessKeyError>;
fn delete_account_alias(
&self,
input: DeleteAccountAliasRequest,
) -> RusotoFuture<(), DeleteAccountAliasError>;
fn delete_account_password_policy(&self) -> RusotoFuture<(), DeleteAccountPasswordPolicyError>;
fn delete_group(&self, input: DeleteGroupRequest) -> RusotoFuture<(), DeleteGroupError>;
fn delete_group_policy(
&self,
input: DeleteGroupPolicyRequest,
) -> RusotoFuture<(), DeleteGroupPolicyError>;
fn delete_instance_profile(
&self,
input: DeleteInstanceProfileRequest,
) -> RusotoFuture<(), DeleteInstanceProfileError>;
fn delete_login_profile(
&self,
input: DeleteLoginProfileRequest,
) -> RusotoFuture<(), DeleteLoginProfileError>;
fn delete_open_id_connect_provider(
&self,
input: DeleteOpenIDConnectProviderRequest,
) -> RusotoFuture<(), DeleteOpenIDConnectProviderError>;
fn delete_policy(&self, input: DeletePolicyRequest) -> RusotoFuture<(), DeletePolicyError>;
fn delete_policy_version(
&self,
input: DeletePolicyVersionRequest,
) -> RusotoFuture<(), DeletePolicyVersionError>;
fn delete_role(&self, input: DeleteRoleRequest) -> RusotoFuture<(), DeleteRoleError>;
fn delete_role_permissions_boundary(
&self,
input: DeleteRolePermissionsBoundaryRequest,
) -> RusotoFuture<(), DeleteRolePermissionsBoundaryError>;
fn delete_role_policy(
&self,
input: DeleteRolePolicyRequest,
) -> RusotoFuture<(), DeleteRolePolicyError>;
fn delete_saml_provider(
&self,
input: DeleteSAMLProviderRequest,
) -> RusotoFuture<(), DeleteSAMLProviderError>;
fn delete_ssh_public_key(
&self,
input: DeleteSSHPublicKeyRequest,
) -> RusotoFuture<(), DeleteSSHPublicKeyError>;
fn delete_server_certificate(
&self,
input: DeleteServerCertificateRequest,
) -> RusotoFuture<(), DeleteServerCertificateError>;
fn delete_service_linked_role(
&self,
input: DeleteServiceLinkedRoleRequest,
) -> RusotoFuture<DeleteServiceLinkedRoleResponse, DeleteServiceLinkedRoleError>;
fn delete_service_specific_credential(
&self,
input: DeleteServiceSpecificCredentialRequest,
) -> RusotoFuture<(), DeleteServiceSpecificCredentialError>;
fn delete_signing_certificate(
&self,
input: DeleteSigningCertificateRequest,
) -> RusotoFuture<(), DeleteSigningCertificateError>;
fn delete_user(&self, input: DeleteUserRequest) -> RusotoFuture<(), DeleteUserError>;
fn delete_user_permissions_boundary(
&self,
input: DeleteUserPermissionsBoundaryRequest,
) -> RusotoFuture<(), DeleteUserPermissionsBoundaryError>;
fn delete_user_policy(
&self,
input: DeleteUserPolicyRequest,
) -> RusotoFuture<(), DeleteUserPolicyError>;
fn delete_virtual_mfa_device(
&self,
input: DeleteVirtualMFADeviceRequest,
) -> RusotoFuture<(), DeleteVirtualMFADeviceError>;
fn detach_group_policy(
&self,
input: DetachGroupPolicyRequest,
) -> RusotoFuture<(), DetachGroupPolicyError>;
fn detach_role_policy(
&self,
input: DetachRolePolicyRequest,
) -> RusotoFuture<(), DetachRolePolicyError>;
fn detach_user_policy(
&self,
input: DetachUserPolicyRequest,
) -> RusotoFuture<(), DetachUserPolicyError>;
fn enable_mfa_device(
&self,
input: EnableMFADeviceRequest,
) -> RusotoFuture<(), EnableMFADeviceError>;
fn generate_credential_report(
&self,
) -> RusotoFuture<GenerateCredentialReportResponse, GenerateCredentialReportError>;
fn generate_service_last_accessed_details(
&self,
input: GenerateServiceLastAccessedDetailsRequest,
) -> RusotoFuture<
GenerateServiceLastAccessedDetailsResponse,
GenerateServiceLastAccessedDetailsError,
>;
fn get_access_key_last_used(
&self,
input: GetAccessKeyLastUsedRequest,
) -> RusotoFuture<GetAccessKeyLastUsedResponse, GetAccessKeyLastUsedError>;
fn get_account_authorization_details(
&self,
input: GetAccountAuthorizationDetailsRequest,
) -> RusotoFuture<GetAccountAuthorizationDetailsResponse, GetAccountAuthorizationDetailsError>;
fn get_account_password_policy(
&self,
) -> RusotoFuture<GetAccountPasswordPolicyResponse, GetAccountPasswordPolicyError>;
fn get_account_summary(
&self,
) -> RusotoFuture<GetAccountSummaryResponse, GetAccountSummaryError>;
fn get_context_keys_for_custom_policy(
&self,
input: GetContextKeysForCustomPolicyRequest,
) -> RusotoFuture<GetContextKeysForPolicyResponse, GetContextKeysForCustomPolicyError>;
fn get_context_keys_for_principal_policy(
&self,
input: GetContextKeysForPrincipalPolicyRequest,
) -> RusotoFuture<GetContextKeysForPolicyResponse, GetContextKeysForPrincipalPolicyError>;
fn get_credential_report(
&self,
) -> RusotoFuture<GetCredentialReportResponse, GetCredentialReportError>;
fn get_group(&self, input: GetGroupRequest) -> RusotoFuture<GetGroupResponse, GetGroupError>;
fn get_group_policy(
&self,
input: GetGroupPolicyRequest,
) -> RusotoFuture<GetGroupPolicyResponse, GetGroupPolicyError>;
fn get_instance_profile(
&self,
input: GetInstanceProfileRequest,
) -> RusotoFuture<GetInstanceProfileResponse, GetInstanceProfileError>;
fn get_login_profile(
&self,
input: GetLoginProfileRequest,
) -> RusotoFuture<GetLoginProfileResponse, GetLoginProfileError>;
fn get_open_id_connect_provider(
&self,
input: GetOpenIDConnectProviderRequest,
) -> RusotoFuture<GetOpenIDConnectProviderResponse, GetOpenIDConnectProviderError>;
fn get_policy(
&self,
input: GetPolicyRequest,
) -> RusotoFuture<GetPolicyResponse, GetPolicyError>;
fn get_policy_version(
&self,
input: GetPolicyVersionRequest,
) -> RusotoFuture<GetPolicyVersionResponse, GetPolicyVersionError>;
fn get_role(&self, input: GetRoleRequest) -> RusotoFuture<GetRoleResponse, GetRoleError>;
fn get_role_policy(
&self,
input: GetRolePolicyRequest,
) -> RusotoFuture<GetRolePolicyResponse, GetRolePolicyError>;
fn get_saml_provider(
&self,
input: GetSAMLProviderRequest,
) -> RusotoFuture<GetSAMLProviderResponse, GetSAMLProviderError>;
fn get_ssh_public_key(
&self,
input: GetSSHPublicKeyRequest,
) -> RusotoFuture<GetSSHPublicKeyResponse, GetSSHPublicKeyError>;
fn get_server_certificate(
&self,
input: GetServerCertificateRequest,
) -> RusotoFuture<GetServerCertificateResponse, GetServerCertificateError>;
fn get_service_last_accessed_details(
&self,
input: GetServiceLastAccessedDetailsRequest,
) -> RusotoFuture<GetServiceLastAccessedDetailsResponse, GetServiceLastAccessedDetailsError>;
fn get_service_last_accessed_details_with_entities(
&self,
input: GetServiceLastAccessedDetailsWithEntitiesRequest,
) -> RusotoFuture<
GetServiceLastAccessedDetailsWithEntitiesResponse,
GetServiceLastAccessedDetailsWithEntitiesError,
>;
fn get_service_linked_role_deletion_status(
&self,
input: GetServiceLinkedRoleDeletionStatusRequest,
) -> RusotoFuture<
GetServiceLinkedRoleDeletionStatusResponse,
GetServiceLinkedRoleDeletionStatusError,
>;
fn get_user(&self, input: GetUserRequest) -> RusotoFuture<GetUserResponse, GetUserError>;
fn get_user_policy(
&self,
input: GetUserPolicyRequest,
) -> RusotoFuture<GetUserPolicyResponse, GetUserPolicyError>;
fn list_access_keys(
&self,
input: ListAccessKeysRequest,
) -> RusotoFuture<ListAccessKeysResponse, ListAccessKeysError>;
fn list_account_aliases(
&self,
input: ListAccountAliasesRequest,
) -> RusotoFuture<ListAccountAliasesResponse, ListAccountAliasesError>;
fn list_attached_group_policies(
&self,
input: ListAttachedGroupPoliciesRequest,
) -> RusotoFuture<ListAttachedGroupPoliciesResponse, ListAttachedGroupPoliciesError>;
fn list_attached_role_policies(
&self,
input: ListAttachedRolePoliciesRequest,
) -> RusotoFuture<ListAttachedRolePoliciesResponse, ListAttachedRolePoliciesError>;
fn list_attached_user_policies(
&self,
input: ListAttachedUserPoliciesRequest,
) -> RusotoFuture<ListAttachedUserPoliciesResponse, ListAttachedUserPoliciesError>;
fn list_entities_for_policy(
&self,
input: ListEntitiesForPolicyRequest,
) -> RusotoFuture<ListEntitiesForPolicyResponse, ListEntitiesForPolicyError>;
fn list_group_policies(
&self,
input: ListGroupPoliciesRequest,
) -> RusotoFuture<ListGroupPoliciesResponse, ListGroupPoliciesError>;
fn list_groups(
&self,
input: ListGroupsRequest,
) -> RusotoFuture<ListGroupsResponse, ListGroupsError>;
fn list_groups_for_user(
&self,
input: ListGroupsForUserRequest,
) -> RusotoFuture<ListGroupsForUserResponse, ListGroupsForUserError>;
fn list_instance_profiles(
&self,
input: ListInstanceProfilesRequest,
) -> RusotoFuture<ListInstanceProfilesResponse, ListInstanceProfilesError>;
fn list_instance_profiles_for_role(
&self,
input: ListInstanceProfilesForRoleRequest,
) -> RusotoFuture<ListInstanceProfilesForRoleResponse, ListInstanceProfilesForRoleError>;
fn list_mfa_devices(
&self,
input: ListMFADevicesRequest,
) -> RusotoFuture<ListMFADevicesResponse, ListMFADevicesError>;
fn list_open_id_connect_providers(
&self,
input: ListOpenIDConnectProvidersRequest,
) -> RusotoFuture<ListOpenIDConnectProvidersResponse, ListOpenIDConnectProvidersError>;
fn list_policies(
&self,
input: ListPoliciesRequest,
) -> RusotoFuture<ListPoliciesResponse, ListPoliciesError>;
fn list_policies_granting_service_access(
&self,
input: ListPoliciesGrantingServiceAccessRequest,
) -> RusotoFuture<
ListPoliciesGrantingServiceAccessResponse,
ListPoliciesGrantingServiceAccessError,
>;
fn list_policy_versions(
&self,
input: ListPolicyVersionsRequest,
) -> RusotoFuture<ListPolicyVersionsResponse, ListPolicyVersionsError>;
fn list_role_policies(
&self,
input: ListRolePoliciesRequest,
) -> RusotoFuture<ListRolePoliciesResponse, ListRolePoliciesError>;
fn list_role_tags(
&self,
input: ListRoleTagsRequest,
) -> RusotoFuture<ListRoleTagsResponse, ListRoleTagsError>;
fn list_roles(
&self,
input: ListRolesRequest,
) -> RusotoFuture<ListRolesResponse, ListRolesError>;
fn list_saml_providers(
&self,
input: ListSAMLProvidersRequest,
) -> RusotoFuture<ListSAMLProvidersResponse, ListSAMLProvidersError>;
fn list_ssh_public_keys(
&self,
input: ListSSHPublicKeysRequest,
) -> RusotoFuture<ListSSHPublicKeysResponse, ListSSHPublicKeysError>;
fn list_server_certificates(
&self,
input: ListServerCertificatesRequest,
) -> RusotoFuture<ListServerCertificatesResponse, ListServerCertificatesError>;
fn list_service_specific_credentials(
&self,
input: ListServiceSpecificCredentialsRequest,
) -> RusotoFuture<ListServiceSpecificCredentialsResponse, ListServiceSpecificCredentialsError>;
fn list_signing_certificates(
&self,
input: ListSigningCertificatesRequest,
) -> RusotoFuture<ListSigningCertificatesResponse, ListSigningCertificatesError>;
fn list_user_policies(
&self,
input: ListUserPoliciesRequest,
) -> RusotoFuture<ListUserPoliciesResponse, ListUserPoliciesError>;
fn list_user_tags(
&self,
input: ListUserTagsRequest,
) -> RusotoFuture<ListUserTagsResponse, ListUserTagsError>;
fn list_users(
&self,
input: ListUsersRequest,
) -> RusotoFuture<ListUsersResponse, ListUsersError>;
fn list_virtual_mfa_devices(
&self,
input: ListVirtualMFADevicesRequest,
) -> RusotoFuture<ListVirtualMFADevicesResponse, ListVirtualMFADevicesError>;
fn put_group_policy(
&self,
input: PutGroupPolicyRequest,
) -> RusotoFuture<(), PutGroupPolicyError>;
fn put_role_permissions_boundary(
&self,
input: PutRolePermissionsBoundaryRequest,
) -> RusotoFuture<(), PutRolePermissionsBoundaryError>;
fn put_role_policy(&self, input: PutRolePolicyRequest) -> RusotoFuture<(), PutRolePolicyError>;
fn put_user_permissions_boundary(
&self,
input: PutUserPermissionsBoundaryRequest,
) -> RusotoFuture<(), PutUserPermissionsBoundaryError>;
fn put_user_policy(&self, input: PutUserPolicyRequest) -> RusotoFuture<(), PutUserPolicyError>;
fn remove_client_id_from_open_id_connect_provider(
&self,
input: RemoveClientIDFromOpenIDConnectProviderRequest,
) -> RusotoFuture<(), RemoveClientIDFromOpenIDConnectProviderError>;
fn remove_role_from_instance_profile(
&self,
input: RemoveRoleFromInstanceProfileRequest,
) -> RusotoFuture<(), RemoveRoleFromInstanceProfileError>;
fn remove_user_from_group(
&self,
input: RemoveUserFromGroupRequest,
) -> RusotoFuture<(), RemoveUserFromGroupError>;
fn reset_service_specific_credential(
&self,
input: ResetServiceSpecificCredentialRequest,
) -> RusotoFuture<ResetServiceSpecificCredentialResponse, ResetServiceSpecificCredentialError>;
fn resync_mfa_device(
&self,
input: ResyncMFADeviceRequest,
) -> RusotoFuture<(), ResyncMFADeviceError>;
fn set_default_policy_version(
&self,
input: SetDefaultPolicyVersionRequest,
) -> RusotoFuture<(), SetDefaultPolicyVersionError>;
fn set_security_token_service_preferences(
&self,
input: SetSecurityTokenServicePreferencesRequest,
) -> RusotoFuture<(), SetSecurityTokenServicePreferencesError>;
fn simulate_custom_policy(
&self,
input: SimulateCustomPolicyRequest,
) -> RusotoFuture<SimulatePolicyResponse, SimulateCustomPolicyError>;
fn simulate_principal_policy(
&self,
input: SimulatePrincipalPolicyRequest,
) -> RusotoFuture<SimulatePolicyResponse, SimulatePrincipalPolicyError>;
fn tag_role(&self, input: TagRoleRequest) -> RusotoFuture<(), TagRoleError>;
fn tag_user(&self, input: TagUserRequest) -> RusotoFuture<(), TagUserError>;
fn untag_role(&self, input: UntagRoleRequest) -> RusotoFuture<(), UntagRoleError>;
fn untag_user(&self, input: UntagUserRequest) -> RusotoFuture<(), UntagUserError>;
fn update_access_key(
&self,
input: UpdateAccessKeyRequest,
) -> RusotoFuture<(), UpdateAccessKeyError>;
fn update_account_password_policy(
&self,
input: UpdateAccountPasswordPolicyRequest,
) -> RusotoFuture<(), UpdateAccountPasswordPolicyError>;
fn update_assume_role_policy(
&self,
input: UpdateAssumeRolePolicyRequest,
) -> RusotoFuture<(), UpdateAssumeRolePolicyError>;
fn update_group(&self, input: UpdateGroupRequest) -> RusotoFuture<(), UpdateGroupError>;
fn update_login_profile(
&self,
input: UpdateLoginProfileRequest,
) -> RusotoFuture<(), UpdateLoginProfileError>;
fn update_open_id_connect_provider_thumbprint(
&self,
input: UpdateOpenIDConnectProviderThumbprintRequest,
) -> RusotoFuture<(), UpdateOpenIDConnectProviderThumbprintError>;
fn update_role(
&self,
input: UpdateRoleRequest,
) -> RusotoFuture<UpdateRoleResponse, UpdateRoleError>;
fn update_role_description(
&self,
input: UpdateRoleDescriptionRequest,
) -> RusotoFuture<UpdateRoleDescriptionResponse, UpdateRoleDescriptionError>;
fn update_saml_provider(
&self,
input: UpdateSAMLProviderRequest,
) -> RusotoFuture<UpdateSAMLProviderResponse, UpdateSAMLProviderError>;
fn update_ssh_public_key(
&self,
input: UpdateSSHPublicKeyRequest,
) -> RusotoFuture<(), UpdateSSHPublicKeyError>;
fn update_server_certificate(
&self,
input: UpdateServerCertificateRequest,
) -> RusotoFuture<(), UpdateServerCertificateError>;
fn update_service_specific_credential(
&self,
input: UpdateServiceSpecificCredentialRequest,
) -> RusotoFuture<(), UpdateServiceSpecificCredentialError>;
fn update_signing_certificate(
&self,
input: UpdateSigningCertificateRequest,
) -> RusotoFuture<(), UpdateSigningCertificateError>;
fn update_user(&self, input: UpdateUserRequest) -> RusotoFuture<(), UpdateUserError>;
fn upload_ssh_public_key(
&self,
input: UploadSSHPublicKeyRequest,
) -> RusotoFuture<UploadSSHPublicKeyResponse, UploadSSHPublicKeyError>;
fn upload_server_certificate(
&self,
input: UploadServerCertificateRequest,
) -> RusotoFuture<UploadServerCertificateResponse, UploadServerCertificateError>;
fn upload_signing_certificate(
&self,
input: UploadSigningCertificateRequest,
) -> RusotoFuture<UploadSigningCertificateResponse, UploadSigningCertificateError>;
}
#[derive(Clone)]
pub struct IamClient {
client: Client,
region: region::Region,
}
impl IamClient {
pub fn new(region: region::Region) -> IamClient {
IamClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> IamClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
IamClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Iam for IamClient {
fn add_client_id_to_open_id_connect_provider(
&self,
input: AddClientIDToOpenIDConnectProviderRequest,
) -> RusotoFuture<(), AddClientIDToOpenIDConnectProviderError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddClientIDToOpenIDConnectProvider");
params.put("Version", "2010-05-08");
AddClientIDToOpenIDConnectProviderRequestSerializer::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(AddClientIDToOpenIDConnectProviderError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn add_role_to_instance_profile(
&self,
input: AddRoleToInstanceProfileRequest,
) -> RusotoFuture<(), AddRoleToInstanceProfileError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddRoleToInstanceProfile");
params.put("Version", "2010-05-08");
AddRoleToInstanceProfileRequestSerializer::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(AddRoleToInstanceProfileError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn add_user_to_group(
&self,
input: AddUserToGroupRequest,
) -> RusotoFuture<(), AddUserToGroupError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddUserToGroup");
params.put("Version", "2010-05-08");
AddUserToGroupRequestSerializer::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(AddUserToGroupError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn attach_group_policy(
&self,
input: AttachGroupPolicyRequest,
) -> RusotoFuture<(), AttachGroupPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AttachGroupPolicy");
params.put("Version", "2010-05-08");
AttachGroupPolicyRequestSerializer::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(AttachGroupPolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn attach_role_policy(
&self,
input: AttachRolePolicyRequest,
) -> RusotoFuture<(), AttachRolePolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AttachRolePolicy");
params.put("Version", "2010-05-08");
AttachRolePolicyRequestSerializer::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(AttachRolePolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn attach_user_policy(
&self,
input: AttachUserPolicyRequest,
) -> RusotoFuture<(), AttachUserPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AttachUserPolicy");
params.put("Version", "2010-05-08");
AttachUserPolicyRequestSerializer::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(AttachUserPolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn change_password(
&self,
input: ChangePasswordRequest,
) -> RusotoFuture<(), ChangePasswordError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ChangePassword");
params.put("Version", "2010-05-08");
ChangePasswordRequestSerializer::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(ChangePasswordError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn create_access_key(
&self,
input: CreateAccessKeyRequest,
) -> RusotoFuture<CreateAccessKeyResponse, CreateAccessKeyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateAccessKey");
params.put("Version", "2010-05-08");
CreateAccessKeyRequestSerializer::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(CreateAccessKeyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateAccessKeyResponse::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 = CreateAccessKeyResponseDeserializer::deserialize(
"CreateAccessKeyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_account_alias(
&self,
input: CreateAccountAliasRequest,
) -> RusotoFuture<(), CreateAccountAliasError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateAccountAlias");
params.put("Version", "2010-05-08");
CreateAccountAliasRequestSerializer::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(CreateAccountAliasError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn create_group(
&self,
input: CreateGroupRequest,
) -> RusotoFuture<CreateGroupResponse, CreateGroupError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateGroup");
params.put("Version", "2010-05-08");
CreateGroupRequestSerializer::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(CreateGroupError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateGroupResponse::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 = CreateGroupResponseDeserializer::deserialize(
"CreateGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_instance_profile(
&self,
input: CreateInstanceProfileRequest,
) -> RusotoFuture<CreateInstanceProfileResponse, CreateInstanceProfileError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateInstanceProfile");
params.put("Version", "2010-05-08");
CreateInstanceProfileRequestSerializer::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(CreateInstanceProfileError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateInstanceProfileResponse::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 = CreateInstanceProfileResponseDeserializer::deserialize(
"CreateInstanceProfileResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_login_profile(
&self,
input: CreateLoginProfileRequest,
) -> RusotoFuture<CreateLoginProfileResponse, CreateLoginProfileError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateLoginProfile");
params.put("Version", "2010-05-08");
CreateLoginProfileRequestSerializer::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(CreateLoginProfileError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateLoginProfileResponse::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 = CreateLoginProfileResponseDeserializer::deserialize(
"CreateLoginProfileResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_open_id_connect_provider(
&self,
input: CreateOpenIDConnectProviderRequest,
) -> RusotoFuture<CreateOpenIDConnectProviderResponse, CreateOpenIDConnectProviderError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateOpenIDConnectProvider");
params.put("Version", "2010-05-08");
CreateOpenIDConnectProviderRequestSerializer::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(CreateOpenIDConnectProviderError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateOpenIDConnectProviderResponse::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 = CreateOpenIDConnectProviderResponseDeserializer::deserialize(
"CreateOpenIDConnectProviderResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_policy(
&self,
input: CreatePolicyRequest,
) -> RusotoFuture<CreatePolicyResponse, CreatePolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreatePolicy");
params.put("Version", "2010-05-08");
CreatePolicyRequestSerializer::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(CreatePolicyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreatePolicyResponse::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 = CreatePolicyResponseDeserializer::deserialize(
"CreatePolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_policy_version(
&self,
input: CreatePolicyVersionRequest,
) -> RusotoFuture<CreatePolicyVersionResponse, CreatePolicyVersionError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreatePolicyVersion");
params.put("Version", "2010-05-08");
CreatePolicyVersionRequestSerializer::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(CreatePolicyVersionError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreatePolicyVersionResponse::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 = CreatePolicyVersionResponseDeserializer::deserialize(
"CreatePolicyVersionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_role(
&self,
input: CreateRoleRequest,
) -> RusotoFuture<CreateRoleResponse, CreateRoleError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateRole");
params.put("Version", "2010-05-08");
CreateRoleRequestSerializer::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(CreateRoleError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateRoleResponse::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 = CreateRoleResponseDeserializer::deserialize(
"CreateRoleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_saml_provider(
&self,
input: CreateSAMLProviderRequest,
) -> RusotoFuture<CreateSAMLProviderResponse, CreateSAMLProviderError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateSAMLProvider");
params.put("Version", "2010-05-08");
CreateSAMLProviderRequestSerializer::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(CreateSAMLProviderError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateSAMLProviderResponse::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 = CreateSAMLProviderResponseDeserializer::deserialize(
"CreateSAMLProviderResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_service_linked_role(
&self,
input: CreateServiceLinkedRoleRequest,
) -> RusotoFuture<CreateServiceLinkedRoleResponse, CreateServiceLinkedRoleError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateServiceLinkedRole");
params.put("Version", "2010-05-08");
CreateServiceLinkedRoleRequestSerializer::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(CreateServiceLinkedRoleError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateServiceLinkedRoleResponse::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 = CreateServiceLinkedRoleResponseDeserializer::deserialize(
"CreateServiceLinkedRoleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_service_specific_credential(
&self,
input: CreateServiceSpecificCredentialRequest,
) -> RusotoFuture<CreateServiceSpecificCredentialResponse, CreateServiceSpecificCredentialError>
{
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateServiceSpecificCredential");
params.put("Version", "2010-05-08");
CreateServiceSpecificCredentialRequestSerializer::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(CreateServiceSpecificCredentialError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateServiceSpecificCredentialResponse::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 = CreateServiceSpecificCredentialResponseDeserializer::deserialize(
"CreateServiceSpecificCredentialResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_user(
&self,
input: CreateUserRequest,
) -> RusotoFuture<CreateUserResponse, CreateUserError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateUser");
params.put("Version", "2010-05-08");
CreateUserRequestSerializer::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(CreateUserError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateUserResponse::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 = CreateUserResponseDeserializer::deserialize(
"CreateUserResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_virtual_mfa_device(
&self,
input: CreateVirtualMFADeviceRequest,
) -> RusotoFuture<CreateVirtualMFADeviceResponse, CreateVirtualMFADeviceError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateVirtualMFADevice");
params.put("Version", "2010-05-08");
CreateVirtualMFADeviceRequestSerializer::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(CreateVirtualMFADeviceError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateVirtualMFADeviceResponse::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 = CreateVirtualMFADeviceResponseDeserializer::deserialize(
"CreateVirtualMFADeviceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn deactivate_mfa_device(
&self,
input: DeactivateMFADeviceRequest,
) -> RusotoFuture<(), DeactivateMFADeviceError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeactivateMFADevice");
params.put("Version", "2010-05-08");
DeactivateMFADeviceRequestSerializer::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(DeactivateMFADeviceError::from_response(response))
}),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_access_key(
&self,
input: DeleteAccessKeyRequest,
) -> RusotoFuture<(), DeleteAccessKeyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteAccessKey");
params.put("Version", "2010-05-08");
DeleteAccessKeyRequestSerializer::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(DeleteAccessKeyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_account_alias(
&self,
input: DeleteAccountAliasRequest,
) -> RusotoFuture<(), DeleteAccountAliasError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteAccountAlias");
params.put("Version", "2010-05-08");
DeleteAccountAliasRequestSerializer::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(DeleteAccountAliasError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_account_password_policy(&self) -> RusotoFuture<(), DeleteAccountPasswordPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteAccountPasswordPolicy");
params.put("Version", "2010-05-08");
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(DeleteAccountPasswordPolicyError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_group(&self, input: DeleteGroupRequest) -> RusotoFuture<(), DeleteGroupError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteGroup");
params.put("Version", "2010-05-08");
DeleteGroupRequestSerializer::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(DeleteGroupError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_group_policy(
&self,
input: DeleteGroupPolicyRequest,
) -> RusotoFuture<(), DeleteGroupPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteGroupPolicy");
params.put("Version", "2010-05-08");
DeleteGroupPolicyRequestSerializer::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(DeleteGroupPolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_instance_profile(
&self,
input: DeleteInstanceProfileRequest,
) -> RusotoFuture<(), DeleteInstanceProfileError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteInstanceProfile");
params.put("Version", "2010-05-08");
DeleteInstanceProfileRequestSerializer::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(DeleteInstanceProfileError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_login_profile(
&self,
input: DeleteLoginProfileRequest,
) -> RusotoFuture<(), DeleteLoginProfileError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteLoginProfile");
params.put("Version", "2010-05-08");
DeleteLoginProfileRequestSerializer::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(DeleteLoginProfileError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_open_id_connect_provider(
&self,
input: DeleteOpenIDConnectProviderRequest,
) -> RusotoFuture<(), DeleteOpenIDConnectProviderError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteOpenIDConnectProvider");
params.put("Version", "2010-05-08");
DeleteOpenIDConnectProviderRequestSerializer::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(DeleteOpenIDConnectProviderError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_policy(&self, input: DeletePolicyRequest) -> RusotoFuture<(), DeletePolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeletePolicy");
params.put("Version", "2010-05-08");
DeletePolicyRequestSerializer::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(DeletePolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_policy_version(
&self,
input: DeletePolicyVersionRequest,
) -> RusotoFuture<(), DeletePolicyVersionError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeletePolicyVersion");
params.put("Version", "2010-05-08");
DeletePolicyVersionRequestSerializer::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(DeletePolicyVersionError::from_response(response))
}),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_role(&self, input: DeleteRoleRequest) -> RusotoFuture<(), DeleteRoleError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteRole");
params.put("Version", "2010-05-08");
DeleteRoleRequestSerializer::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(DeleteRoleError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_role_permissions_boundary(
&self,
input: DeleteRolePermissionsBoundaryRequest,
) -> RusotoFuture<(), DeleteRolePermissionsBoundaryError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteRolePermissionsBoundary");
params.put("Version", "2010-05-08");
DeleteRolePermissionsBoundaryRequestSerializer::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(DeleteRolePermissionsBoundaryError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_role_policy(
&self,
input: DeleteRolePolicyRequest,
) -> RusotoFuture<(), DeleteRolePolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteRolePolicy");
params.put("Version", "2010-05-08");
DeleteRolePolicyRequestSerializer::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(DeleteRolePolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_saml_provider(
&self,
input: DeleteSAMLProviderRequest,
) -> RusotoFuture<(), DeleteSAMLProviderError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteSAMLProvider");
params.put("Version", "2010-05-08");
DeleteSAMLProviderRequestSerializer::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(DeleteSAMLProviderError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_ssh_public_key(
&self,
input: DeleteSSHPublicKeyRequest,
) -> RusotoFuture<(), DeleteSSHPublicKeyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteSSHPublicKey");
params.put("Version", "2010-05-08");
DeleteSSHPublicKeyRequestSerializer::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(DeleteSSHPublicKeyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_server_certificate(
&self,
input: DeleteServerCertificateRequest,
) -> RusotoFuture<(), DeleteServerCertificateError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteServerCertificate");
params.put("Version", "2010-05-08");
DeleteServerCertificateRequestSerializer::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(DeleteServerCertificateError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_service_linked_role(
&self,
input: DeleteServiceLinkedRoleRequest,
) -> RusotoFuture<DeleteServiceLinkedRoleResponse, DeleteServiceLinkedRoleError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteServiceLinkedRole");
params.put("Version", "2010-05-08");
DeleteServiceLinkedRoleRequestSerializer::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(DeleteServiceLinkedRoleError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteServiceLinkedRoleResponse::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 = DeleteServiceLinkedRoleResponseDeserializer::deserialize(
"DeleteServiceLinkedRoleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_service_specific_credential(
&self,
input: DeleteServiceSpecificCredentialRequest,
) -> RusotoFuture<(), DeleteServiceSpecificCredentialError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteServiceSpecificCredential");
params.put("Version", "2010-05-08");
DeleteServiceSpecificCredentialRequestSerializer::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(DeleteServiceSpecificCredentialError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_signing_certificate(
&self,
input: DeleteSigningCertificateRequest,
) -> RusotoFuture<(), DeleteSigningCertificateError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteSigningCertificate");
params.put("Version", "2010-05-08");
DeleteSigningCertificateRequestSerializer::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(DeleteSigningCertificateError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_user(&self, input: DeleteUserRequest) -> RusotoFuture<(), DeleteUserError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteUser");
params.put("Version", "2010-05-08");
DeleteUserRequestSerializer::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(DeleteUserError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_user_permissions_boundary(
&self,
input: DeleteUserPermissionsBoundaryRequest,
) -> RusotoFuture<(), DeleteUserPermissionsBoundaryError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteUserPermissionsBoundary");
params.put("Version", "2010-05-08");
DeleteUserPermissionsBoundaryRequestSerializer::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(DeleteUserPermissionsBoundaryError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_user_policy(
&self,
input: DeleteUserPolicyRequest,
) -> RusotoFuture<(), DeleteUserPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteUserPolicy");
params.put("Version", "2010-05-08");
DeleteUserPolicyRequestSerializer::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(DeleteUserPolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_virtual_mfa_device(
&self,
input: DeleteVirtualMFADeviceRequest,
) -> RusotoFuture<(), DeleteVirtualMFADeviceError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteVirtualMFADevice");
params.put("Version", "2010-05-08");
DeleteVirtualMFADeviceRequestSerializer::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(DeleteVirtualMFADeviceError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn detach_group_policy(
&self,
input: DetachGroupPolicyRequest,
) -> RusotoFuture<(), DetachGroupPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DetachGroupPolicy");
params.put("Version", "2010-05-08");
DetachGroupPolicyRequestSerializer::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(DetachGroupPolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn detach_role_policy(
&self,
input: DetachRolePolicyRequest,
) -> RusotoFuture<(), DetachRolePolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DetachRolePolicy");
params.put("Version", "2010-05-08");
DetachRolePolicyRequestSerializer::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(DetachRolePolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn detach_user_policy(
&self,
input: DetachUserPolicyRequest,
) -> RusotoFuture<(), DetachUserPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DetachUserPolicy");
params.put("Version", "2010-05-08");
DetachUserPolicyRequestSerializer::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(DetachUserPolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn enable_mfa_device(
&self,
input: EnableMFADeviceRequest,
) -> RusotoFuture<(), EnableMFADeviceError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "EnableMFADevice");
params.put("Version", "2010-05-08");
EnableMFADeviceRequestSerializer::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(EnableMFADeviceError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn generate_credential_report(
&self,
) -> RusotoFuture<GenerateCredentialReportResponse, GenerateCredentialReportError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GenerateCredentialReport");
params.put("Version", "2010-05-08");
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(GenerateCredentialReportError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GenerateCredentialReportResponse::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 = GenerateCredentialReportResponseDeserializer::deserialize(
"GenerateCredentialReportResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn generate_service_last_accessed_details(
&self,
input: GenerateServiceLastAccessedDetailsRequest,
) -> RusotoFuture<
GenerateServiceLastAccessedDetailsResponse,
GenerateServiceLastAccessedDetailsError,
> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GenerateServiceLastAccessedDetails");
params.put("Version", "2010-05-08");
GenerateServiceLastAccessedDetailsRequestSerializer::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(GenerateServiceLastAccessedDetailsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GenerateServiceLastAccessedDetailsResponse::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 = GenerateServiceLastAccessedDetailsResponseDeserializer::deserialize(
"GenerateServiceLastAccessedDetailsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_access_key_last_used(
&self,
input: GetAccessKeyLastUsedRequest,
) -> RusotoFuture<GetAccessKeyLastUsedResponse, GetAccessKeyLastUsedError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetAccessKeyLastUsed");
params.put("Version", "2010-05-08");
GetAccessKeyLastUsedRequestSerializer::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(GetAccessKeyLastUsedError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetAccessKeyLastUsedResponse::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 = GetAccessKeyLastUsedResponseDeserializer::deserialize(
"GetAccessKeyLastUsedResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_account_authorization_details(
&self,
input: GetAccountAuthorizationDetailsRequest,
) -> RusotoFuture<GetAccountAuthorizationDetailsResponse, GetAccountAuthorizationDetailsError>
{
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetAccountAuthorizationDetails");
params.put("Version", "2010-05-08");
GetAccountAuthorizationDetailsRequestSerializer::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(GetAccountAuthorizationDetailsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetAccountAuthorizationDetailsResponse::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 = GetAccountAuthorizationDetailsResponseDeserializer::deserialize(
"GetAccountAuthorizationDetailsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_account_password_policy(
&self,
) -> RusotoFuture<GetAccountPasswordPolicyResponse, GetAccountPasswordPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetAccountPasswordPolicy");
params.put("Version", "2010-05-08");
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(GetAccountPasswordPolicyError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetAccountPasswordPolicyResponse::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 = GetAccountPasswordPolicyResponseDeserializer::deserialize(
"GetAccountPasswordPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_account_summary(
&self,
) -> RusotoFuture<GetAccountSummaryResponse, GetAccountSummaryError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetAccountSummary");
params.put("Version", "2010-05-08");
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(GetAccountSummaryError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetAccountSummaryResponse::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 = GetAccountSummaryResponseDeserializer::deserialize(
"GetAccountSummaryResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_context_keys_for_custom_policy(
&self,
input: GetContextKeysForCustomPolicyRequest,
) -> RusotoFuture<GetContextKeysForPolicyResponse, GetContextKeysForCustomPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetContextKeysForCustomPolicy");
params.put("Version", "2010-05-08");
GetContextKeysForCustomPolicyRequestSerializer::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(GetContextKeysForCustomPolicyError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetContextKeysForPolicyResponse::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 = GetContextKeysForPolicyResponseDeserializer::deserialize(
"GetContextKeysForCustomPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_context_keys_for_principal_policy(
&self,
input: GetContextKeysForPrincipalPolicyRequest,
) -> RusotoFuture<GetContextKeysForPolicyResponse, GetContextKeysForPrincipalPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetContextKeysForPrincipalPolicy");
params.put("Version", "2010-05-08");
GetContextKeysForPrincipalPolicyRequestSerializer::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(GetContextKeysForPrincipalPolicyError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetContextKeysForPolicyResponse::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 = GetContextKeysForPolicyResponseDeserializer::deserialize(
"GetContextKeysForPrincipalPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_credential_report(
&self,
) -> RusotoFuture<GetCredentialReportResponse, GetCredentialReportError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetCredentialReport");
params.put("Version", "2010-05-08");
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(GetCredentialReportError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetCredentialReportResponse::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 = GetCredentialReportResponseDeserializer::deserialize(
"GetCredentialReportResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_group(&self, input: GetGroupRequest) -> RusotoFuture<GetGroupResponse, GetGroupError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetGroup");
params.put("Version", "2010-05-08");
GetGroupRequestSerializer::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(GetGroupError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetGroupResponse::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 =
GetGroupResponseDeserializer::deserialize("GetGroupResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_group_policy(
&self,
input: GetGroupPolicyRequest,
) -> RusotoFuture<GetGroupPolicyResponse, GetGroupPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetGroupPolicy");
params.put("Version", "2010-05-08");
GetGroupPolicyRequestSerializer::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(GetGroupPolicyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetGroupPolicyResponse::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 = GetGroupPolicyResponseDeserializer::deserialize(
"GetGroupPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_instance_profile(
&self,
input: GetInstanceProfileRequest,
) -> RusotoFuture<GetInstanceProfileResponse, GetInstanceProfileError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetInstanceProfile");
params.put("Version", "2010-05-08");
GetInstanceProfileRequestSerializer::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(GetInstanceProfileError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetInstanceProfileResponse::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 = GetInstanceProfileResponseDeserializer::deserialize(
"GetInstanceProfileResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_login_profile(
&self,
input: GetLoginProfileRequest,
) -> RusotoFuture<GetLoginProfileResponse, GetLoginProfileError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetLoginProfile");
params.put("Version", "2010-05-08");
GetLoginProfileRequestSerializer::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(GetLoginProfileError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetLoginProfileResponse::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 = GetLoginProfileResponseDeserializer::deserialize(
"GetLoginProfileResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_open_id_connect_provider(
&self,
input: GetOpenIDConnectProviderRequest,
) -> RusotoFuture<GetOpenIDConnectProviderResponse, GetOpenIDConnectProviderError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetOpenIDConnectProvider");
params.put("Version", "2010-05-08");
GetOpenIDConnectProviderRequestSerializer::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(GetOpenIDConnectProviderError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetOpenIDConnectProviderResponse::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 = GetOpenIDConnectProviderResponseDeserializer::deserialize(
"GetOpenIDConnectProviderResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_policy(
&self,
input: GetPolicyRequest,
) -> RusotoFuture<GetPolicyResponse, GetPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetPolicy");
params.put("Version", "2010-05-08");
GetPolicyRequestSerializer::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(GetPolicyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetPolicyResponse::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 =
GetPolicyResponseDeserializer::deserialize("GetPolicyResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_policy_version(
&self,
input: GetPolicyVersionRequest,
) -> RusotoFuture<GetPolicyVersionResponse, GetPolicyVersionError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetPolicyVersion");
params.put("Version", "2010-05-08");
GetPolicyVersionRequestSerializer::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(GetPolicyVersionError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetPolicyVersionResponse::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 = GetPolicyVersionResponseDeserializer::deserialize(
"GetPolicyVersionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_role(&self, input: GetRoleRequest) -> RusotoFuture<GetRoleResponse, GetRoleError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetRole");
params.put("Version", "2010-05-08");
GetRoleRequestSerializer::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(GetRoleError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetRoleResponse::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 = GetRoleResponseDeserializer::deserialize("GetRoleResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_role_policy(
&self,
input: GetRolePolicyRequest,
) -> RusotoFuture<GetRolePolicyResponse, GetRolePolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetRolePolicy");
params.put("Version", "2010-05-08");
GetRolePolicyRequestSerializer::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(GetRolePolicyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetRolePolicyResponse::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 = GetRolePolicyResponseDeserializer::deserialize(
"GetRolePolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_saml_provider(
&self,
input: GetSAMLProviderRequest,
) -> RusotoFuture<GetSAMLProviderResponse, GetSAMLProviderError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetSAMLProvider");
params.put("Version", "2010-05-08");
GetSAMLProviderRequestSerializer::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(GetSAMLProviderError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetSAMLProviderResponse::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 = GetSAMLProviderResponseDeserializer::deserialize(
"GetSAMLProviderResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_ssh_public_key(
&self,
input: GetSSHPublicKeyRequest,
) -> RusotoFuture<GetSSHPublicKeyResponse, GetSSHPublicKeyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetSSHPublicKey");
params.put("Version", "2010-05-08");
GetSSHPublicKeyRequestSerializer::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(GetSSHPublicKeyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetSSHPublicKeyResponse::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 = GetSSHPublicKeyResponseDeserializer::deserialize(
"GetSSHPublicKeyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_server_certificate(
&self,
input: GetServerCertificateRequest,
) -> RusotoFuture<GetServerCertificateResponse, GetServerCertificateError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetServerCertificate");
params.put("Version", "2010-05-08");
GetServerCertificateRequestSerializer::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(GetServerCertificateError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetServerCertificateResponse::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 = GetServerCertificateResponseDeserializer::deserialize(
"GetServerCertificateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_service_last_accessed_details(
&self,
input: GetServiceLastAccessedDetailsRequest,
) -> RusotoFuture<GetServiceLastAccessedDetailsResponse, GetServiceLastAccessedDetailsError>
{
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetServiceLastAccessedDetails");
params.put("Version", "2010-05-08");
GetServiceLastAccessedDetailsRequestSerializer::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(GetServiceLastAccessedDetailsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetServiceLastAccessedDetailsResponse::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 = GetServiceLastAccessedDetailsResponseDeserializer::deserialize(
"GetServiceLastAccessedDetailsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_service_last_accessed_details_with_entities(
&self,
input: GetServiceLastAccessedDetailsWithEntitiesRequest,
) -> RusotoFuture<
GetServiceLastAccessedDetailsWithEntitiesResponse,
GetServiceLastAccessedDetailsWithEntitiesError,
> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetServiceLastAccessedDetailsWithEntities");
params.put("Version", "2010-05-08");
GetServiceLastAccessedDetailsWithEntitiesRequestSerializer::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(GetServiceLastAccessedDetailsWithEntitiesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetServiceLastAccessedDetailsWithEntitiesResponse::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 =
GetServiceLastAccessedDetailsWithEntitiesResponseDeserializer::deserialize(
"GetServiceLastAccessedDetailsWithEntitiesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_service_linked_role_deletion_status(
&self,
input: GetServiceLinkedRoleDeletionStatusRequest,
) -> RusotoFuture<
GetServiceLinkedRoleDeletionStatusResponse,
GetServiceLinkedRoleDeletionStatusError,
> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetServiceLinkedRoleDeletionStatus");
params.put("Version", "2010-05-08");
GetServiceLinkedRoleDeletionStatusRequestSerializer::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(GetServiceLinkedRoleDeletionStatusError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetServiceLinkedRoleDeletionStatusResponse::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 = GetServiceLinkedRoleDeletionStatusResponseDeserializer::deserialize(
"GetServiceLinkedRoleDeletionStatusResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_user(&self, input: GetUserRequest) -> RusotoFuture<GetUserResponse, GetUserError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetUser");
params.put("Version", "2010-05-08");
GetUserRequestSerializer::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(GetUserError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetUserResponse::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 = GetUserResponseDeserializer::deserialize("GetUserResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_user_policy(
&self,
input: GetUserPolicyRequest,
) -> RusotoFuture<GetUserPolicyResponse, GetUserPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetUserPolicy");
params.put("Version", "2010-05-08");
GetUserPolicyRequestSerializer::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(GetUserPolicyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetUserPolicyResponse::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 = GetUserPolicyResponseDeserializer::deserialize(
"GetUserPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_access_keys(
&self,
input: ListAccessKeysRequest,
) -> RusotoFuture<ListAccessKeysResponse, ListAccessKeysError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListAccessKeys");
params.put("Version", "2010-05-08");
ListAccessKeysRequestSerializer::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(ListAccessKeysError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListAccessKeysResponse::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 = ListAccessKeysResponseDeserializer::deserialize(
"ListAccessKeysResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_account_aliases(
&self,
input: ListAccountAliasesRequest,
) -> RusotoFuture<ListAccountAliasesResponse, ListAccountAliasesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListAccountAliases");
params.put("Version", "2010-05-08");
ListAccountAliasesRequestSerializer::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(ListAccountAliasesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListAccountAliasesResponse::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 = ListAccountAliasesResponseDeserializer::deserialize(
"ListAccountAliasesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_attached_group_policies(
&self,
input: ListAttachedGroupPoliciesRequest,
) -> RusotoFuture<ListAttachedGroupPoliciesResponse, ListAttachedGroupPoliciesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListAttachedGroupPolicies");
params.put("Version", "2010-05-08");
ListAttachedGroupPoliciesRequestSerializer::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(ListAttachedGroupPoliciesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListAttachedGroupPoliciesResponse::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 = ListAttachedGroupPoliciesResponseDeserializer::deserialize(
"ListAttachedGroupPoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_attached_role_policies(
&self,
input: ListAttachedRolePoliciesRequest,
) -> RusotoFuture<ListAttachedRolePoliciesResponse, ListAttachedRolePoliciesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListAttachedRolePolicies");
params.put("Version", "2010-05-08");
ListAttachedRolePoliciesRequestSerializer::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(ListAttachedRolePoliciesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListAttachedRolePoliciesResponse::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 = ListAttachedRolePoliciesResponseDeserializer::deserialize(
"ListAttachedRolePoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_attached_user_policies(
&self,
input: ListAttachedUserPoliciesRequest,
) -> RusotoFuture<ListAttachedUserPoliciesResponse, ListAttachedUserPoliciesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListAttachedUserPolicies");
params.put("Version", "2010-05-08");
ListAttachedUserPoliciesRequestSerializer::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(ListAttachedUserPoliciesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListAttachedUserPoliciesResponse::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 = ListAttachedUserPoliciesResponseDeserializer::deserialize(
"ListAttachedUserPoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_entities_for_policy(
&self,
input: ListEntitiesForPolicyRequest,
) -> RusotoFuture<ListEntitiesForPolicyResponse, ListEntitiesForPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListEntitiesForPolicy");
params.put("Version", "2010-05-08");
ListEntitiesForPolicyRequestSerializer::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(ListEntitiesForPolicyError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListEntitiesForPolicyResponse::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 = ListEntitiesForPolicyResponseDeserializer::deserialize(
"ListEntitiesForPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_group_policies(
&self,
input: ListGroupPoliciesRequest,
) -> RusotoFuture<ListGroupPoliciesResponse, ListGroupPoliciesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListGroupPolicies");
params.put("Version", "2010-05-08");
ListGroupPoliciesRequestSerializer::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(ListGroupPoliciesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListGroupPoliciesResponse::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 = ListGroupPoliciesResponseDeserializer::deserialize(
"ListGroupPoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_groups(
&self,
input: ListGroupsRequest,
) -> RusotoFuture<ListGroupsResponse, ListGroupsError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListGroups");
params.put("Version", "2010-05-08");
ListGroupsRequestSerializer::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(ListGroupsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListGroupsResponse::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 = ListGroupsResponseDeserializer::deserialize(
"ListGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_groups_for_user(
&self,
input: ListGroupsForUserRequest,
) -> RusotoFuture<ListGroupsForUserResponse, ListGroupsForUserError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListGroupsForUser");
params.put("Version", "2010-05-08");
ListGroupsForUserRequestSerializer::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(ListGroupsForUserError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListGroupsForUserResponse::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 = ListGroupsForUserResponseDeserializer::deserialize(
"ListGroupsForUserResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_instance_profiles(
&self,
input: ListInstanceProfilesRequest,
) -> RusotoFuture<ListInstanceProfilesResponse, ListInstanceProfilesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListInstanceProfiles");
params.put("Version", "2010-05-08");
ListInstanceProfilesRequestSerializer::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(ListInstanceProfilesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListInstanceProfilesResponse::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 = ListInstanceProfilesResponseDeserializer::deserialize(
"ListInstanceProfilesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_instance_profiles_for_role(
&self,
input: ListInstanceProfilesForRoleRequest,
) -> RusotoFuture<ListInstanceProfilesForRoleResponse, ListInstanceProfilesForRoleError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListInstanceProfilesForRole");
params.put("Version", "2010-05-08");
ListInstanceProfilesForRoleRequestSerializer::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(ListInstanceProfilesForRoleError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListInstanceProfilesForRoleResponse::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 = ListInstanceProfilesForRoleResponseDeserializer::deserialize(
"ListInstanceProfilesForRoleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_mfa_devices(
&self,
input: ListMFADevicesRequest,
) -> RusotoFuture<ListMFADevicesResponse, ListMFADevicesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListMFADevices");
params.put("Version", "2010-05-08");
ListMFADevicesRequestSerializer::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(ListMFADevicesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListMFADevicesResponse::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 = ListMFADevicesResponseDeserializer::deserialize(
"ListMFADevicesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_open_id_connect_providers(
&self,
input: ListOpenIDConnectProvidersRequest,
) -> RusotoFuture<ListOpenIDConnectProvidersResponse, ListOpenIDConnectProvidersError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListOpenIDConnectProviders");
params.put("Version", "2010-05-08");
ListOpenIDConnectProvidersRequestSerializer::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(ListOpenIDConnectProvidersError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListOpenIDConnectProvidersResponse::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 = ListOpenIDConnectProvidersResponseDeserializer::deserialize(
"ListOpenIDConnectProvidersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_policies(
&self,
input: ListPoliciesRequest,
) -> RusotoFuture<ListPoliciesResponse, ListPoliciesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListPolicies");
params.put("Version", "2010-05-08");
ListPoliciesRequestSerializer::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(ListPoliciesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListPoliciesResponse::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 = ListPoliciesResponseDeserializer::deserialize(
"ListPoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_policies_granting_service_access(
&self,
input: ListPoliciesGrantingServiceAccessRequest,
) -> RusotoFuture<
ListPoliciesGrantingServiceAccessResponse,
ListPoliciesGrantingServiceAccessError,
> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListPoliciesGrantingServiceAccess");
params.put("Version", "2010-05-08");
ListPoliciesGrantingServiceAccessRequestSerializer::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(ListPoliciesGrantingServiceAccessError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListPoliciesGrantingServiceAccessResponse::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 = ListPoliciesGrantingServiceAccessResponseDeserializer::deserialize(
"ListPoliciesGrantingServiceAccessResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_policy_versions(
&self,
input: ListPolicyVersionsRequest,
) -> RusotoFuture<ListPolicyVersionsResponse, ListPolicyVersionsError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListPolicyVersions");
params.put("Version", "2010-05-08");
ListPolicyVersionsRequestSerializer::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(ListPolicyVersionsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListPolicyVersionsResponse::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 = ListPolicyVersionsResponseDeserializer::deserialize(
"ListPolicyVersionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_role_policies(
&self,
input: ListRolePoliciesRequest,
) -> RusotoFuture<ListRolePoliciesResponse, ListRolePoliciesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListRolePolicies");
params.put("Version", "2010-05-08");
ListRolePoliciesRequestSerializer::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(ListRolePoliciesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListRolePoliciesResponse::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 = ListRolePoliciesResponseDeserializer::deserialize(
"ListRolePoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_role_tags(
&self,
input: ListRoleTagsRequest,
) -> RusotoFuture<ListRoleTagsResponse, ListRoleTagsError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListRoleTags");
params.put("Version", "2010-05-08");
ListRoleTagsRequestSerializer::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(ListRoleTagsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListRoleTagsResponse::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 = ListRoleTagsResponseDeserializer::deserialize(
"ListRoleTagsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_roles(
&self,
input: ListRolesRequest,
) -> RusotoFuture<ListRolesResponse, ListRolesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListRoles");
params.put("Version", "2010-05-08");
ListRolesRequestSerializer::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(ListRolesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListRolesResponse::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 =
ListRolesResponseDeserializer::deserialize("ListRolesResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_saml_providers(
&self,
input: ListSAMLProvidersRequest,
) -> RusotoFuture<ListSAMLProvidersResponse, ListSAMLProvidersError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListSAMLProviders");
params.put("Version", "2010-05-08");
ListSAMLProvidersRequestSerializer::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(ListSAMLProvidersError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListSAMLProvidersResponse::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 = ListSAMLProvidersResponseDeserializer::deserialize(
"ListSAMLProvidersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_ssh_public_keys(
&self,
input: ListSSHPublicKeysRequest,
) -> RusotoFuture<ListSSHPublicKeysResponse, ListSSHPublicKeysError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListSSHPublicKeys");
params.put("Version", "2010-05-08");
ListSSHPublicKeysRequestSerializer::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(ListSSHPublicKeysError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListSSHPublicKeysResponse::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 = ListSSHPublicKeysResponseDeserializer::deserialize(
"ListSSHPublicKeysResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_server_certificates(
&self,
input: ListServerCertificatesRequest,
) -> RusotoFuture<ListServerCertificatesResponse, ListServerCertificatesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListServerCertificates");
params.put("Version", "2010-05-08");
ListServerCertificatesRequestSerializer::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(ListServerCertificatesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListServerCertificatesResponse::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 = ListServerCertificatesResponseDeserializer::deserialize(
"ListServerCertificatesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_service_specific_credentials(
&self,
input: ListServiceSpecificCredentialsRequest,
) -> RusotoFuture<ListServiceSpecificCredentialsResponse, ListServiceSpecificCredentialsError>
{
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListServiceSpecificCredentials");
params.put("Version", "2010-05-08");
ListServiceSpecificCredentialsRequestSerializer::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(ListServiceSpecificCredentialsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListServiceSpecificCredentialsResponse::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 = ListServiceSpecificCredentialsResponseDeserializer::deserialize(
"ListServiceSpecificCredentialsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_signing_certificates(
&self,
input: ListSigningCertificatesRequest,
) -> RusotoFuture<ListSigningCertificatesResponse, ListSigningCertificatesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListSigningCertificates");
params.put("Version", "2010-05-08");
ListSigningCertificatesRequestSerializer::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(ListSigningCertificatesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListSigningCertificatesResponse::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 = ListSigningCertificatesResponseDeserializer::deserialize(
"ListSigningCertificatesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_user_policies(
&self,
input: ListUserPoliciesRequest,
) -> RusotoFuture<ListUserPoliciesResponse, ListUserPoliciesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListUserPolicies");
params.put("Version", "2010-05-08");
ListUserPoliciesRequestSerializer::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(ListUserPoliciesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListUserPoliciesResponse::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 = ListUserPoliciesResponseDeserializer::deserialize(
"ListUserPoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_user_tags(
&self,
input: ListUserTagsRequest,
) -> RusotoFuture<ListUserTagsResponse, ListUserTagsError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListUserTags");
params.put("Version", "2010-05-08");
ListUserTagsRequestSerializer::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(ListUserTagsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListUserTagsResponse::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 = ListUserTagsResponseDeserializer::deserialize(
"ListUserTagsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_users(
&self,
input: ListUsersRequest,
) -> RusotoFuture<ListUsersResponse, ListUsersError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListUsers");
params.put("Version", "2010-05-08");
ListUsersRequestSerializer::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(ListUsersError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListUsersResponse::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 =
ListUsersResponseDeserializer::deserialize("ListUsersResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_virtual_mfa_devices(
&self,
input: ListVirtualMFADevicesRequest,
) -> RusotoFuture<ListVirtualMFADevicesResponse, ListVirtualMFADevicesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListVirtualMFADevices");
params.put("Version", "2010-05-08");
ListVirtualMFADevicesRequestSerializer::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(ListVirtualMFADevicesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListVirtualMFADevicesResponse::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 = ListVirtualMFADevicesResponseDeserializer::deserialize(
"ListVirtualMFADevicesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn put_group_policy(
&self,
input: PutGroupPolicyRequest,
) -> RusotoFuture<(), PutGroupPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PutGroupPolicy");
params.put("Version", "2010-05-08");
PutGroupPolicyRequestSerializer::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(PutGroupPolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn put_role_permissions_boundary(
&self,
input: PutRolePermissionsBoundaryRequest,
) -> RusotoFuture<(), PutRolePermissionsBoundaryError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PutRolePermissionsBoundary");
params.put("Version", "2010-05-08");
PutRolePermissionsBoundaryRequestSerializer::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(PutRolePermissionsBoundaryError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn put_role_policy(&self, input: PutRolePolicyRequest) -> RusotoFuture<(), PutRolePolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PutRolePolicy");
params.put("Version", "2010-05-08");
PutRolePolicyRequestSerializer::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(PutRolePolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn put_user_permissions_boundary(
&self,
input: PutUserPermissionsBoundaryRequest,
) -> RusotoFuture<(), PutUserPermissionsBoundaryError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PutUserPermissionsBoundary");
params.put("Version", "2010-05-08");
PutUserPermissionsBoundaryRequestSerializer::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(PutUserPermissionsBoundaryError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn put_user_policy(&self, input: PutUserPolicyRequest) -> RusotoFuture<(), PutUserPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PutUserPolicy");
params.put("Version", "2010-05-08");
PutUserPolicyRequestSerializer::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(PutUserPolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn remove_client_id_from_open_id_connect_provider(
&self,
input: RemoveClientIDFromOpenIDConnectProviderRequest,
) -> RusotoFuture<(), RemoveClientIDFromOpenIDConnectProviderError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveClientIDFromOpenIDConnectProvider");
params.put("Version", "2010-05-08");
RemoveClientIDFromOpenIDConnectProviderRequestSerializer::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(RemoveClientIDFromOpenIDConnectProviderError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn remove_role_from_instance_profile(
&self,
input: RemoveRoleFromInstanceProfileRequest,
) -> RusotoFuture<(), RemoveRoleFromInstanceProfileError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveRoleFromInstanceProfile");
params.put("Version", "2010-05-08");
RemoveRoleFromInstanceProfileRequestSerializer::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(RemoveRoleFromInstanceProfileError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn remove_user_from_group(
&self,
input: RemoveUserFromGroupRequest,
) -> RusotoFuture<(), RemoveUserFromGroupError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveUserFromGroup");
params.put("Version", "2010-05-08");
RemoveUserFromGroupRequestSerializer::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(RemoveUserFromGroupError::from_response(response))
}),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn reset_service_specific_credential(
&self,
input: ResetServiceSpecificCredentialRequest,
) -> RusotoFuture<ResetServiceSpecificCredentialResponse, ResetServiceSpecificCredentialError>
{
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ResetServiceSpecificCredential");
params.put("Version", "2010-05-08");
ResetServiceSpecificCredentialRequestSerializer::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(ResetServiceSpecificCredentialError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ResetServiceSpecificCredentialResponse::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 = ResetServiceSpecificCredentialResponseDeserializer::deserialize(
"ResetServiceSpecificCredentialResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn resync_mfa_device(
&self,
input: ResyncMFADeviceRequest,
) -> RusotoFuture<(), ResyncMFADeviceError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ResyncMFADevice");
params.put("Version", "2010-05-08");
ResyncMFADeviceRequestSerializer::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(ResyncMFADeviceError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn set_default_policy_version(
&self,
input: SetDefaultPolicyVersionRequest,
) -> RusotoFuture<(), SetDefaultPolicyVersionError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetDefaultPolicyVersion");
params.put("Version", "2010-05-08");
SetDefaultPolicyVersionRequestSerializer::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(SetDefaultPolicyVersionError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn set_security_token_service_preferences(
&self,
input: SetSecurityTokenServicePreferencesRequest,
) -> RusotoFuture<(), SetSecurityTokenServicePreferencesError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetSecurityTokenServicePreferences");
params.put("Version", "2010-05-08");
SetSecurityTokenServicePreferencesRequestSerializer::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(SetSecurityTokenServicePreferencesError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn simulate_custom_policy(
&self,
input: SimulateCustomPolicyRequest,
) -> RusotoFuture<SimulatePolicyResponse, SimulateCustomPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SimulateCustomPolicy");
params.put("Version", "2010-05-08");
SimulateCustomPolicyRequestSerializer::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(SimulateCustomPolicyError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SimulatePolicyResponse::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 = SimulatePolicyResponseDeserializer::deserialize(
"SimulateCustomPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn simulate_principal_policy(
&self,
input: SimulatePrincipalPolicyRequest,
) -> RusotoFuture<SimulatePolicyResponse, SimulatePrincipalPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SimulatePrincipalPolicy");
params.put("Version", "2010-05-08");
SimulatePrincipalPolicyRequestSerializer::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(SimulatePrincipalPolicyError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SimulatePolicyResponse::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 = SimulatePolicyResponseDeserializer::deserialize(
"SimulatePrincipalPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn tag_role(&self, input: TagRoleRequest) -> RusotoFuture<(), TagRoleError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "TagRole");
params.put("Version", "2010-05-08");
TagRoleRequestSerializer::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(TagRoleError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn tag_user(&self, input: TagUserRequest) -> RusotoFuture<(), TagUserError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "TagUser");
params.put("Version", "2010-05-08");
TagUserRequestSerializer::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(TagUserError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn untag_role(&self, input: UntagRoleRequest) -> RusotoFuture<(), UntagRoleError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UntagRole");
params.put("Version", "2010-05-08");
UntagRoleRequestSerializer::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(UntagRoleError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn untag_user(&self, input: UntagUserRequest) -> RusotoFuture<(), UntagUserError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UntagUser");
params.put("Version", "2010-05-08");
UntagUserRequestSerializer::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(UntagUserError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_access_key(
&self,
input: UpdateAccessKeyRequest,
) -> RusotoFuture<(), UpdateAccessKeyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateAccessKey");
params.put("Version", "2010-05-08");
UpdateAccessKeyRequestSerializer::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(UpdateAccessKeyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_account_password_policy(
&self,
input: UpdateAccountPasswordPolicyRequest,
) -> RusotoFuture<(), UpdateAccountPasswordPolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateAccountPasswordPolicy");
params.put("Version", "2010-05-08");
UpdateAccountPasswordPolicyRequestSerializer::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(UpdateAccountPasswordPolicyError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_assume_role_policy(
&self,
input: UpdateAssumeRolePolicyRequest,
) -> RusotoFuture<(), UpdateAssumeRolePolicyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateAssumeRolePolicy");
params.put("Version", "2010-05-08");
UpdateAssumeRolePolicyRequestSerializer::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(UpdateAssumeRolePolicyError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_group(&self, input: UpdateGroupRequest) -> RusotoFuture<(), UpdateGroupError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateGroup");
params.put("Version", "2010-05-08");
UpdateGroupRequestSerializer::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(UpdateGroupError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_login_profile(
&self,
input: UpdateLoginProfileRequest,
) -> RusotoFuture<(), UpdateLoginProfileError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateLoginProfile");
params.put("Version", "2010-05-08");
UpdateLoginProfileRequestSerializer::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(UpdateLoginProfileError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_open_id_connect_provider_thumbprint(
&self,
input: UpdateOpenIDConnectProviderThumbprintRequest,
) -> RusotoFuture<(), UpdateOpenIDConnectProviderThumbprintError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateOpenIDConnectProviderThumbprint");
params.put("Version", "2010-05-08");
UpdateOpenIDConnectProviderThumbprintRequestSerializer::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(UpdateOpenIDConnectProviderThumbprintError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_role(
&self,
input: UpdateRoleRequest,
) -> RusotoFuture<UpdateRoleResponse, UpdateRoleError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateRole");
params.put("Version", "2010-05-08");
UpdateRoleRequestSerializer::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(UpdateRoleError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateRoleResponse::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 = UpdateRoleResponseDeserializer::deserialize(
"UpdateRoleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_role_description(
&self,
input: UpdateRoleDescriptionRequest,
) -> RusotoFuture<UpdateRoleDescriptionResponse, UpdateRoleDescriptionError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateRoleDescription");
params.put("Version", "2010-05-08");
UpdateRoleDescriptionRequestSerializer::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(UpdateRoleDescriptionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateRoleDescriptionResponse::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 = UpdateRoleDescriptionResponseDeserializer::deserialize(
"UpdateRoleDescriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_saml_provider(
&self,
input: UpdateSAMLProviderRequest,
) -> RusotoFuture<UpdateSAMLProviderResponse, UpdateSAMLProviderError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateSAMLProvider");
params.put("Version", "2010-05-08");
UpdateSAMLProviderRequestSerializer::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(UpdateSAMLProviderError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateSAMLProviderResponse::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 = UpdateSAMLProviderResponseDeserializer::deserialize(
"UpdateSAMLProviderResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_ssh_public_key(
&self,
input: UpdateSSHPublicKeyRequest,
) -> RusotoFuture<(), UpdateSSHPublicKeyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateSSHPublicKey");
params.put("Version", "2010-05-08");
UpdateSSHPublicKeyRequestSerializer::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(UpdateSSHPublicKeyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_server_certificate(
&self,
input: UpdateServerCertificateRequest,
) -> RusotoFuture<(), UpdateServerCertificateError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateServerCertificate");
params.put("Version", "2010-05-08");
UpdateServerCertificateRequestSerializer::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(UpdateServerCertificateError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_service_specific_credential(
&self,
input: UpdateServiceSpecificCredentialRequest,
) -> RusotoFuture<(), UpdateServiceSpecificCredentialError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateServiceSpecificCredential");
params.put("Version", "2010-05-08");
UpdateServiceSpecificCredentialRequestSerializer::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(UpdateServiceSpecificCredentialError::from_response(
response,
))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_signing_certificate(
&self,
input: UpdateSigningCertificateRequest,
) -> RusotoFuture<(), UpdateSigningCertificateError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateSigningCertificate");
params.put("Version", "2010-05-08");
UpdateSigningCertificateRequestSerializer::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(UpdateSigningCertificateError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn update_user(&self, input: UpdateUserRequest) -> RusotoFuture<(), UpdateUserError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateUser");
params.put("Version", "2010-05-08");
UpdateUserRequestSerializer::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(UpdateUserError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn upload_ssh_public_key(
&self,
input: UploadSSHPublicKeyRequest,
) -> RusotoFuture<UploadSSHPublicKeyResponse, UploadSSHPublicKeyError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UploadSSHPublicKey");
params.put("Version", "2010-05-08");
UploadSSHPublicKeyRequestSerializer::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(UploadSSHPublicKeyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UploadSSHPublicKeyResponse::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 = UploadSSHPublicKeyResponseDeserializer::deserialize(
"UploadSSHPublicKeyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn upload_server_certificate(
&self,
input: UploadServerCertificateRequest,
) -> RusotoFuture<UploadServerCertificateResponse, UploadServerCertificateError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UploadServerCertificate");
params.put("Version", "2010-05-08");
UploadServerCertificateRequestSerializer::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(UploadServerCertificateError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UploadServerCertificateResponse::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 = UploadServerCertificateResponseDeserializer::deserialize(
"UploadServerCertificateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn upload_signing_certificate(
&self,
input: UploadSigningCertificateRequest,
) -> RusotoFuture<UploadSigningCertificateResponse, UploadSigningCertificateError> {
let mut request = SignedRequest::new("POST", "iam", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UploadSigningCertificate");
params.put("Version", "2010-05-08");
UploadSigningCertificateRequestSerializer::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(UploadSigningCertificateError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UploadSigningCertificateResponse::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 = UploadSigningCertificateResponseDeserializer::deserialize(
"UploadSigningCertificateResult",
&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_iam_get_user() {
let mock_response =
MockResponseReader::read_response("test_resources/generated/error", "iam-get-user.xml");
let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = GetUserRequest::default();
let result = client.get_user(request).sync();
assert!(!result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_create_virtual_mfa_device() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-create-virtual-mfa-device.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateVirtualMFADeviceRequest::default();
let result = client.create_virtual_mfa_device(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_get_account_summary() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-get-account-summary.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let result = client.get_account_summary().sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_get_group() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-get-group.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = GetGroupRequest::default();
let result = client.get_group(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_get_user_policy() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-get-user-policy.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = GetUserPolicyRequest::default();
let result = client.get_user_policy(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_get_user() {
let mock_response =
MockResponseReader::read_response("test_resources/generated/valid", "iam-get-user.xml");
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = GetUserRequest::default();
let result = client.get_user(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_access_keys() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-access-keys.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListAccessKeysRequest::default();
let result = client.list_access_keys(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_account_aliases() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-account-aliases.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListAccountAliasesRequest::default();
let result = client.list_account_aliases(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_groups() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-groups.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListGroupsRequest::default();
let result = client.list_groups(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_instance_profiles() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-instance-profiles.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListInstanceProfilesRequest::default();
let result = client.list_instance_profiles(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_mfa_devices() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-mfa-devices.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListMFADevicesRequest::default();
let result = client.list_mfa_devices(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_roles() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-roles.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListRolesRequest::default();
let result = client.list_roles(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_server_certificates() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-server-certificates.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListServerCertificatesRequest::default();
let result = client.list_server_certificates(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_signing_certificates() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-signing-certificates.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListSigningCertificatesRequest::default();
let result = client.list_signing_certificates(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_users() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-users.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListUsersRequest::default();
let result = client.list_users(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_iam_list_virtual_mfa_devices() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"iam-list-virtual-mfa-devices.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = IamClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListVirtualMFADevicesRequest::default();
let result = client.list_virtual_mfa_devices(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
}