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::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AccountTakeoverActionType {
#[serde(rename = "EventAction")]
pub event_action: String,
#[serde(rename = "Notify")]
pub notify: bool,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AccountTakeoverActionsType {
#[serde(rename = "HighAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub high_action: Option<AccountTakeoverActionType>,
#[serde(rename = "LowAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub low_action: Option<AccountTakeoverActionType>,
#[serde(rename = "MediumAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub medium_action: Option<AccountTakeoverActionType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AccountTakeoverRiskConfigurationType {
#[serde(rename = "Actions")]
pub actions: AccountTakeoverActionsType,
#[serde(rename = "NotifyConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notify_configuration: Option<NotifyConfigurationType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddCustomAttributesRequest {
#[serde(rename = "CustomAttributes")]
pub custom_attributes: Vec<SchemaAttributeType>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddCustomAttributesResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminAddUserToGroupRequest {
#[serde(rename = "GroupName")]
pub group_name: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminConfirmSignUpRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminConfirmSignUpResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AdminCreateUserConfigType {
#[serde(rename = "AllowAdminCreateUserOnly")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_admin_create_user_only: Option<bool>,
#[serde(rename = "InviteMessageTemplate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invite_message_template: Option<MessageTemplateType>,
#[serde(rename = "UnusedAccountValidityDays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unused_account_validity_days: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminCreateUserRequest {
#[serde(rename = "DesiredDeliveryMediums")]
#[serde(skip_serializing_if = "Option::is_none")]
pub desired_delivery_mediums: Option<Vec<String>>,
#[serde(rename = "ForceAliasCreation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_alias_creation: Option<bool>,
#[serde(rename = "MessageAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message_action: Option<String>,
#[serde(rename = "TemporaryPassword")]
#[serde(skip_serializing_if = "Option::is_none")]
pub temporary_password: Option<String>,
#[serde(rename = "UserAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_attributes: Option<Vec<AttributeType>>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
#[serde(rename = "ValidationData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validation_data: Option<Vec<AttributeType>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminCreateUserResponse {
#[serde(rename = "User")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<UserType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminDeleteUserAttributesRequest {
#[serde(rename = "UserAttributeNames")]
pub user_attribute_names: Vec<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminDeleteUserAttributesResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminDeleteUserRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminDisableProviderForUserRequest {
#[serde(rename = "User")]
pub user: ProviderUserIdentifierType,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminDisableProviderForUserResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminDisableUserRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminDisableUserResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminEnableUserRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminEnableUserResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminForgetDeviceRequest {
#[serde(rename = "DeviceKey")]
pub device_key: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminGetDeviceRequest {
#[serde(rename = "DeviceKey")]
pub device_key: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminGetDeviceResponse {
#[serde(rename = "Device")]
pub device: DeviceType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminGetUserRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminGetUserResponse {
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "MFAOptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_options: Option<Vec<MFAOptionType>>,
#[serde(rename = "PreferredMfaSetting")]
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_mfa_setting: Option<String>,
#[serde(rename = "UserAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_attributes: Option<Vec<AttributeType>>,
#[serde(rename = "UserCreateDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_create_date: Option<f64>,
#[serde(rename = "UserLastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_last_modified_date: Option<f64>,
#[serde(rename = "UserMFASettingList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_mfa_setting_list: Option<Vec<String>>,
#[serde(rename = "UserStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_status: Option<String>,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminInitiateAuthRequest {
#[serde(rename = "AnalyticsMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_metadata: Option<AnalyticsMetadataType>,
#[serde(rename = "AuthFlow")]
pub auth_flow: String,
#[serde(rename = "AuthParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "ClientMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_metadata: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "ContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub context_data: Option<ContextDataType>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminInitiateAuthResponse {
#[serde(rename = "AuthenticationResult")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_result: Option<AuthenticationResultType>,
#[serde(rename = "ChallengeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_name: Option<String>,
#[serde(rename = "ChallengeParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminLinkProviderForUserRequest {
#[serde(rename = "DestinationUser")]
pub destination_user: ProviderUserIdentifierType,
#[serde(rename = "SourceUser")]
pub source_user: ProviderUserIdentifierType,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminLinkProviderForUserResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminListDevicesRequest {
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "PaginationToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pagination_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminListDevicesResponse {
#[serde(rename = "Devices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub devices: Option<Vec<DeviceType>>,
#[serde(rename = "PaginationToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pagination_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminListGroupsForUserRequest {
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminListGroupsForUserResponse {
#[serde(rename = "Groups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub groups: Option<Vec<GroupType>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminListUserAuthEventsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminListUserAuthEventsResponse {
#[serde(rename = "AuthEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_events: Option<Vec<AuthEventType>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminRemoveUserFromGroupRequest {
#[serde(rename = "GroupName")]
pub group_name: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminResetUserPasswordRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminResetUserPasswordResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminRespondToAuthChallengeRequest {
#[serde(rename = "AnalyticsMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_metadata: Option<AnalyticsMetadataType>,
#[serde(rename = "ChallengeName")]
pub challenge_name: String,
#[serde(rename = "ChallengeResponses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_responses: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "ContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub context_data: Option<ContextDataType>,
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminRespondToAuthChallengeResponse {
#[serde(rename = "AuthenticationResult")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_result: Option<AuthenticationResultType>,
#[serde(rename = "ChallengeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_name: Option<String>,
#[serde(rename = "ChallengeParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminSetUserMFAPreferenceRequest {
#[serde(rename = "SMSMfaSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_mfa_settings: Option<SMSMfaSettingsType>,
#[serde(rename = "SoftwareTokenMfaSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub software_token_mfa_settings: Option<SoftwareTokenMfaSettingsType>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminSetUserMFAPreferenceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminSetUserPasswordRequest {
#[serde(rename = "Password")]
pub password: String,
#[serde(rename = "Permanent")]
#[serde(skip_serializing_if = "Option::is_none")]
pub permanent: Option<bool>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminSetUserPasswordResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminSetUserSettingsRequest {
#[serde(rename = "MFAOptions")]
pub mfa_options: Vec<MFAOptionType>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminSetUserSettingsResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminUpdateAuthEventFeedbackRequest {
#[serde(rename = "EventId")]
pub event_id: String,
#[serde(rename = "FeedbackValue")]
pub feedback_value: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminUpdateAuthEventFeedbackResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminUpdateDeviceStatusRequest {
#[serde(rename = "DeviceKey")]
pub device_key: String,
#[serde(rename = "DeviceRememberedStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_remembered_status: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminUpdateDeviceStatusResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminUpdateUserAttributesRequest {
#[serde(rename = "UserAttributes")]
pub user_attributes: Vec<AttributeType>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminUpdateUserAttributesResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AdminUserGlobalSignOutRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AdminUserGlobalSignOutResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AnalyticsConfigurationType {
#[serde(rename = "ApplicationId")]
pub application_id: String,
#[serde(rename = "ExternalId")]
pub external_id: String,
#[serde(rename = "RoleArn")]
pub role_arn: String,
#[serde(rename = "UserDataShared")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_data_shared: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AnalyticsMetadataType {
#[serde(rename = "AnalyticsEndpointId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_endpoint_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateSoftwareTokenRequest {
#[serde(rename = "AccessToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_token: Option<String>,
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateSoftwareTokenResponse {
#[serde(rename = "SecretCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret_code: Option<String>,
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AttributeType {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AuthEventType {
#[serde(rename = "ChallengeResponses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_responses: Option<Vec<ChallengeResponseType>>,
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "EventContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_context_data: Option<EventContextDataType>,
#[serde(rename = "EventFeedback")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_feedback: Option<EventFeedbackType>,
#[serde(rename = "EventId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_id: Option<String>,
#[serde(rename = "EventResponse")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_response: Option<String>,
#[serde(rename = "EventRisk")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_risk: Option<EventRiskType>,
#[serde(rename = "EventType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AuthenticationResultType {
#[serde(rename = "AccessToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_token: Option<String>,
#[serde(rename = "ExpiresIn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_in: Option<i64>,
#[serde(rename = "IdToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id_token: Option<String>,
#[serde(rename = "NewDeviceMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub new_device_metadata: Option<NewDeviceMetadataType>,
#[serde(rename = "RefreshToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub refresh_token: Option<String>,
#[serde(rename = "TokenType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub token_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ChallengeResponseType {
#[serde(rename = "ChallengeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_name: Option<String>,
#[serde(rename = "ChallengeResponse")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_response: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ChangePasswordRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "PreviousPassword")]
pub previous_password: String,
#[serde(rename = "ProposedPassword")]
pub proposed_password: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ChangePasswordResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CodeDeliveryDetailsType {
#[serde(rename = "AttributeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_name: Option<String>,
#[serde(rename = "DeliveryMedium")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delivery_medium: Option<String>,
#[serde(rename = "Destination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CompromisedCredentialsActionsType {
#[serde(rename = "EventAction")]
pub event_action: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CompromisedCredentialsRiskConfigurationType {
#[serde(rename = "Actions")]
pub actions: CompromisedCredentialsActionsType,
#[serde(rename = "EventFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_filter: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ConfirmDeviceRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "DeviceKey")]
pub device_key: String,
#[serde(rename = "DeviceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_name: Option<String>,
#[serde(rename = "DeviceSecretVerifierConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_secret_verifier_config: Option<DeviceSecretVerifierConfigType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConfirmDeviceResponse {
#[serde(rename = "UserConfirmationNecessary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_confirmation_necessary: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ConfirmForgotPasswordRequest {
#[serde(rename = "AnalyticsMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_metadata: Option<AnalyticsMetadataType>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "ConfirmationCode")]
pub confirmation_code: String,
#[serde(rename = "Password")]
pub password: String,
#[serde(rename = "SecretHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret_hash: Option<String>,
#[serde(rename = "UserContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_context_data: Option<UserContextDataType>,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConfirmForgotPasswordResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ConfirmSignUpRequest {
#[serde(rename = "AnalyticsMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_metadata: Option<AnalyticsMetadataType>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "ConfirmationCode")]
pub confirmation_code: String,
#[serde(rename = "ForceAliasCreation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_alias_creation: Option<bool>,
#[serde(rename = "SecretHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret_hash: Option<String>,
#[serde(rename = "UserContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_context_data: Option<UserContextDataType>,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConfirmSignUpResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ContextDataType {
#[serde(rename = "EncodedData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoded_data: Option<String>,
#[serde(rename = "HttpHeaders")]
pub http_headers: Vec<HttpHeader>,
#[serde(rename = "IpAddress")]
pub ip_address: String,
#[serde(rename = "ServerName")]
pub server_name: String,
#[serde(rename = "ServerPath")]
pub server_path: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateGroupRequest {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "GroupName")]
pub group_name: String,
#[serde(rename = "Precedence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub precedence: Option<i64>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateGroupResponse {
#[serde(rename = "Group")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group: Option<GroupType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateIdentityProviderRequest {
#[serde(rename = "AttributeMapping")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_mapping: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "IdpIdentifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idp_identifiers: Option<Vec<String>>,
#[serde(rename = "ProviderDetails")]
pub provider_details: ::std::collections::HashMap<String, String>,
#[serde(rename = "ProviderName")]
pub provider_name: String,
#[serde(rename = "ProviderType")]
pub provider_type: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateIdentityProviderResponse {
#[serde(rename = "IdentityProvider")]
pub identity_provider: IdentityProviderType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateResourceServerRequest {
#[serde(rename = "Identifier")]
pub identifier: String,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Scopes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scopes: Option<Vec<ResourceServerScopeType>>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateResourceServerResponse {
#[serde(rename = "ResourceServer")]
pub resource_server: ResourceServerType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateUserImportJobRequest {
#[serde(rename = "CloudWatchLogsRoleArn")]
pub cloud_watch_logs_role_arn: String,
#[serde(rename = "JobName")]
pub job_name: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateUserImportJobResponse {
#[serde(rename = "UserImportJob")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_import_job: Option<UserImportJobType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateUserPoolClientRequest {
#[serde(rename = "AllowedOAuthFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_o_auth_flows: Option<Vec<String>>,
#[serde(rename = "AllowedOAuthFlowsUserPoolClient")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_o_auth_flows_user_pool_client: Option<bool>,
#[serde(rename = "AllowedOAuthScopes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_o_auth_scopes: Option<Vec<String>>,
#[serde(rename = "AnalyticsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_configuration: Option<AnalyticsConfigurationType>,
#[serde(rename = "CallbackURLs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub callback_ur_ls: Option<Vec<String>>,
#[serde(rename = "ClientName")]
pub client_name: String,
#[serde(rename = "DefaultRedirectURI")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_redirect_uri: Option<String>,
#[serde(rename = "ExplicitAuthFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub explicit_auth_flows: Option<Vec<String>>,
#[serde(rename = "GenerateSecret")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generate_secret: Option<bool>,
#[serde(rename = "LogoutURLs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logout_ur_ls: Option<Vec<String>>,
#[serde(rename = "ReadAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_attributes: Option<Vec<String>>,
#[serde(rename = "RefreshTokenValidity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub refresh_token_validity: Option<i64>,
#[serde(rename = "SupportedIdentityProviders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub supported_identity_providers: Option<Vec<String>>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "WriteAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub write_attributes: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateUserPoolClientResponse {
#[serde(rename = "UserPoolClient")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_client: Option<UserPoolClientType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateUserPoolDomainRequest {
#[serde(rename = "CustomDomainConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_domain_config: Option<CustomDomainConfigType>,
#[serde(rename = "Domain")]
pub domain: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateUserPoolDomainResponse {
#[serde(rename = "CloudFrontDomain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_front_domain: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateUserPoolRequest {
#[serde(rename = "AdminCreateUserConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub admin_create_user_config: Option<AdminCreateUserConfigType>,
#[serde(rename = "AliasAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alias_attributes: Option<Vec<String>>,
#[serde(rename = "AutoVerifiedAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_verified_attributes: Option<Vec<String>>,
#[serde(rename = "DeviceConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_configuration: Option<DeviceConfigurationType>,
#[serde(rename = "EmailConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_configuration: Option<EmailConfigurationType>,
#[serde(rename = "EmailVerificationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_verification_message: Option<String>,
#[serde(rename = "EmailVerificationSubject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_verification_subject: Option<String>,
#[serde(rename = "LambdaConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lambda_config: Option<LambdaConfigType>,
#[serde(rename = "MfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_configuration: Option<String>,
#[serde(rename = "Policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<UserPoolPolicyType>,
#[serde(rename = "PoolName")]
pub pool_name: String,
#[serde(rename = "Schema")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema: Option<Vec<SchemaAttributeType>>,
#[serde(rename = "SmsAuthenticationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_authentication_message: Option<String>,
#[serde(rename = "SmsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_configuration: Option<SmsConfigurationType>,
#[serde(rename = "SmsVerificationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_verification_message: Option<String>,
#[serde(rename = "UserPoolAddOns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_add_ons: Option<UserPoolAddOnsType>,
#[serde(rename = "UserPoolTags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "UsernameAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username_attributes: Option<Vec<String>>,
#[serde(rename = "VerificationMessageTemplate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_message_template: Option<VerificationMessageTemplateType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateUserPoolResponse {
#[serde(rename = "UserPool")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool: Option<UserPoolType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CustomDomainConfigType {
#[serde(rename = "CertificateArn")]
pub certificate_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteGroupRequest {
#[serde(rename = "GroupName")]
pub group_name: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteIdentityProviderRequest {
#[serde(rename = "ProviderName")]
pub provider_name: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteResourceServerRequest {
#[serde(rename = "Identifier")]
pub identifier: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUserAttributesRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "UserAttributeNames")]
pub user_attribute_names: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteUserAttributesResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUserPoolClientRequest {
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUserPoolDomainRequest {
#[serde(rename = "Domain")]
pub domain: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteUserPoolDomainResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUserPoolRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUserRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeIdentityProviderRequest {
#[serde(rename = "ProviderName")]
pub provider_name: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeIdentityProviderResponse {
#[serde(rename = "IdentityProvider")]
pub identity_provider: IdentityProviderType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeResourceServerRequest {
#[serde(rename = "Identifier")]
pub identifier: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeResourceServerResponse {
#[serde(rename = "ResourceServer")]
pub resource_server: ResourceServerType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeRiskConfigurationRequest {
#[serde(rename = "ClientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeRiskConfigurationResponse {
#[serde(rename = "RiskConfiguration")]
pub risk_configuration: RiskConfigurationType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeUserImportJobRequest {
#[serde(rename = "JobId")]
pub job_id: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeUserImportJobResponse {
#[serde(rename = "UserImportJob")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_import_job: Option<UserImportJobType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeUserPoolClientRequest {
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeUserPoolClientResponse {
#[serde(rename = "UserPoolClient")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_client: Option<UserPoolClientType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeUserPoolDomainRequest {
#[serde(rename = "Domain")]
pub domain: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeUserPoolDomainResponse {
#[serde(rename = "DomainDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_description: Option<DomainDescriptionType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeUserPoolRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeUserPoolResponse {
#[serde(rename = "UserPool")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool: Option<UserPoolType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceConfigurationType {
#[serde(rename = "ChallengeRequiredOnNewDevice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_required_on_new_device: Option<bool>,
#[serde(rename = "DeviceOnlyRememberedOnUserPrompt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_only_remembered_on_user_prompt: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeviceSecretVerifierConfigType {
#[serde(rename = "PasswordVerifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub password_verifier: Option<String>,
#[serde(rename = "Salt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub salt: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeviceType {
#[serde(rename = "DeviceAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_attributes: Option<Vec<AttributeType>>,
#[serde(rename = "DeviceCreateDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_create_date: Option<f64>,
#[serde(rename = "DeviceKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_key: Option<String>,
#[serde(rename = "DeviceLastAuthenticatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_last_authenticated_date: Option<f64>,
#[serde(rename = "DeviceLastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_last_modified_date: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DomainDescriptionType {
#[serde(rename = "AWSAccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_account_id: Option<String>,
#[serde(rename = "CloudFrontDistribution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_front_distribution: Option<String>,
#[serde(rename = "CustomDomainConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_domain_config: Option<CustomDomainConfigType>,
#[serde(rename = "Domain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
#[serde(rename = "S3Bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_bucket: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EmailConfigurationType {
#[serde(rename = "EmailSendingAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_sending_account: Option<String>,
#[serde(rename = "ReplyToEmailAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reply_to_email_address: Option<String>,
#[serde(rename = "SourceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EventContextDataType {
#[serde(rename = "City")]
#[serde(skip_serializing_if = "Option::is_none")]
pub city: Option<String>,
#[serde(rename = "Country")]
#[serde(skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
#[serde(rename = "DeviceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_name: Option<String>,
#[serde(rename = "IpAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_address: Option<String>,
#[serde(rename = "Timezone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EventFeedbackType {
#[serde(rename = "FeedbackDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub feedback_date: Option<f64>,
#[serde(rename = "FeedbackValue")]
pub feedback_value: String,
#[serde(rename = "Provider")]
pub provider: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EventRiskType {
#[serde(rename = "RiskDecision")]
#[serde(skip_serializing_if = "Option::is_none")]
pub risk_decision: Option<String>,
#[serde(rename = "RiskLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub risk_level: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ForgetDeviceRequest {
#[serde(rename = "AccessToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_token: Option<String>,
#[serde(rename = "DeviceKey")]
pub device_key: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ForgotPasswordRequest {
#[serde(rename = "AnalyticsMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_metadata: Option<AnalyticsMetadataType>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "SecretHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret_hash: Option<String>,
#[serde(rename = "UserContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_context_data: Option<UserContextDataType>,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ForgotPasswordResponse {
#[serde(rename = "CodeDeliveryDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code_delivery_details: Option<CodeDeliveryDetailsType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetCSVHeaderRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetCSVHeaderResponse {
#[serde(rename = "CSVHeader")]
#[serde(skip_serializing_if = "Option::is_none")]
pub csv_header: Option<Vec<String>>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDeviceRequest {
#[serde(rename = "AccessToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_token: Option<String>,
#[serde(rename = "DeviceKey")]
pub device_key: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDeviceResponse {
#[serde(rename = "Device")]
pub device: DeviceType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetGroupRequest {
#[serde(rename = "GroupName")]
pub group_name: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetGroupResponse {
#[serde(rename = "Group")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group: Option<GroupType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetIdentityProviderByIdentifierRequest {
#[serde(rename = "IdpIdentifier")]
pub idp_identifier: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetIdentityProviderByIdentifierResponse {
#[serde(rename = "IdentityProvider")]
pub identity_provider: IdentityProviderType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetSigningCertificateRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetSigningCertificateResponse {
#[serde(rename = "Certificate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetUICustomizationRequest {
#[serde(rename = "ClientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetUICustomizationResponse {
#[serde(rename = "UICustomization")]
pub ui_customization: UICustomizationType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetUserAttributeVerificationCodeRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "AttributeName")]
pub attribute_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetUserAttributeVerificationCodeResponse {
#[serde(rename = "CodeDeliveryDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code_delivery_details: Option<CodeDeliveryDetailsType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetUserPoolMfaConfigRequest {
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetUserPoolMfaConfigResponse {
#[serde(rename = "MfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_configuration: Option<String>,
#[serde(rename = "SmsMfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_mfa_configuration: Option<SmsMfaConfigType>,
#[serde(rename = "SoftwareTokenMfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub software_token_mfa_configuration: Option<SoftwareTokenMfaConfigType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetUserRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetUserResponse {
#[serde(rename = "MFAOptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_options: Option<Vec<MFAOptionType>>,
#[serde(rename = "PreferredMfaSetting")]
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_mfa_setting: Option<String>,
#[serde(rename = "UserAttributes")]
pub user_attributes: Vec<AttributeType>,
#[serde(rename = "UserMFASettingList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_mfa_setting_list: Option<Vec<String>>,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GlobalSignOutRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GlobalSignOutResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GroupType {
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "Precedence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub precedence: Option<i64>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct HttpHeader {
#[serde(rename = "headerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub header_name: Option<String>,
#[serde(rename = "headerValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub header_value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct IdentityProviderType {
#[serde(rename = "AttributeMapping")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_mapping: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "IdpIdentifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idp_identifiers: Option<Vec<String>>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "ProviderDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_details: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "ProviderName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_name: Option<String>,
#[serde(rename = "ProviderType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_type: Option<String>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InitiateAuthRequest {
#[serde(rename = "AnalyticsMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_metadata: Option<AnalyticsMetadataType>,
#[serde(rename = "AuthFlow")]
pub auth_flow: String,
#[serde(rename = "AuthParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "ClientMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_metadata: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "UserContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_context_data: Option<UserContextDataType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InitiateAuthResponse {
#[serde(rename = "AuthenticationResult")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_result: Option<AuthenticationResultType>,
#[serde(rename = "ChallengeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_name: Option<String>,
#[serde(rename = "ChallengeParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LambdaConfigType {
#[serde(rename = "CreateAuthChallenge")]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_auth_challenge: Option<String>,
#[serde(rename = "CustomMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_message: Option<String>,
#[serde(rename = "DefineAuthChallenge")]
#[serde(skip_serializing_if = "Option::is_none")]
pub define_auth_challenge: Option<String>,
#[serde(rename = "PostAuthentication")]
#[serde(skip_serializing_if = "Option::is_none")]
pub post_authentication: Option<String>,
#[serde(rename = "PostConfirmation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub post_confirmation: Option<String>,
#[serde(rename = "PreAuthentication")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pre_authentication: Option<String>,
#[serde(rename = "PreSignUp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pre_sign_up: Option<String>,
#[serde(rename = "PreTokenGeneration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pre_token_generation: Option<String>,
#[serde(rename = "UserMigration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_migration: Option<String>,
#[serde(rename = "VerifyAuthChallengeResponse")]
#[serde(skip_serializing_if = "Option::is_none")]
pub verify_auth_challenge_response: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDevicesRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "PaginationToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pagination_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDevicesResponse {
#[serde(rename = "Devices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub devices: Option<Vec<DeviceType>>,
#[serde(rename = "PaginationToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pagination_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListGroupsRequest {
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListGroupsResponse {
#[serde(rename = "Groups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub groups: Option<Vec<GroupType>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListIdentityProvidersRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListIdentityProvidersResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Providers")]
pub providers: Vec<ProviderDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListResourceServersRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListResourceServersResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ResourceServers")]
pub resource_servers: Vec<ResourceServerType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceResponse {
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListUserImportJobsRequest {
#[serde(rename = "MaxResults")]
pub max_results: i64,
#[serde(rename = "PaginationToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pagination_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListUserImportJobsResponse {
#[serde(rename = "PaginationToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pagination_token: Option<String>,
#[serde(rename = "UserImportJobs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_import_jobs: Option<Vec<UserImportJobType>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListUserPoolClientsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListUserPoolClientsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserPoolClients")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_clients: Option<Vec<UserPoolClientDescription>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListUserPoolsRequest {
#[serde(rename = "MaxResults")]
pub max_results: i64,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListUserPoolsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserPools")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pools: Option<Vec<UserPoolDescriptionType>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListUsersInGroupRequest {
#[serde(rename = "GroupName")]
pub group_name: String,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListUsersInGroupResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Users")]
#[serde(skip_serializing_if = "Option::is_none")]
pub users: Option<Vec<UserType>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListUsersRequest {
#[serde(rename = "AttributesToGet")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes_to_get: Option<Vec<String>>,
#[serde(rename = "Filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option<String>,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "PaginationToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pagination_token: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListUsersResponse {
#[serde(rename = "PaginationToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pagination_token: Option<String>,
#[serde(rename = "Users")]
#[serde(skip_serializing_if = "Option::is_none")]
pub users: Option<Vec<UserType>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MFAOptionType {
#[serde(rename = "AttributeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_name: Option<String>,
#[serde(rename = "DeliveryMedium")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delivery_medium: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MessageTemplateType {
#[serde(rename = "EmailMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_message: Option<String>,
#[serde(rename = "EmailSubject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_subject: Option<String>,
#[serde(rename = "SMSMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct NewDeviceMetadataType {
#[serde(rename = "DeviceGroupKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_group_key: Option<String>,
#[serde(rename = "DeviceKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_key: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct NotifyConfigurationType {
#[serde(rename = "BlockEmail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub block_email: Option<NotifyEmailType>,
#[serde(rename = "From")]
#[serde(skip_serializing_if = "Option::is_none")]
pub from: Option<String>,
#[serde(rename = "MfaEmail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_email: Option<NotifyEmailType>,
#[serde(rename = "NoActionEmail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub no_action_email: Option<NotifyEmailType>,
#[serde(rename = "ReplyTo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reply_to: Option<String>,
#[serde(rename = "SourceArn")]
pub source_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct NotifyEmailType {
#[serde(rename = "HtmlBody")]
#[serde(skip_serializing_if = "Option::is_none")]
pub html_body: Option<String>,
#[serde(rename = "Subject")]
pub subject: String,
#[serde(rename = "TextBody")]
#[serde(skip_serializing_if = "Option::is_none")]
pub text_body: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct NumberAttributeConstraintsType {
#[serde(rename = "MaxValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_value: Option<String>,
#[serde(rename = "MinValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub min_value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PasswordPolicyType {
#[serde(rename = "MinimumLength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub minimum_length: Option<i64>,
#[serde(rename = "RequireLowercase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub require_lowercase: Option<bool>,
#[serde(rename = "RequireNumbers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub require_numbers: Option<bool>,
#[serde(rename = "RequireSymbols")]
#[serde(skip_serializing_if = "Option::is_none")]
pub require_symbols: Option<bool>,
#[serde(rename = "RequireUppercase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub require_uppercase: Option<bool>,
#[serde(rename = "TemporaryPasswordValidityDays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub temporary_password_validity_days: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ProviderDescription {
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "ProviderName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_name: Option<String>,
#[serde(rename = "ProviderType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ProviderUserIdentifierType {
#[serde(rename = "ProviderAttributeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_attribute_name: Option<String>,
#[serde(rename = "ProviderAttributeValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_attribute_value: Option<String>,
#[serde(rename = "ProviderName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ResendConfirmationCodeRequest {
#[serde(rename = "AnalyticsMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_metadata: Option<AnalyticsMetadataType>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "SecretHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret_hash: Option<String>,
#[serde(rename = "UserContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_context_data: Option<UserContextDataType>,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResendConfirmationCodeResponse {
#[serde(rename = "CodeDeliveryDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code_delivery_details: Option<CodeDeliveryDetailsType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceServerScopeType {
#[serde(rename = "ScopeDescription")]
pub scope_description: String,
#[serde(rename = "ScopeName")]
pub scope_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResourceServerType {
#[serde(rename = "Identifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub identifier: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Scopes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scopes: Option<Vec<ResourceServerScopeType>>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RespondToAuthChallengeRequest {
#[serde(rename = "AnalyticsMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_metadata: Option<AnalyticsMetadataType>,
#[serde(rename = "ChallengeName")]
pub challenge_name: String,
#[serde(rename = "ChallengeResponses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_responses: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
#[serde(rename = "UserContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_context_data: Option<UserContextDataType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RespondToAuthChallengeResponse {
#[serde(rename = "AuthenticationResult")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_result: Option<AuthenticationResultType>,
#[serde(rename = "ChallengeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_name: Option<String>,
#[serde(rename = "ChallengeParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub challenge_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RiskConfigurationType {
#[serde(rename = "AccountTakeoverRiskConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_takeover_risk_configuration: Option<AccountTakeoverRiskConfigurationType>,
#[serde(rename = "ClientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "CompromisedCredentialsRiskConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compromised_credentials_risk_configuration:
Option<CompromisedCredentialsRiskConfigurationType>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "RiskExceptionConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub risk_exception_configuration: Option<RiskExceptionConfigurationType>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RiskExceptionConfigurationType {
#[serde(rename = "BlockedIPRangeList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub blocked_ip_range_list: Option<Vec<String>>,
#[serde(rename = "SkippedIPRangeList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skipped_ip_range_list: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SMSMfaSettingsType {
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "PreferredMfa")]
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_mfa: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SchemaAttributeType {
#[serde(rename = "AttributeDataType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_data_type: Option<String>,
#[serde(rename = "DeveloperOnlyAttribute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub developer_only_attribute: Option<bool>,
#[serde(rename = "Mutable")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mutable: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "NumberAttributeConstraints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_attribute_constraints: Option<NumberAttributeConstraintsType>,
#[serde(rename = "Required")]
#[serde(skip_serializing_if = "Option::is_none")]
pub required: Option<bool>,
#[serde(rename = "StringAttributeConstraints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub string_attribute_constraints: Option<StringAttributeConstraintsType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetRiskConfigurationRequest {
#[serde(rename = "AccountTakeoverRiskConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_takeover_risk_configuration: Option<AccountTakeoverRiskConfigurationType>,
#[serde(rename = "ClientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "CompromisedCredentialsRiskConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compromised_credentials_risk_configuration:
Option<CompromisedCredentialsRiskConfigurationType>,
#[serde(rename = "RiskExceptionConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub risk_exception_configuration: Option<RiskExceptionConfigurationType>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SetRiskConfigurationResponse {
#[serde(rename = "RiskConfiguration")]
pub risk_configuration: RiskConfigurationType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetUICustomizationRequest {
#[serde(rename = "CSS")]
#[serde(skip_serializing_if = "Option::is_none")]
pub css: Option<String>,
#[serde(rename = "ClientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "ImageFile")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_file: Option<bytes::Bytes>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SetUICustomizationResponse {
#[serde(rename = "UICustomization")]
pub ui_customization: UICustomizationType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetUserMFAPreferenceRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "SMSMfaSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_mfa_settings: Option<SMSMfaSettingsType>,
#[serde(rename = "SoftwareTokenMfaSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub software_token_mfa_settings: Option<SoftwareTokenMfaSettingsType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SetUserMFAPreferenceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetUserPoolMfaConfigRequest {
#[serde(rename = "MfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_configuration: Option<String>,
#[serde(rename = "SmsMfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_mfa_configuration: Option<SmsMfaConfigType>,
#[serde(rename = "SoftwareTokenMfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub software_token_mfa_configuration: Option<SoftwareTokenMfaConfigType>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SetUserPoolMfaConfigResponse {
#[serde(rename = "MfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_configuration: Option<String>,
#[serde(rename = "SmsMfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_mfa_configuration: Option<SmsMfaConfigType>,
#[serde(rename = "SoftwareTokenMfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub software_token_mfa_configuration: Option<SoftwareTokenMfaConfigType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetUserSettingsRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "MFAOptions")]
pub mfa_options: Vec<MFAOptionType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SetUserSettingsResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SignUpRequest {
#[serde(rename = "AnalyticsMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_metadata: Option<AnalyticsMetadataType>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "Password")]
pub password: String,
#[serde(rename = "SecretHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret_hash: Option<String>,
#[serde(rename = "UserAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_attributes: Option<Vec<AttributeType>>,
#[serde(rename = "UserContextData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_context_data: Option<UserContextDataType>,
#[serde(rename = "Username")]
pub username: String,
#[serde(rename = "ValidationData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validation_data: Option<Vec<AttributeType>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SignUpResponse {
#[serde(rename = "CodeDeliveryDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code_delivery_details: Option<CodeDeliveryDetailsType>,
#[serde(rename = "UserConfirmed")]
pub user_confirmed: bool,
#[serde(rename = "UserSub")]
pub user_sub: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SmsConfigurationType {
#[serde(rename = "ExternalId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub external_id: Option<String>,
#[serde(rename = "SnsCallerArn")]
pub sns_caller_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SmsMfaConfigType {
#[serde(rename = "SmsAuthenticationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_authentication_message: Option<String>,
#[serde(rename = "SmsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_configuration: Option<SmsConfigurationType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SoftwareTokenMfaConfigType {
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SoftwareTokenMfaSettingsType {
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "PreferredMfa")]
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_mfa: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartUserImportJobRequest {
#[serde(rename = "JobId")]
pub job_id: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartUserImportJobResponse {
#[serde(rename = "UserImportJob")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_import_job: Option<UserImportJobType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopUserImportJobRequest {
#[serde(rename = "JobId")]
pub job_id: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopUserImportJobResponse {
#[serde(rename = "UserImportJob")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_import_job: Option<UserImportJobType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StringAttributeConstraintsType {
#[serde(rename = "MaxLength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_length: Option<String>,
#[serde(rename = "MinLength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub min_length: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TagResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UICustomizationType {
#[serde(rename = "CSS")]
#[serde(skip_serializing_if = "Option::is_none")]
pub css: Option<String>,
#[serde(rename = "CSSVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub css_version: Option<String>,
#[serde(rename = "ClientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "ImageUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_url: Option<String>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UntagResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "TagKeys")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tag_keys: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UntagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateAuthEventFeedbackRequest {
#[serde(rename = "EventId")]
pub event_id: String,
#[serde(rename = "FeedbackToken")]
pub feedback_token: String,
#[serde(rename = "FeedbackValue")]
pub feedback_value: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateAuthEventFeedbackResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDeviceStatusRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "DeviceKey")]
pub device_key: String,
#[serde(rename = "DeviceRememberedStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_remembered_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDeviceStatusResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateGroupRequest {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "GroupName")]
pub group_name: String,
#[serde(rename = "Precedence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub precedence: Option<i64>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateGroupResponse {
#[serde(rename = "Group")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group: Option<GroupType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateIdentityProviderRequest {
#[serde(rename = "AttributeMapping")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_mapping: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "IdpIdentifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idp_identifiers: Option<Vec<String>>,
#[serde(rename = "ProviderDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_details: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "ProviderName")]
pub provider_name: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateIdentityProviderResponse {
#[serde(rename = "IdentityProvider")]
pub identity_provider: IdentityProviderType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateResourceServerRequest {
#[serde(rename = "Identifier")]
pub identifier: String,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Scopes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scopes: Option<Vec<ResourceServerScopeType>>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateResourceServerResponse {
#[serde(rename = "ResourceServer")]
pub resource_server: ResourceServerType,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateUserAttributesRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "UserAttributes")]
pub user_attributes: Vec<AttributeType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateUserAttributesResponse {
#[serde(rename = "CodeDeliveryDetailsList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code_delivery_details_list: Option<Vec<CodeDeliveryDetailsType>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateUserPoolClientRequest {
#[serde(rename = "AllowedOAuthFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_o_auth_flows: Option<Vec<String>>,
#[serde(rename = "AllowedOAuthFlowsUserPoolClient")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_o_auth_flows_user_pool_client: Option<bool>,
#[serde(rename = "AllowedOAuthScopes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_o_auth_scopes: Option<Vec<String>>,
#[serde(rename = "AnalyticsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_configuration: Option<AnalyticsConfigurationType>,
#[serde(rename = "CallbackURLs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub callback_ur_ls: Option<Vec<String>>,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "ClientName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_name: Option<String>,
#[serde(rename = "DefaultRedirectURI")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_redirect_uri: Option<String>,
#[serde(rename = "ExplicitAuthFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub explicit_auth_flows: Option<Vec<String>>,
#[serde(rename = "LogoutURLs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logout_ur_ls: Option<Vec<String>>,
#[serde(rename = "ReadAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_attributes: Option<Vec<String>>,
#[serde(rename = "RefreshTokenValidity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub refresh_token_validity: Option<i64>,
#[serde(rename = "SupportedIdentityProviders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub supported_identity_providers: Option<Vec<String>>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "WriteAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub write_attributes: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateUserPoolClientResponse {
#[serde(rename = "UserPoolClient")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_client: Option<UserPoolClientType>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateUserPoolDomainRequest {
#[serde(rename = "CustomDomainConfig")]
pub custom_domain_config: CustomDomainConfigType,
#[serde(rename = "Domain")]
pub domain: String,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateUserPoolDomainResponse {
#[serde(rename = "CloudFrontDomain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_front_domain: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateUserPoolRequest {
#[serde(rename = "AdminCreateUserConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub admin_create_user_config: Option<AdminCreateUserConfigType>,
#[serde(rename = "AutoVerifiedAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_verified_attributes: Option<Vec<String>>,
#[serde(rename = "DeviceConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_configuration: Option<DeviceConfigurationType>,
#[serde(rename = "EmailConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_configuration: Option<EmailConfigurationType>,
#[serde(rename = "EmailVerificationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_verification_message: Option<String>,
#[serde(rename = "EmailVerificationSubject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_verification_subject: Option<String>,
#[serde(rename = "LambdaConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lambda_config: Option<LambdaConfigType>,
#[serde(rename = "MfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_configuration: Option<String>,
#[serde(rename = "Policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<UserPoolPolicyType>,
#[serde(rename = "SmsAuthenticationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_authentication_message: Option<String>,
#[serde(rename = "SmsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_configuration: Option<SmsConfigurationType>,
#[serde(rename = "SmsVerificationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_verification_message: Option<String>,
#[serde(rename = "UserPoolAddOns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_add_ons: Option<UserPoolAddOnsType>,
#[serde(rename = "UserPoolId")]
pub user_pool_id: String,
#[serde(rename = "UserPoolTags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "VerificationMessageTemplate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_message_template: Option<VerificationMessageTemplateType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateUserPoolResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UserContextDataType {
#[serde(rename = "EncodedData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoded_data: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserImportJobType {
#[serde(rename = "CloudWatchLogsRoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_logs_role_arn: Option<String>,
#[serde(rename = "CompletionDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub completion_date: Option<f64>,
#[serde(rename = "CompletionMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub completion_message: Option<String>,
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "FailedUsers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_users: Option<i64>,
#[serde(rename = "ImportedUsers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub imported_users: Option<i64>,
#[serde(rename = "JobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<String>,
#[serde(rename = "JobName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_name: Option<String>,
#[serde(rename = "PreSignedUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pre_signed_url: Option<String>,
#[serde(rename = "SkippedUsers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skipped_users: Option<i64>,
#[serde(rename = "StartDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_date: Option<f64>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UserPoolAddOnsType {
#[serde(rename = "AdvancedSecurityMode")]
pub advanced_security_mode: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserPoolClientDescription {
#[serde(rename = "ClientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "ClientName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_name: Option<String>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserPoolClientType {
#[serde(rename = "AllowedOAuthFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_o_auth_flows: Option<Vec<String>>,
#[serde(rename = "AllowedOAuthFlowsUserPoolClient")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_o_auth_flows_user_pool_client: Option<bool>,
#[serde(rename = "AllowedOAuthScopes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_o_auth_scopes: Option<Vec<String>>,
#[serde(rename = "AnalyticsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub analytics_configuration: Option<AnalyticsConfigurationType>,
#[serde(rename = "CallbackURLs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub callback_ur_ls: Option<Vec<String>>,
#[serde(rename = "ClientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "ClientName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_name: Option<String>,
#[serde(rename = "ClientSecret")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_secret: Option<String>,
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "DefaultRedirectURI")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_redirect_uri: Option<String>,
#[serde(rename = "ExplicitAuthFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub explicit_auth_flows: Option<Vec<String>>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "LogoutURLs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logout_ur_ls: Option<Vec<String>>,
#[serde(rename = "ReadAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_attributes: Option<Vec<String>>,
#[serde(rename = "RefreshTokenValidity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub refresh_token_validity: Option<i64>,
#[serde(rename = "SupportedIdentityProviders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub supported_identity_providers: Option<Vec<String>>,
#[serde(rename = "UserPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_id: Option<String>,
#[serde(rename = "WriteAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub write_attributes: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserPoolDescriptionType {
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LambdaConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lambda_config: Option<LambdaConfigType>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UserPoolPolicyType {
#[serde(rename = "PasswordPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub password_policy: Option<PasswordPolicyType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserPoolType {
#[serde(rename = "AdminCreateUserConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub admin_create_user_config: Option<AdminCreateUserConfigType>,
#[serde(rename = "AliasAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alias_attributes: Option<Vec<String>>,
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "AutoVerifiedAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_verified_attributes: Option<Vec<String>>,
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "CustomDomain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_domain: Option<String>,
#[serde(rename = "DeviceConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_configuration: Option<DeviceConfigurationType>,
#[serde(rename = "Domain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
#[serde(rename = "EmailConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_configuration: Option<EmailConfigurationType>,
#[serde(rename = "EmailConfigurationFailure")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_configuration_failure: Option<String>,
#[serde(rename = "EmailVerificationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_verification_message: Option<String>,
#[serde(rename = "EmailVerificationSubject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_verification_subject: Option<String>,
#[serde(rename = "EstimatedNumberOfUsers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_number_of_users: Option<i64>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LambdaConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lambda_config: Option<LambdaConfigType>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "MfaConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_configuration: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<UserPoolPolicyType>,
#[serde(rename = "SchemaAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_attributes: Option<Vec<SchemaAttributeType>>,
#[serde(rename = "SmsAuthenticationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_authentication_message: Option<String>,
#[serde(rename = "SmsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_configuration: Option<SmsConfigurationType>,
#[serde(rename = "SmsConfigurationFailure")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_configuration_failure: Option<String>,
#[serde(rename = "SmsVerificationMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_verification_message: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "UserPoolAddOns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_add_ons: Option<UserPoolAddOnsType>,
#[serde(rename = "UserPoolTags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_pool_tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "UsernameAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username_attributes: Option<Vec<String>>,
#[serde(rename = "VerificationMessageTemplate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_message_template: Option<VerificationMessageTemplateType>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserType {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<AttributeType>>,
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "MFAOptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mfa_options: Option<Vec<MFAOptionType>>,
#[serde(rename = "UserCreateDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_create_date: Option<f64>,
#[serde(rename = "UserLastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_last_modified_date: Option<f64>,
#[serde(rename = "UserStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_status: Option<String>,
#[serde(rename = "Username")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VerificationMessageTemplateType {
#[serde(rename = "DefaultEmailOption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_email_option: Option<String>,
#[serde(rename = "EmailMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_message: Option<String>,
#[serde(rename = "EmailMessageByLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_message_by_link: Option<String>,
#[serde(rename = "EmailSubject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_subject: Option<String>,
#[serde(rename = "EmailSubjectByLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_subject_by_link: Option<String>,
#[serde(rename = "SmsMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sms_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct VerifySoftwareTokenRequest {
#[serde(rename = "AccessToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_token: Option<String>,
#[serde(rename = "FriendlyDeviceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub friendly_device_name: Option<String>,
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
#[serde(rename = "UserCode")]
pub user_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VerifySoftwareTokenResponse {
#[serde(rename = "Session")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct VerifyUserAttributeRequest {
#[serde(rename = "AccessToken")]
pub access_token: String,
#[serde(rename = "AttributeName")]
pub attribute_name: String,
#[serde(rename = "Code")]
pub code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VerifyUserAttributeResponse {}
#[derive(Debug, PartialEq)]
pub enum AddCustomAttributesError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserImportInProgress(String),
}
impl AddCustomAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddCustomAttributesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AddCustomAttributesError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AddCustomAttributesError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AddCustomAttributesError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AddCustomAttributesError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AddCustomAttributesError::TooManyRequests(err.msg))
}
"UserImportInProgressException" => {
return RusotoError::Service(AddCustomAttributesError::UserImportInProgress(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddCustomAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddCustomAttributesError {
fn description(&self) -> &str {
match *self {
AddCustomAttributesError::InternalError(ref cause) => cause,
AddCustomAttributesError::InvalidParameter(ref cause) => cause,
AddCustomAttributesError::NotAuthorized(ref cause) => cause,
AddCustomAttributesError::ResourceNotFound(ref cause) => cause,
AddCustomAttributesError::TooManyRequests(ref cause) => cause,
AddCustomAttributesError::UserImportInProgress(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminAddUserToGroupError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminAddUserToGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminAddUserToGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminAddUserToGroupError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminAddUserToGroupError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminAddUserToGroupError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminAddUserToGroupError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminAddUserToGroupError::TooManyRequests(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminAddUserToGroupError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminAddUserToGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminAddUserToGroupError {
fn description(&self) -> &str {
match *self {
AdminAddUserToGroupError::InternalError(ref cause) => cause,
AdminAddUserToGroupError::InvalidParameter(ref cause) => cause,
AdminAddUserToGroupError::NotAuthorized(ref cause) => cause,
AdminAddUserToGroupError::ResourceNotFound(ref cause) => cause,
AdminAddUserToGroupError::TooManyRequests(ref cause) => cause,
AdminAddUserToGroupError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminConfirmSignUpError {
InternalError(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyFailedAttempts(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotFound(String),
}
impl AdminConfirmSignUpError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminConfirmSignUpError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminConfirmSignUpError::InternalError(err.msg))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(AdminConfirmSignUpError::InvalidLambdaResponse(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminConfirmSignUpError::InvalidParameter(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(AdminConfirmSignUpError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminConfirmSignUpError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminConfirmSignUpError::ResourceNotFound(err.msg))
}
"TooManyFailedAttemptsException" => {
return RusotoError::Service(AdminConfirmSignUpError::TooManyFailedAttempts(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminConfirmSignUpError::TooManyRequests(err.msg))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(AdminConfirmSignUpError::UnexpectedLambda(err.msg))
}
"UserLambdaValidationException" => {
return RusotoError::Service(AdminConfirmSignUpError::UserLambdaValidation(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminConfirmSignUpError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminConfirmSignUpError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminConfirmSignUpError {
fn description(&self) -> &str {
match *self {
AdminConfirmSignUpError::InternalError(ref cause) => cause,
AdminConfirmSignUpError::InvalidLambdaResponse(ref cause) => cause,
AdminConfirmSignUpError::InvalidParameter(ref cause) => cause,
AdminConfirmSignUpError::LimitExceeded(ref cause) => cause,
AdminConfirmSignUpError::NotAuthorized(ref cause) => cause,
AdminConfirmSignUpError::ResourceNotFound(ref cause) => cause,
AdminConfirmSignUpError::TooManyFailedAttempts(ref cause) => cause,
AdminConfirmSignUpError::TooManyRequests(ref cause) => cause,
AdminConfirmSignUpError::UnexpectedLambda(ref cause) => cause,
AdminConfirmSignUpError::UserLambdaValidation(ref cause) => cause,
AdminConfirmSignUpError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminCreateUserError {
CodeDeliveryFailure(String),
InternalError(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidPassword(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
NotAuthorized(String),
PreconditionNotMet(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UnsupportedUserState(String),
UserLambdaValidation(String),
UserNotFound(String),
UsernameExists(String),
}
impl AdminCreateUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminCreateUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CodeDeliveryFailureException" => {
return RusotoError::Service(AdminCreateUserError::CodeDeliveryFailure(err.msg))
}
"InternalErrorException" => {
return RusotoError::Service(AdminCreateUserError::InternalError(err.msg))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(AdminCreateUserError::InvalidLambdaResponse(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminCreateUserError::InvalidParameter(err.msg))
}
"InvalidPasswordException" => {
return RusotoError::Service(AdminCreateUserError::InvalidPassword(err.msg))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(AdminCreateUserError::InvalidSmsRoleAccessPolicy(
err.msg,
))
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
AdminCreateUserError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminCreateUserError::NotAuthorized(err.msg))
}
"PreconditionNotMetException" => {
return RusotoError::Service(AdminCreateUserError::PreconditionNotMet(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminCreateUserError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminCreateUserError::TooManyRequests(err.msg))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(AdminCreateUserError::UnexpectedLambda(err.msg))
}
"UnsupportedUserStateException" => {
return RusotoError::Service(AdminCreateUserError::UnsupportedUserState(
err.msg,
))
}
"UserLambdaValidationException" => {
return RusotoError::Service(AdminCreateUserError::UserLambdaValidation(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminCreateUserError::UserNotFound(err.msg))
}
"UsernameExistsException" => {
return RusotoError::Service(AdminCreateUserError::UsernameExists(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminCreateUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminCreateUserError {
fn description(&self) -> &str {
match *self {
AdminCreateUserError::CodeDeliveryFailure(ref cause) => cause,
AdminCreateUserError::InternalError(ref cause) => cause,
AdminCreateUserError::InvalidLambdaResponse(ref cause) => cause,
AdminCreateUserError::InvalidParameter(ref cause) => cause,
AdminCreateUserError::InvalidPassword(ref cause) => cause,
AdminCreateUserError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
AdminCreateUserError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
AdminCreateUserError::NotAuthorized(ref cause) => cause,
AdminCreateUserError::PreconditionNotMet(ref cause) => cause,
AdminCreateUserError::ResourceNotFound(ref cause) => cause,
AdminCreateUserError::TooManyRequests(ref cause) => cause,
AdminCreateUserError::UnexpectedLambda(ref cause) => cause,
AdminCreateUserError::UnsupportedUserState(ref cause) => cause,
AdminCreateUserError::UserLambdaValidation(ref cause) => cause,
AdminCreateUserError::UserNotFound(ref cause) => cause,
AdminCreateUserError::UsernameExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminDeleteUserError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminDeleteUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminDeleteUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminDeleteUserError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminDeleteUserError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminDeleteUserError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminDeleteUserError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminDeleteUserError::TooManyRequests(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminDeleteUserError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminDeleteUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminDeleteUserError {
fn description(&self) -> &str {
match *self {
AdminDeleteUserError::InternalError(ref cause) => cause,
AdminDeleteUserError::InvalidParameter(ref cause) => cause,
AdminDeleteUserError::NotAuthorized(ref cause) => cause,
AdminDeleteUserError::ResourceNotFound(ref cause) => cause,
AdminDeleteUserError::TooManyRequests(ref cause) => cause,
AdminDeleteUserError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminDeleteUserAttributesError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminDeleteUserAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminDeleteUserAttributesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminDeleteUserAttributesError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminDeleteUserAttributesError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminDeleteUserAttributesError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminDeleteUserAttributesError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminDeleteUserAttributesError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminDeleteUserAttributesError::UserNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminDeleteUserAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminDeleteUserAttributesError {
fn description(&self) -> &str {
match *self {
AdminDeleteUserAttributesError::InternalError(ref cause) => cause,
AdminDeleteUserAttributesError::InvalidParameter(ref cause) => cause,
AdminDeleteUserAttributesError::NotAuthorized(ref cause) => cause,
AdminDeleteUserAttributesError::ResourceNotFound(ref cause) => cause,
AdminDeleteUserAttributesError::TooManyRequests(ref cause) => cause,
AdminDeleteUserAttributesError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminDisableProviderForUserError {
AliasExists(String),
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminDisableProviderForUserError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AdminDisableProviderForUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AliasExistsException" => {
return RusotoError::Service(AdminDisableProviderForUserError::AliasExists(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(AdminDisableProviderForUserError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(
AdminDisableProviderForUserError::InvalidParameter(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminDisableProviderForUserError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(
AdminDisableProviderForUserError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminDisableProviderForUserError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminDisableProviderForUserError::UserNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminDisableProviderForUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminDisableProviderForUserError {
fn description(&self) -> &str {
match *self {
AdminDisableProviderForUserError::AliasExists(ref cause) => cause,
AdminDisableProviderForUserError::InternalError(ref cause) => cause,
AdminDisableProviderForUserError::InvalidParameter(ref cause) => cause,
AdminDisableProviderForUserError::NotAuthorized(ref cause) => cause,
AdminDisableProviderForUserError::ResourceNotFound(ref cause) => cause,
AdminDisableProviderForUserError::TooManyRequests(ref cause) => cause,
AdminDisableProviderForUserError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminDisableUserError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminDisableUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminDisableUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminDisableUserError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminDisableUserError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminDisableUserError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminDisableUserError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminDisableUserError::TooManyRequests(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminDisableUserError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminDisableUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminDisableUserError {
fn description(&self) -> &str {
match *self {
AdminDisableUserError::InternalError(ref cause) => cause,
AdminDisableUserError::InvalidParameter(ref cause) => cause,
AdminDisableUserError::NotAuthorized(ref cause) => cause,
AdminDisableUserError::ResourceNotFound(ref cause) => cause,
AdminDisableUserError::TooManyRequests(ref cause) => cause,
AdminDisableUserError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminEnableUserError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminEnableUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminEnableUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminEnableUserError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminEnableUserError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminEnableUserError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminEnableUserError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminEnableUserError::TooManyRequests(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminEnableUserError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminEnableUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminEnableUserError {
fn description(&self) -> &str {
match *self {
AdminEnableUserError::InternalError(ref cause) => cause,
AdminEnableUserError::InvalidParameter(ref cause) => cause,
AdminEnableUserError::NotAuthorized(ref cause) => cause,
AdminEnableUserError::ResourceNotFound(ref cause) => cause,
AdminEnableUserError::TooManyRequests(ref cause) => cause,
AdminEnableUserError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminForgetDeviceError {
InternalError(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminForgetDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminForgetDeviceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminForgetDeviceError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminForgetDeviceError::InvalidParameter(err.msg))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(
AdminForgetDeviceError::InvalidUserPoolConfiguration(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminForgetDeviceError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminForgetDeviceError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminForgetDeviceError::TooManyRequests(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminForgetDeviceError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminForgetDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminForgetDeviceError {
fn description(&self) -> &str {
match *self {
AdminForgetDeviceError::InternalError(ref cause) => cause,
AdminForgetDeviceError::InvalidParameter(ref cause) => cause,
AdminForgetDeviceError::InvalidUserPoolConfiguration(ref cause) => cause,
AdminForgetDeviceError::NotAuthorized(ref cause) => cause,
AdminForgetDeviceError::ResourceNotFound(ref cause) => cause,
AdminForgetDeviceError::TooManyRequests(ref cause) => cause,
AdminForgetDeviceError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminGetDeviceError {
InternalError(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl AdminGetDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminGetDeviceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminGetDeviceError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminGetDeviceError::InvalidParameter(err.msg))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(AdminGetDeviceError::InvalidUserPoolConfiguration(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminGetDeviceError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminGetDeviceError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminGetDeviceError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminGetDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminGetDeviceError {
fn description(&self) -> &str {
match *self {
AdminGetDeviceError::InternalError(ref cause) => cause,
AdminGetDeviceError::InvalidParameter(ref cause) => cause,
AdminGetDeviceError::InvalidUserPoolConfiguration(ref cause) => cause,
AdminGetDeviceError::NotAuthorized(ref cause) => cause,
AdminGetDeviceError::ResourceNotFound(ref cause) => cause,
AdminGetDeviceError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminGetUserError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminGetUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminGetUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminGetUserError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminGetUserError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminGetUserError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminGetUserError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminGetUserError::TooManyRequests(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminGetUserError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminGetUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminGetUserError {
fn description(&self) -> &str {
match *self {
AdminGetUserError::InternalError(ref cause) => cause,
AdminGetUserError::InvalidParameter(ref cause) => cause,
AdminGetUserError::NotAuthorized(ref cause) => cause,
AdminGetUserError::ResourceNotFound(ref cause) => cause,
AdminGetUserError::TooManyRequests(ref cause) => cause,
AdminGetUserError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminInitiateAuthError {
InternalError(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
InvalidUserPoolConfiguration(String),
MFAMethodNotFound(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl AdminInitiateAuthError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminInitiateAuthError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminInitiateAuthError::InternalError(err.msg))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(AdminInitiateAuthError::InvalidLambdaResponse(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminInitiateAuthError::InvalidParameter(err.msg))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(
AdminInitiateAuthError::InvalidSmsRoleAccessPolicy(err.msg),
)
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
AdminInitiateAuthError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(
AdminInitiateAuthError::InvalidUserPoolConfiguration(err.msg),
)
}
"MFAMethodNotFoundException" => {
return RusotoError::Service(AdminInitiateAuthError::MFAMethodNotFound(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminInitiateAuthError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(AdminInitiateAuthError::PasswordResetRequired(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminInitiateAuthError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminInitiateAuthError::TooManyRequests(err.msg))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(AdminInitiateAuthError::UnexpectedLambda(err.msg))
}
"UserLambdaValidationException" => {
return RusotoError::Service(AdminInitiateAuthError::UserLambdaValidation(
err.msg,
))
}
"UserNotConfirmedException" => {
return RusotoError::Service(AdminInitiateAuthError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminInitiateAuthError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminInitiateAuthError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminInitiateAuthError {
fn description(&self) -> &str {
match *self {
AdminInitiateAuthError::InternalError(ref cause) => cause,
AdminInitiateAuthError::InvalidLambdaResponse(ref cause) => cause,
AdminInitiateAuthError::InvalidParameter(ref cause) => cause,
AdminInitiateAuthError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
AdminInitiateAuthError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
AdminInitiateAuthError::InvalidUserPoolConfiguration(ref cause) => cause,
AdminInitiateAuthError::MFAMethodNotFound(ref cause) => cause,
AdminInitiateAuthError::NotAuthorized(ref cause) => cause,
AdminInitiateAuthError::PasswordResetRequired(ref cause) => cause,
AdminInitiateAuthError::ResourceNotFound(ref cause) => cause,
AdminInitiateAuthError::TooManyRequests(ref cause) => cause,
AdminInitiateAuthError::UnexpectedLambda(ref cause) => cause,
AdminInitiateAuthError::UserLambdaValidation(ref cause) => cause,
AdminInitiateAuthError::UserNotConfirmed(ref cause) => cause,
AdminInitiateAuthError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminLinkProviderForUserError {
AliasExists(String),
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminLinkProviderForUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminLinkProviderForUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AliasExistsException" => {
return RusotoError::Service(AdminLinkProviderForUserError::AliasExists(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(AdminLinkProviderForUserError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminLinkProviderForUserError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminLinkProviderForUserError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminLinkProviderForUserError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminLinkProviderForUserError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminLinkProviderForUserError::UserNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminLinkProviderForUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminLinkProviderForUserError {
fn description(&self) -> &str {
match *self {
AdminLinkProviderForUserError::AliasExists(ref cause) => cause,
AdminLinkProviderForUserError::InternalError(ref cause) => cause,
AdminLinkProviderForUserError::InvalidParameter(ref cause) => cause,
AdminLinkProviderForUserError::NotAuthorized(ref cause) => cause,
AdminLinkProviderForUserError::ResourceNotFound(ref cause) => cause,
AdminLinkProviderForUserError::TooManyRequests(ref cause) => cause,
AdminLinkProviderForUserError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminListDevicesError {
InternalError(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl AdminListDevicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminListDevicesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminListDevicesError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminListDevicesError::InvalidParameter(err.msg))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(
AdminListDevicesError::InvalidUserPoolConfiguration(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminListDevicesError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminListDevicesError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminListDevicesError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminListDevicesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminListDevicesError {
fn description(&self) -> &str {
match *self {
AdminListDevicesError::InternalError(ref cause) => cause,
AdminListDevicesError::InvalidParameter(ref cause) => cause,
AdminListDevicesError::InvalidUserPoolConfiguration(ref cause) => cause,
AdminListDevicesError::NotAuthorized(ref cause) => cause,
AdminListDevicesError::ResourceNotFound(ref cause) => cause,
AdminListDevicesError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminListGroupsForUserError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminListGroupsForUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminListGroupsForUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminListGroupsForUserError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminListGroupsForUserError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminListGroupsForUserError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminListGroupsForUserError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminListGroupsForUserError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminListGroupsForUserError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminListGroupsForUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminListGroupsForUserError {
fn description(&self) -> &str {
match *self {
AdminListGroupsForUserError::InternalError(ref cause) => cause,
AdminListGroupsForUserError::InvalidParameter(ref cause) => cause,
AdminListGroupsForUserError::NotAuthorized(ref cause) => cause,
AdminListGroupsForUserError::ResourceNotFound(ref cause) => cause,
AdminListGroupsForUserError::TooManyRequests(ref cause) => cause,
AdminListGroupsForUserError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminListUserAuthEventsError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
UserPoolAddOnNotEnabled(String),
}
impl AdminListUserAuthEventsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminListUserAuthEventsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminListUserAuthEventsError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminListUserAuthEventsError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminListUserAuthEventsError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminListUserAuthEventsError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminListUserAuthEventsError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminListUserAuthEventsError::UserNotFound(
err.msg,
))
}
"UserPoolAddOnNotEnabledException" => {
return RusotoError::Service(
AdminListUserAuthEventsError::UserPoolAddOnNotEnabled(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminListUserAuthEventsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminListUserAuthEventsError {
fn description(&self) -> &str {
match *self {
AdminListUserAuthEventsError::InternalError(ref cause) => cause,
AdminListUserAuthEventsError::InvalidParameter(ref cause) => cause,
AdminListUserAuthEventsError::NotAuthorized(ref cause) => cause,
AdminListUserAuthEventsError::ResourceNotFound(ref cause) => cause,
AdminListUserAuthEventsError::TooManyRequests(ref cause) => cause,
AdminListUserAuthEventsError::UserNotFound(ref cause) => cause,
AdminListUserAuthEventsError::UserPoolAddOnNotEnabled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminRemoveUserFromGroupError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminRemoveUserFromGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminRemoveUserFromGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminRemoveUserFromGroupError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminRemoveUserFromGroupError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminRemoveUserFromGroupError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminRemoveUserFromGroupError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminRemoveUserFromGroupError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminRemoveUserFromGroupError::UserNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminRemoveUserFromGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminRemoveUserFromGroupError {
fn description(&self) -> &str {
match *self {
AdminRemoveUserFromGroupError::InternalError(ref cause) => cause,
AdminRemoveUserFromGroupError::InvalidParameter(ref cause) => cause,
AdminRemoveUserFromGroupError::NotAuthorized(ref cause) => cause,
AdminRemoveUserFromGroupError::ResourceNotFound(ref cause) => cause,
AdminRemoveUserFromGroupError::TooManyRequests(ref cause) => cause,
AdminRemoveUserFromGroupError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminResetUserPasswordError {
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotFound(String),
}
impl AdminResetUserPasswordError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminResetUserPasswordError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminResetUserPasswordError::InternalError(
err.msg,
))
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(
AdminResetUserPasswordError::InvalidEmailRoleAccessPolicy(err.msg),
)
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(
AdminResetUserPasswordError::InvalidLambdaResponse(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(AdminResetUserPasswordError::InvalidParameter(
err.msg,
))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(
AdminResetUserPasswordError::InvalidSmsRoleAccessPolicy(err.msg),
)
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
AdminResetUserPasswordError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"LimitExceededException" => {
return RusotoError::Service(AdminResetUserPasswordError::LimitExceeded(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminResetUserPasswordError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminResetUserPasswordError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminResetUserPasswordError::TooManyRequests(
err.msg,
))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(AdminResetUserPasswordError::UnexpectedLambda(
err.msg,
))
}
"UserLambdaValidationException" => {
return RusotoError::Service(AdminResetUserPasswordError::UserLambdaValidation(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminResetUserPasswordError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminResetUserPasswordError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminResetUserPasswordError {
fn description(&self) -> &str {
match *self {
AdminResetUserPasswordError::InternalError(ref cause) => cause,
AdminResetUserPasswordError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
AdminResetUserPasswordError::InvalidLambdaResponse(ref cause) => cause,
AdminResetUserPasswordError::InvalidParameter(ref cause) => cause,
AdminResetUserPasswordError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
AdminResetUserPasswordError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
AdminResetUserPasswordError::LimitExceeded(ref cause) => cause,
AdminResetUserPasswordError::NotAuthorized(ref cause) => cause,
AdminResetUserPasswordError::ResourceNotFound(ref cause) => cause,
AdminResetUserPasswordError::TooManyRequests(ref cause) => cause,
AdminResetUserPasswordError::UnexpectedLambda(ref cause) => cause,
AdminResetUserPasswordError::UserLambdaValidation(ref cause) => cause,
AdminResetUserPasswordError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminRespondToAuthChallengeError {
AliasExists(String),
CodeMismatch(String),
ExpiredCode(String),
InternalError(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidPassword(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
InvalidUserPoolConfiguration(String),
MFAMethodNotFound(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
SoftwareTokenMFANotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl AdminRespondToAuthChallengeError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AdminRespondToAuthChallengeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AliasExistsException" => {
return RusotoError::Service(AdminRespondToAuthChallengeError::AliasExists(
err.msg,
))
}
"CodeMismatchException" => {
return RusotoError::Service(AdminRespondToAuthChallengeError::CodeMismatch(
err.msg,
))
}
"ExpiredCodeException" => {
return RusotoError::Service(AdminRespondToAuthChallengeError::ExpiredCode(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(AdminRespondToAuthChallengeError::InternalError(
err.msg,
))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::InvalidLambdaResponse(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::InvalidParameter(err.msg),
)
}
"InvalidPasswordException" => {
return RusotoError::Service(AdminRespondToAuthChallengeError::InvalidPassword(
err.msg,
))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::InvalidSmsRoleAccessPolicy(err.msg),
)
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::InvalidUserPoolConfiguration(err.msg),
)
}
"MFAMethodNotFoundException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::MFAMethodNotFound(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminRespondToAuthChallengeError::NotAuthorized(
err.msg,
))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::PasswordResetRequired(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::ResourceNotFound(err.msg),
)
}
"SoftwareTokenMFANotFoundException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::SoftwareTokenMFANotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminRespondToAuthChallengeError::TooManyRequests(
err.msg,
))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::UnexpectedLambda(err.msg),
)
}
"UserLambdaValidationException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::UserLambdaValidation(err.msg),
)
}
"UserNotConfirmedException" => {
return RusotoError::Service(
AdminRespondToAuthChallengeError::UserNotConfirmed(err.msg),
)
}
"UserNotFoundException" => {
return RusotoError::Service(AdminRespondToAuthChallengeError::UserNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminRespondToAuthChallengeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminRespondToAuthChallengeError {
fn description(&self) -> &str {
match *self {
AdminRespondToAuthChallengeError::AliasExists(ref cause) => cause,
AdminRespondToAuthChallengeError::CodeMismatch(ref cause) => cause,
AdminRespondToAuthChallengeError::ExpiredCode(ref cause) => cause,
AdminRespondToAuthChallengeError::InternalError(ref cause) => cause,
AdminRespondToAuthChallengeError::InvalidLambdaResponse(ref cause) => cause,
AdminRespondToAuthChallengeError::InvalidParameter(ref cause) => cause,
AdminRespondToAuthChallengeError::InvalidPassword(ref cause) => cause,
AdminRespondToAuthChallengeError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
AdminRespondToAuthChallengeError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
AdminRespondToAuthChallengeError::InvalidUserPoolConfiguration(ref cause) => cause,
AdminRespondToAuthChallengeError::MFAMethodNotFound(ref cause) => cause,
AdminRespondToAuthChallengeError::NotAuthorized(ref cause) => cause,
AdminRespondToAuthChallengeError::PasswordResetRequired(ref cause) => cause,
AdminRespondToAuthChallengeError::ResourceNotFound(ref cause) => cause,
AdminRespondToAuthChallengeError::SoftwareTokenMFANotFound(ref cause) => cause,
AdminRespondToAuthChallengeError::TooManyRequests(ref cause) => cause,
AdminRespondToAuthChallengeError::UnexpectedLambda(ref cause) => cause,
AdminRespondToAuthChallengeError::UserLambdaValidation(ref cause) => cause,
AdminRespondToAuthChallengeError::UserNotConfirmed(ref cause) => cause,
AdminRespondToAuthChallengeError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminSetUserMFAPreferenceError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl AdminSetUserMFAPreferenceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminSetUserMFAPreferenceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminSetUserMFAPreferenceError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminSetUserMFAPreferenceError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminSetUserMFAPreferenceError::NotAuthorized(
err.msg,
))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(
AdminSetUserMFAPreferenceError::PasswordResetRequired(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminSetUserMFAPreferenceError::ResourceNotFound(
err.msg,
))
}
"UserNotConfirmedException" => {
return RusotoError::Service(AdminSetUserMFAPreferenceError::UserNotConfirmed(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminSetUserMFAPreferenceError::UserNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminSetUserMFAPreferenceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminSetUserMFAPreferenceError {
fn description(&self) -> &str {
match *self {
AdminSetUserMFAPreferenceError::InternalError(ref cause) => cause,
AdminSetUserMFAPreferenceError::InvalidParameter(ref cause) => cause,
AdminSetUserMFAPreferenceError::NotAuthorized(ref cause) => cause,
AdminSetUserMFAPreferenceError::PasswordResetRequired(ref cause) => cause,
AdminSetUserMFAPreferenceError::ResourceNotFound(ref cause) => cause,
AdminSetUserMFAPreferenceError::UserNotConfirmed(ref cause) => cause,
AdminSetUserMFAPreferenceError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminSetUserPasswordError {
InternalError(String),
InvalidParameter(String),
InvalidPassword(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminSetUserPasswordError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminSetUserPasswordError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminSetUserPasswordError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminSetUserPasswordError::InvalidParameter(
err.msg,
))
}
"InvalidPasswordException" => {
return RusotoError::Service(AdminSetUserPasswordError::InvalidPassword(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminSetUserPasswordError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminSetUserPasswordError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminSetUserPasswordError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminSetUserPasswordError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminSetUserPasswordError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminSetUserPasswordError {
fn description(&self) -> &str {
match *self {
AdminSetUserPasswordError::InternalError(ref cause) => cause,
AdminSetUserPasswordError::InvalidParameter(ref cause) => cause,
AdminSetUserPasswordError::InvalidPassword(ref cause) => cause,
AdminSetUserPasswordError::NotAuthorized(ref cause) => cause,
AdminSetUserPasswordError::ResourceNotFound(ref cause) => cause,
AdminSetUserPasswordError::TooManyRequests(ref cause) => cause,
AdminSetUserPasswordError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminSetUserSettingsError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
UserNotFound(String),
}
impl AdminSetUserSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminSetUserSettingsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminSetUserSettingsError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminSetUserSettingsError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminSetUserSettingsError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminSetUserSettingsError::ResourceNotFound(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminSetUserSettingsError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminSetUserSettingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminSetUserSettingsError {
fn description(&self) -> &str {
match *self {
AdminSetUserSettingsError::InternalError(ref cause) => cause,
AdminSetUserSettingsError::InvalidParameter(ref cause) => cause,
AdminSetUserSettingsError::NotAuthorized(ref cause) => cause,
AdminSetUserSettingsError::ResourceNotFound(ref cause) => cause,
AdminSetUserSettingsError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminUpdateAuthEventFeedbackError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
UserPoolAddOnNotEnabled(String),
}
impl AdminUpdateAuthEventFeedbackError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AdminUpdateAuthEventFeedbackError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminUpdateAuthEventFeedbackError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(
AdminUpdateAuthEventFeedbackError::InvalidParameter(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminUpdateAuthEventFeedbackError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(
AdminUpdateAuthEventFeedbackError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
AdminUpdateAuthEventFeedbackError::TooManyRequests(err.msg),
)
}
"UserNotFoundException" => {
return RusotoError::Service(AdminUpdateAuthEventFeedbackError::UserNotFound(
err.msg,
))
}
"UserPoolAddOnNotEnabledException" => {
return RusotoError::Service(
AdminUpdateAuthEventFeedbackError::UserPoolAddOnNotEnabled(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminUpdateAuthEventFeedbackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminUpdateAuthEventFeedbackError {
fn description(&self) -> &str {
match *self {
AdminUpdateAuthEventFeedbackError::InternalError(ref cause) => cause,
AdminUpdateAuthEventFeedbackError::InvalidParameter(ref cause) => cause,
AdminUpdateAuthEventFeedbackError::NotAuthorized(ref cause) => cause,
AdminUpdateAuthEventFeedbackError::ResourceNotFound(ref cause) => cause,
AdminUpdateAuthEventFeedbackError::TooManyRequests(ref cause) => cause,
AdminUpdateAuthEventFeedbackError::UserNotFound(ref cause) => cause,
AdminUpdateAuthEventFeedbackError::UserPoolAddOnNotEnabled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminUpdateDeviceStatusError {
InternalError(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminUpdateDeviceStatusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminUpdateDeviceStatusError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminUpdateDeviceStatusError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminUpdateDeviceStatusError::InvalidParameter(
err.msg,
))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(
AdminUpdateDeviceStatusError::InvalidUserPoolConfiguration(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminUpdateDeviceStatusError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminUpdateDeviceStatusError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminUpdateDeviceStatusError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminUpdateDeviceStatusError::UserNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminUpdateDeviceStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminUpdateDeviceStatusError {
fn description(&self) -> &str {
match *self {
AdminUpdateDeviceStatusError::InternalError(ref cause) => cause,
AdminUpdateDeviceStatusError::InvalidParameter(ref cause) => cause,
AdminUpdateDeviceStatusError::InvalidUserPoolConfiguration(ref cause) => cause,
AdminUpdateDeviceStatusError::NotAuthorized(ref cause) => cause,
AdminUpdateDeviceStatusError::ResourceNotFound(ref cause) => cause,
AdminUpdateDeviceStatusError::TooManyRequests(ref cause) => cause,
AdminUpdateDeviceStatusError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminUpdateUserAttributesError {
AliasExists(String),
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotFound(String),
}
impl AdminUpdateUserAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminUpdateUserAttributesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AliasExistsException" => {
return RusotoError::Service(AdminUpdateUserAttributesError::AliasExists(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(AdminUpdateUserAttributesError::InternalError(
err.msg,
))
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(
AdminUpdateUserAttributesError::InvalidEmailRoleAccessPolicy(err.msg),
)
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(
AdminUpdateUserAttributesError::InvalidLambdaResponse(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(AdminUpdateUserAttributesError::InvalidParameter(
err.msg,
))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(
AdminUpdateUserAttributesError::InvalidSmsRoleAccessPolicy(err.msg),
)
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
AdminUpdateUserAttributesError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminUpdateUserAttributesError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminUpdateUserAttributesError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminUpdateUserAttributesError::TooManyRequests(
err.msg,
))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(AdminUpdateUserAttributesError::UnexpectedLambda(
err.msg,
))
}
"UserLambdaValidationException" => {
return RusotoError::Service(
AdminUpdateUserAttributesError::UserLambdaValidation(err.msg),
)
}
"UserNotFoundException" => {
return RusotoError::Service(AdminUpdateUserAttributesError::UserNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminUpdateUserAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminUpdateUserAttributesError {
fn description(&self) -> &str {
match *self {
AdminUpdateUserAttributesError::AliasExists(ref cause) => cause,
AdminUpdateUserAttributesError::InternalError(ref cause) => cause,
AdminUpdateUserAttributesError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
AdminUpdateUserAttributesError::InvalidLambdaResponse(ref cause) => cause,
AdminUpdateUserAttributesError::InvalidParameter(ref cause) => cause,
AdminUpdateUserAttributesError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
AdminUpdateUserAttributesError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
AdminUpdateUserAttributesError::NotAuthorized(ref cause) => cause,
AdminUpdateUserAttributesError::ResourceNotFound(ref cause) => cause,
AdminUpdateUserAttributesError::TooManyRequests(ref cause) => cause,
AdminUpdateUserAttributesError::UnexpectedLambda(ref cause) => cause,
AdminUpdateUserAttributesError::UserLambdaValidation(ref cause) => cause,
AdminUpdateUserAttributesError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AdminUserGlobalSignOutError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
}
impl AdminUserGlobalSignOutError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AdminUserGlobalSignOutError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AdminUserGlobalSignOutError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AdminUserGlobalSignOutError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AdminUserGlobalSignOutError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AdminUserGlobalSignOutError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(AdminUserGlobalSignOutError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(AdminUserGlobalSignOutError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AdminUserGlobalSignOutError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AdminUserGlobalSignOutError {
fn description(&self) -> &str {
match *self {
AdminUserGlobalSignOutError::InternalError(ref cause) => cause,
AdminUserGlobalSignOutError::InvalidParameter(ref cause) => cause,
AdminUserGlobalSignOutError::NotAuthorized(ref cause) => cause,
AdminUserGlobalSignOutError::ResourceNotFound(ref cause) => cause,
AdminUserGlobalSignOutError::TooManyRequests(ref cause) => cause,
AdminUserGlobalSignOutError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateSoftwareTokenError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
SoftwareTokenMFANotFound(String),
}
impl AssociateSoftwareTokenError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateSoftwareTokenError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(AssociateSoftwareTokenError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AssociateSoftwareTokenError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(AssociateSoftwareTokenError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AssociateSoftwareTokenError::ResourceNotFound(
err.msg,
))
}
"SoftwareTokenMFANotFoundException" => {
return RusotoError::Service(
AssociateSoftwareTokenError::SoftwareTokenMFANotFound(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateSoftwareTokenError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateSoftwareTokenError {
fn description(&self) -> &str {
match *self {
AssociateSoftwareTokenError::InternalError(ref cause) => cause,
AssociateSoftwareTokenError::InvalidParameter(ref cause) => cause,
AssociateSoftwareTokenError::NotAuthorized(ref cause) => cause,
AssociateSoftwareTokenError::ResourceNotFound(ref cause) => cause,
AssociateSoftwareTokenError::SoftwareTokenMFANotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ChangePasswordError {
InternalError(String),
InvalidParameter(String),
InvalidPassword(String),
LimitExceeded(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl ChangePasswordError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ChangePasswordError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ChangePasswordError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ChangePasswordError::InvalidParameter(err.msg))
}
"InvalidPasswordException" => {
return RusotoError::Service(ChangePasswordError::InvalidPassword(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ChangePasswordError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(ChangePasswordError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(ChangePasswordError::PasswordResetRequired(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ChangePasswordError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ChangePasswordError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(ChangePasswordError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(ChangePasswordError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
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::InternalError(ref cause) => cause,
ChangePasswordError::InvalidParameter(ref cause) => cause,
ChangePasswordError::InvalidPassword(ref cause) => cause,
ChangePasswordError::LimitExceeded(ref cause) => cause,
ChangePasswordError::NotAuthorized(ref cause) => cause,
ChangePasswordError::PasswordResetRequired(ref cause) => cause,
ChangePasswordError::ResourceNotFound(ref cause) => cause,
ChangePasswordError::TooManyRequests(ref cause) => cause,
ChangePasswordError::UserNotConfirmed(ref cause) => cause,
ChangePasswordError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ConfirmDeviceError {
InternalError(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidPassword(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
UsernameExists(String),
}
impl ConfirmDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ConfirmDeviceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ConfirmDeviceError::InternalError(err.msg))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(ConfirmDeviceError::InvalidLambdaResponse(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ConfirmDeviceError::InvalidParameter(err.msg))
}
"InvalidPasswordException" => {
return RusotoError::Service(ConfirmDeviceError::InvalidPassword(err.msg))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(ConfirmDeviceError::InvalidUserPoolConfiguration(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(ConfirmDeviceError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(ConfirmDeviceError::PasswordResetRequired(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ConfirmDeviceError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ConfirmDeviceError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(ConfirmDeviceError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(ConfirmDeviceError::UserNotFound(err.msg))
}
"UsernameExistsException" => {
return RusotoError::Service(ConfirmDeviceError::UsernameExists(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ConfirmDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ConfirmDeviceError {
fn description(&self) -> &str {
match *self {
ConfirmDeviceError::InternalError(ref cause) => cause,
ConfirmDeviceError::InvalidLambdaResponse(ref cause) => cause,
ConfirmDeviceError::InvalidParameter(ref cause) => cause,
ConfirmDeviceError::InvalidPassword(ref cause) => cause,
ConfirmDeviceError::InvalidUserPoolConfiguration(ref cause) => cause,
ConfirmDeviceError::NotAuthorized(ref cause) => cause,
ConfirmDeviceError::PasswordResetRequired(ref cause) => cause,
ConfirmDeviceError::ResourceNotFound(ref cause) => cause,
ConfirmDeviceError::TooManyRequests(ref cause) => cause,
ConfirmDeviceError::UserNotConfirmed(ref cause) => cause,
ConfirmDeviceError::UserNotFound(ref cause) => cause,
ConfirmDeviceError::UsernameExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ConfirmForgotPasswordError {
CodeMismatch(String),
ExpiredCode(String),
InternalError(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidPassword(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyFailedAttempts(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl ConfirmForgotPasswordError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ConfirmForgotPasswordError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CodeMismatchException" => {
return RusotoError::Service(ConfirmForgotPasswordError::CodeMismatch(err.msg))
}
"ExpiredCodeException" => {
return RusotoError::Service(ConfirmForgotPasswordError::ExpiredCode(err.msg))
}
"InternalErrorException" => {
return RusotoError::Service(ConfirmForgotPasswordError::InternalError(err.msg))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(ConfirmForgotPasswordError::InvalidLambdaResponse(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(ConfirmForgotPasswordError::InvalidParameter(
err.msg,
))
}
"InvalidPasswordException" => {
return RusotoError::Service(ConfirmForgotPasswordError::InvalidPassword(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ConfirmForgotPasswordError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(ConfirmForgotPasswordError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ConfirmForgotPasswordError::ResourceNotFound(
err.msg,
))
}
"TooManyFailedAttemptsException" => {
return RusotoError::Service(ConfirmForgotPasswordError::TooManyFailedAttempts(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ConfirmForgotPasswordError::TooManyRequests(
err.msg,
))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(ConfirmForgotPasswordError::UnexpectedLambda(
err.msg,
))
}
"UserLambdaValidationException" => {
return RusotoError::Service(ConfirmForgotPasswordError::UserLambdaValidation(
err.msg,
))
}
"UserNotConfirmedException" => {
return RusotoError::Service(ConfirmForgotPasswordError::UserNotConfirmed(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(ConfirmForgotPasswordError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ConfirmForgotPasswordError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ConfirmForgotPasswordError {
fn description(&self) -> &str {
match *self {
ConfirmForgotPasswordError::CodeMismatch(ref cause) => cause,
ConfirmForgotPasswordError::ExpiredCode(ref cause) => cause,
ConfirmForgotPasswordError::InternalError(ref cause) => cause,
ConfirmForgotPasswordError::InvalidLambdaResponse(ref cause) => cause,
ConfirmForgotPasswordError::InvalidParameter(ref cause) => cause,
ConfirmForgotPasswordError::InvalidPassword(ref cause) => cause,
ConfirmForgotPasswordError::LimitExceeded(ref cause) => cause,
ConfirmForgotPasswordError::NotAuthorized(ref cause) => cause,
ConfirmForgotPasswordError::ResourceNotFound(ref cause) => cause,
ConfirmForgotPasswordError::TooManyFailedAttempts(ref cause) => cause,
ConfirmForgotPasswordError::TooManyRequests(ref cause) => cause,
ConfirmForgotPasswordError::UnexpectedLambda(ref cause) => cause,
ConfirmForgotPasswordError::UserLambdaValidation(ref cause) => cause,
ConfirmForgotPasswordError::UserNotConfirmed(ref cause) => cause,
ConfirmForgotPasswordError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ConfirmSignUpError {
AliasExists(String),
CodeMismatch(String),
ExpiredCode(String),
InternalError(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyFailedAttempts(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotFound(String),
}
impl ConfirmSignUpError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ConfirmSignUpError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AliasExistsException" => {
return RusotoError::Service(ConfirmSignUpError::AliasExists(err.msg))
}
"CodeMismatchException" => {
return RusotoError::Service(ConfirmSignUpError::CodeMismatch(err.msg))
}
"ExpiredCodeException" => {
return RusotoError::Service(ConfirmSignUpError::ExpiredCode(err.msg))
}
"InternalErrorException" => {
return RusotoError::Service(ConfirmSignUpError::InternalError(err.msg))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(ConfirmSignUpError::InvalidLambdaResponse(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ConfirmSignUpError::InvalidParameter(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ConfirmSignUpError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(ConfirmSignUpError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ConfirmSignUpError::ResourceNotFound(err.msg))
}
"TooManyFailedAttemptsException" => {
return RusotoError::Service(ConfirmSignUpError::TooManyFailedAttempts(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ConfirmSignUpError::TooManyRequests(err.msg))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(ConfirmSignUpError::UnexpectedLambda(err.msg))
}
"UserLambdaValidationException" => {
return RusotoError::Service(ConfirmSignUpError::UserLambdaValidation(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(ConfirmSignUpError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ConfirmSignUpError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ConfirmSignUpError {
fn description(&self) -> &str {
match *self {
ConfirmSignUpError::AliasExists(ref cause) => cause,
ConfirmSignUpError::CodeMismatch(ref cause) => cause,
ConfirmSignUpError::ExpiredCode(ref cause) => cause,
ConfirmSignUpError::InternalError(ref cause) => cause,
ConfirmSignUpError::InvalidLambdaResponse(ref cause) => cause,
ConfirmSignUpError::InvalidParameter(ref cause) => cause,
ConfirmSignUpError::LimitExceeded(ref cause) => cause,
ConfirmSignUpError::NotAuthorized(ref cause) => cause,
ConfirmSignUpError::ResourceNotFound(ref cause) => cause,
ConfirmSignUpError::TooManyFailedAttempts(ref cause) => cause,
ConfirmSignUpError::TooManyRequests(ref cause) => cause,
ConfirmSignUpError::UnexpectedLambda(ref cause) => cause,
ConfirmSignUpError::UserLambdaValidation(ref cause) => cause,
ConfirmSignUpError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateGroupError {
GroupExists(String),
InternalError(String),
InvalidParameter(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl CreateGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"GroupExistsException" => {
return RusotoError::Service(CreateGroupError::GroupExists(err.msg))
}
"InternalErrorException" => {
return RusotoError::Service(CreateGroupError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateGroupError::InvalidParameter(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateGroupError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(CreateGroupError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateGroupError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateGroupError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
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::GroupExists(ref cause) => cause,
CreateGroupError::InternalError(ref cause) => cause,
CreateGroupError::InvalidParameter(ref cause) => cause,
CreateGroupError::LimitExceeded(ref cause) => cause,
CreateGroupError::NotAuthorized(ref cause) => cause,
CreateGroupError::ResourceNotFound(ref cause) => cause,
CreateGroupError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateIdentityProviderError {
DuplicateProvider(String),
InternalError(String),
InvalidParameter(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl CreateIdentityProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateIdentityProviderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DuplicateProviderException" => {
return RusotoError::Service(CreateIdentityProviderError::DuplicateProvider(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(CreateIdentityProviderError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateIdentityProviderError::InvalidParameter(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateIdentityProviderError::LimitExceeded(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(CreateIdentityProviderError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateIdentityProviderError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateIdentityProviderError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateIdentityProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateIdentityProviderError {
fn description(&self) -> &str {
match *self {
CreateIdentityProviderError::DuplicateProvider(ref cause) => cause,
CreateIdentityProviderError::InternalError(ref cause) => cause,
CreateIdentityProviderError::InvalidParameter(ref cause) => cause,
CreateIdentityProviderError::LimitExceeded(ref cause) => cause,
CreateIdentityProviderError::NotAuthorized(ref cause) => cause,
CreateIdentityProviderError::ResourceNotFound(ref cause) => cause,
CreateIdentityProviderError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateResourceServerError {
InternalError(String),
InvalidParameter(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl CreateResourceServerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateResourceServerError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(CreateResourceServerError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateResourceServerError::InvalidParameter(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateResourceServerError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(CreateResourceServerError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateResourceServerError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateResourceServerError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateResourceServerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateResourceServerError {
fn description(&self) -> &str {
match *self {
CreateResourceServerError::InternalError(ref cause) => cause,
CreateResourceServerError::InvalidParameter(ref cause) => cause,
CreateResourceServerError::LimitExceeded(ref cause) => cause,
CreateResourceServerError::NotAuthorized(ref cause) => cause,
CreateResourceServerError::ResourceNotFound(ref cause) => cause,
CreateResourceServerError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateUserImportJobError {
InternalError(String),
InvalidParameter(String),
LimitExceeded(String),
NotAuthorized(String),
PreconditionNotMet(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl CreateUserImportJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserImportJobError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(CreateUserImportJobError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateUserImportJobError::InvalidParameter(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateUserImportJobError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(CreateUserImportJobError::NotAuthorized(err.msg))
}
"PreconditionNotMetException" => {
return RusotoError::Service(CreateUserImportJobError::PreconditionNotMet(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateUserImportJobError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateUserImportJobError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateUserImportJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUserImportJobError {
fn description(&self) -> &str {
match *self {
CreateUserImportJobError::InternalError(ref cause) => cause,
CreateUserImportJobError::InvalidParameter(ref cause) => cause,
CreateUserImportJobError::LimitExceeded(ref cause) => cause,
CreateUserImportJobError::NotAuthorized(ref cause) => cause,
CreateUserImportJobError::PreconditionNotMet(ref cause) => cause,
CreateUserImportJobError::ResourceNotFound(ref cause) => cause,
CreateUserImportJobError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateUserPoolError {
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
LimitExceeded(String),
NotAuthorized(String),
TooManyRequests(String),
UserPoolTagging(String),
}
impl CreateUserPoolError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserPoolError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(CreateUserPoolError::InternalError(err.msg))
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(CreateUserPoolError::InvalidEmailRoleAccessPolicy(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateUserPoolError::InvalidParameter(err.msg))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(CreateUserPoolError::InvalidSmsRoleAccessPolicy(
err.msg,
))
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
CreateUserPoolError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"LimitExceededException" => {
return RusotoError::Service(CreateUserPoolError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(CreateUserPoolError::NotAuthorized(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateUserPoolError::TooManyRequests(err.msg))
}
"UserPoolTaggingException" => {
return RusotoError::Service(CreateUserPoolError::UserPoolTagging(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateUserPoolError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUserPoolError {
fn description(&self) -> &str {
match *self {
CreateUserPoolError::InternalError(ref cause) => cause,
CreateUserPoolError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
CreateUserPoolError::InvalidParameter(ref cause) => cause,
CreateUserPoolError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
CreateUserPoolError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
CreateUserPoolError::LimitExceeded(ref cause) => cause,
CreateUserPoolError::NotAuthorized(ref cause) => cause,
CreateUserPoolError::TooManyRequests(ref cause) => cause,
CreateUserPoolError::UserPoolTagging(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateUserPoolClientError {
InternalError(String),
InvalidOAuthFlow(String),
InvalidParameter(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
ScopeDoesNotExist(String),
TooManyRequests(String),
}
impl CreateUserPoolClientError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserPoolClientError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(CreateUserPoolClientError::InternalError(err.msg))
}
"InvalidOAuthFlowException" => {
return RusotoError::Service(CreateUserPoolClientError::InvalidOAuthFlow(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateUserPoolClientError::InvalidParameter(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateUserPoolClientError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(CreateUserPoolClientError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateUserPoolClientError::ResourceNotFound(
err.msg,
))
}
"ScopeDoesNotExistException" => {
return RusotoError::Service(CreateUserPoolClientError::ScopeDoesNotExist(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateUserPoolClientError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateUserPoolClientError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUserPoolClientError {
fn description(&self) -> &str {
match *self {
CreateUserPoolClientError::InternalError(ref cause) => cause,
CreateUserPoolClientError::InvalidOAuthFlow(ref cause) => cause,
CreateUserPoolClientError::InvalidParameter(ref cause) => cause,
CreateUserPoolClientError::LimitExceeded(ref cause) => cause,
CreateUserPoolClientError::NotAuthorized(ref cause) => cause,
CreateUserPoolClientError::ResourceNotFound(ref cause) => cause,
CreateUserPoolClientError::ScopeDoesNotExist(ref cause) => cause,
CreateUserPoolClientError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateUserPoolDomainError {
InternalError(String),
InvalidParameter(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
}
impl CreateUserPoolDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserPoolDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(CreateUserPoolDomainError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateUserPoolDomainError::InvalidParameter(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateUserPoolDomainError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(CreateUserPoolDomainError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateUserPoolDomainError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateUserPoolDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUserPoolDomainError {
fn description(&self) -> &str {
match *self {
CreateUserPoolDomainError::InternalError(ref cause) => cause,
CreateUserPoolDomainError::InvalidParameter(ref cause) => cause,
CreateUserPoolDomainError::LimitExceeded(ref cause) => cause,
CreateUserPoolDomainError::NotAuthorized(ref cause) => cause,
CreateUserPoolDomainError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteGroupError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl DeleteGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DeleteGroupError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteGroupError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(DeleteGroupError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteGroupError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteGroupError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
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::InternalError(ref cause) => cause,
DeleteGroupError::InvalidParameter(ref cause) => cause,
DeleteGroupError::NotAuthorized(ref cause) => cause,
DeleteGroupError::ResourceNotFound(ref cause) => cause,
DeleteGroupError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteIdentityProviderError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UnsupportedIdentityProvider(String),
}
impl DeleteIdentityProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteIdentityProviderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DeleteIdentityProviderError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteIdentityProviderError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DeleteIdentityProviderError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteIdentityProviderError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteIdentityProviderError::TooManyRequests(
err.msg,
))
}
"UnsupportedIdentityProviderException" => {
return RusotoError::Service(
DeleteIdentityProviderError::UnsupportedIdentityProvider(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteIdentityProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteIdentityProviderError {
fn description(&self) -> &str {
match *self {
DeleteIdentityProviderError::InternalError(ref cause) => cause,
DeleteIdentityProviderError::InvalidParameter(ref cause) => cause,
DeleteIdentityProviderError::NotAuthorized(ref cause) => cause,
DeleteIdentityProviderError::ResourceNotFound(ref cause) => cause,
DeleteIdentityProviderError::TooManyRequests(ref cause) => cause,
DeleteIdentityProviderError::UnsupportedIdentityProvider(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteResourceServerError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl DeleteResourceServerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteResourceServerError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DeleteResourceServerError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteResourceServerError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DeleteResourceServerError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteResourceServerError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteResourceServerError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteResourceServerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteResourceServerError {
fn description(&self) -> &str {
match *self {
DeleteResourceServerError::InternalError(ref cause) => cause,
DeleteResourceServerError::InvalidParameter(ref cause) => cause,
DeleteResourceServerError::NotAuthorized(ref cause) => cause,
DeleteResourceServerError::ResourceNotFound(ref cause) => cause,
DeleteResourceServerError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl DeleteUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DeleteUserError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteUserError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(DeleteUserError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(DeleteUserError::PasswordResetRequired(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteUserError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteUserError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(DeleteUserError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(DeleteUserError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
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::InternalError(ref cause) => cause,
DeleteUserError::InvalidParameter(ref cause) => cause,
DeleteUserError::NotAuthorized(ref cause) => cause,
DeleteUserError::PasswordResetRequired(ref cause) => cause,
DeleteUserError::ResourceNotFound(ref cause) => cause,
DeleteUserError::TooManyRequests(ref cause) => cause,
DeleteUserError::UserNotConfirmed(ref cause) => cause,
DeleteUserError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserAttributesError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl DeleteUserAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserAttributesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DeleteUserAttributesError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteUserAttributesError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DeleteUserAttributesError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(DeleteUserAttributesError::PasswordResetRequired(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteUserAttributesError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteUserAttributesError::TooManyRequests(
err.msg,
))
}
"UserNotConfirmedException" => {
return RusotoError::Service(DeleteUserAttributesError::UserNotConfirmed(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(DeleteUserAttributesError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteUserAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUserAttributesError {
fn description(&self) -> &str {
match *self {
DeleteUserAttributesError::InternalError(ref cause) => cause,
DeleteUserAttributesError::InvalidParameter(ref cause) => cause,
DeleteUserAttributesError::NotAuthorized(ref cause) => cause,
DeleteUserAttributesError::PasswordResetRequired(ref cause) => cause,
DeleteUserAttributesError::ResourceNotFound(ref cause) => cause,
DeleteUserAttributesError::TooManyRequests(ref cause) => cause,
DeleteUserAttributesError::UserNotConfirmed(ref cause) => cause,
DeleteUserAttributesError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserPoolError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserImportInProgress(String),
}
impl DeleteUserPoolError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserPoolError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DeleteUserPoolError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteUserPoolError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(DeleteUserPoolError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteUserPoolError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteUserPoolError::TooManyRequests(err.msg))
}
"UserImportInProgressException" => {
return RusotoError::Service(DeleteUserPoolError::UserImportInProgress(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteUserPoolError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUserPoolError {
fn description(&self) -> &str {
match *self {
DeleteUserPoolError::InternalError(ref cause) => cause,
DeleteUserPoolError::InvalidParameter(ref cause) => cause,
DeleteUserPoolError::NotAuthorized(ref cause) => cause,
DeleteUserPoolError::ResourceNotFound(ref cause) => cause,
DeleteUserPoolError::TooManyRequests(ref cause) => cause,
DeleteUserPoolError::UserImportInProgress(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserPoolClientError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl DeleteUserPoolClientError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserPoolClientError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DeleteUserPoolClientError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteUserPoolClientError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DeleteUserPoolClientError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteUserPoolClientError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteUserPoolClientError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteUserPoolClientError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUserPoolClientError {
fn description(&self) -> &str {
match *self {
DeleteUserPoolClientError::InternalError(ref cause) => cause,
DeleteUserPoolClientError::InvalidParameter(ref cause) => cause,
DeleteUserPoolClientError::NotAuthorized(ref cause) => cause,
DeleteUserPoolClientError::ResourceNotFound(ref cause) => cause,
DeleteUserPoolClientError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserPoolDomainError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
}
impl DeleteUserPoolDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserPoolDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DeleteUserPoolDomainError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteUserPoolDomainError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DeleteUserPoolDomainError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteUserPoolDomainError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteUserPoolDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUserPoolDomainError {
fn description(&self) -> &str {
match *self {
DeleteUserPoolDomainError::InternalError(ref cause) => cause,
DeleteUserPoolDomainError::InvalidParameter(ref cause) => cause,
DeleteUserPoolDomainError::NotAuthorized(ref cause) => cause,
DeleteUserPoolDomainError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeIdentityProviderError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl DescribeIdentityProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeIdentityProviderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DescribeIdentityProviderError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeIdentityProviderError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DescribeIdentityProviderError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeIdentityProviderError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeIdentityProviderError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeIdentityProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeIdentityProviderError {
fn description(&self) -> &str {
match *self {
DescribeIdentityProviderError::InternalError(ref cause) => cause,
DescribeIdentityProviderError::InvalidParameter(ref cause) => cause,
DescribeIdentityProviderError::NotAuthorized(ref cause) => cause,
DescribeIdentityProviderError::ResourceNotFound(ref cause) => cause,
DescribeIdentityProviderError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeResourceServerError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl DescribeResourceServerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeResourceServerError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DescribeResourceServerError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeResourceServerError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DescribeResourceServerError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeResourceServerError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeResourceServerError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeResourceServerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeResourceServerError {
fn description(&self) -> &str {
match *self {
DescribeResourceServerError::InternalError(ref cause) => cause,
DescribeResourceServerError::InvalidParameter(ref cause) => cause,
DescribeResourceServerError::NotAuthorized(ref cause) => cause,
DescribeResourceServerError::ResourceNotFound(ref cause) => cause,
DescribeResourceServerError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeRiskConfigurationError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserPoolAddOnNotEnabled(String),
}
impl DescribeRiskConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRiskConfigurationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DescribeRiskConfigurationError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeRiskConfigurationError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DescribeRiskConfigurationError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeRiskConfigurationError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeRiskConfigurationError::TooManyRequests(
err.msg,
))
}
"UserPoolAddOnNotEnabledException" => {
return RusotoError::Service(
DescribeRiskConfigurationError::UserPoolAddOnNotEnabled(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeRiskConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeRiskConfigurationError {
fn description(&self) -> &str {
match *self {
DescribeRiskConfigurationError::InternalError(ref cause) => cause,
DescribeRiskConfigurationError::InvalidParameter(ref cause) => cause,
DescribeRiskConfigurationError::NotAuthorized(ref cause) => cause,
DescribeRiskConfigurationError::ResourceNotFound(ref cause) => cause,
DescribeRiskConfigurationError::TooManyRequests(ref cause) => cause,
DescribeRiskConfigurationError::UserPoolAddOnNotEnabled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeUserImportJobError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl DescribeUserImportJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUserImportJobError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DescribeUserImportJobError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeUserImportJobError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DescribeUserImportJobError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeUserImportJobError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeUserImportJobError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeUserImportJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeUserImportJobError {
fn description(&self) -> &str {
match *self {
DescribeUserImportJobError::InternalError(ref cause) => cause,
DescribeUserImportJobError::InvalidParameter(ref cause) => cause,
DescribeUserImportJobError::NotAuthorized(ref cause) => cause,
DescribeUserImportJobError::ResourceNotFound(ref cause) => cause,
DescribeUserImportJobError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeUserPoolError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserPoolTagging(String),
}
impl DescribeUserPoolError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUserPoolError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DescribeUserPoolError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeUserPoolError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(DescribeUserPoolError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeUserPoolError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeUserPoolError::TooManyRequests(err.msg))
}
"UserPoolTaggingException" => {
return RusotoError::Service(DescribeUserPoolError::UserPoolTagging(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeUserPoolError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeUserPoolError {
fn description(&self) -> &str {
match *self {
DescribeUserPoolError::InternalError(ref cause) => cause,
DescribeUserPoolError::InvalidParameter(ref cause) => cause,
DescribeUserPoolError::NotAuthorized(ref cause) => cause,
DescribeUserPoolError::ResourceNotFound(ref cause) => cause,
DescribeUserPoolError::TooManyRequests(ref cause) => cause,
DescribeUserPoolError::UserPoolTagging(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeUserPoolClientError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl DescribeUserPoolClientError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUserPoolClientError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DescribeUserPoolClientError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeUserPoolClientError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DescribeUserPoolClientError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeUserPoolClientError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeUserPoolClientError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeUserPoolClientError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeUserPoolClientError {
fn description(&self) -> &str {
match *self {
DescribeUserPoolClientError::InternalError(ref cause) => cause,
DescribeUserPoolClientError::InvalidParameter(ref cause) => cause,
DescribeUserPoolClientError::NotAuthorized(ref cause) => cause,
DescribeUserPoolClientError::ResourceNotFound(ref cause) => cause,
DescribeUserPoolClientError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeUserPoolDomainError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
}
impl DescribeUserPoolDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUserPoolDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(DescribeUserPoolDomainError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeUserPoolDomainError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(DescribeUserPoolDomainError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeUserPoolDomainError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeUserPoolDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeUserPoolDomainError {
fn description(&self) -> &str {
match *self {
DescribeUserPoolDomainError::InternalError(ref cause) => cause,
DescribeUserPoolDomainError::InvalidParameter(ref cause) => cause,
DescribeUserPoolDomainError::NotAuthorized(ref cause) => cause,
DescribeUserPoolDomainError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ForgetDeviceError {
InternalError(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl ForgetDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ForgetDeviceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ForgetDeviceError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ForgetDeviceError::InvalidParameter(err.msg))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(ForgetDeviceError::InvalidUserPoolConfiguration(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(ForgetDeviceError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(ForgetDeviceError::PasswordResetRequired(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ForgetDeviceError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ForgetDeviceError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(ForgetDeviceError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(ForgetDeviceError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ForgetDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ForgetDeviceError {
fn description(&self) -> &str {
match *self {
ForgetDeviceError::InternalError(ref cause) => cause,
ForgetDeviceError::InvalidParameter(ref cause) => cause,
ForgetDeviceError::InvalidUserPoolConfiguration(ref cause) => cause,
ForgetDeviceError::NotAuthorized(ref cause) => cause,
ForgetDeviceError::PasswordResetRequired(ref cause) => cause,
ForgetDeviceError::ResourceNotFound(ref cause) => cause,
ForgetDeviceError::TooManyRequests(ref cause) => cause,
ForgetDeviceError::UserNotConfirmed(ref cause) => cause,
ForgetDeviceError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ForgotPasswordError {
CodeDeliveryFailure(String),
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl ForgotPasswordError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ForgotPasswordError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CodeDeliveryFailureException" => {
return RusotoError::Service(ForgotPasswordError::CodeDeliveryFailure(err.msg))
}
"InternalErrorException" => {
return RusotoError::Service(ForgotPasswordError::InternalError(err.msg))
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(ForgotPasswordError::InvalidEmailRoleAccessPolicy(
err.msg,
))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(ForgotPasswordError::InvalidLambdaResponse(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(ForgotPasswordError::InvalidParameter(err.msg))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(ForgotPasswordError::InvalidSmsRoleAccessPolicy(
err.msg,
))
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
ForgotPasswordError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"LimitExceededException" => {
return RusotoError::Service(ForgotPasswordError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(ForgotPasswordError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ForgotPasswordError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ForgotPasswordError::TooManyRequests(err.msg))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(ForgotPasswordError::UnexpectedLambda(err.msg))
}
"UserLambdaValidationException" => {
return RusotoError::Service(ForgotPasswordError::UserLambdaValidation(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(ForgotPasswordError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(ForgotPasswordError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ForgotPasswordError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ForgotPasswordError {
fn description(&self) -> &str {
match *self {
ForgotPasswordError::CodeDeliveryFailure(ref cause) => cause,
ForgotPasswordError::InternalError(ref cause) => cause,
ForgotPasswordError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
ForgotPasswordError::InvalidLambdaResponse(ref cause) => cause,
ForgotPasswordError::InvalidParameter(ref cause) => cause,
ForgotPasswordError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
ForgotPasswordError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
ForgotPasswordError::LimitExceeded(ref cause) => cause,
ForgotPasswordError::NotAuthorized(ref cause) => cause,
ForgotPasswordError::ResourceNotFound(ref cause) => cause,
ForgotPasswordError::TooManyRequests(ref cause) => cause,
ForgotPasswordError::UnexpectedLambda(ref cause) => cause,
ForgotPasswordError::UserLambdaValidation(ref cause) => cause,
ForgotPasswordError::UserNotConfirmed(ref cause) => cause,
ForgotPasswordError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCSVHeaderError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl GetCSVHeaderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCSVHeaderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(GetCSVHeaderError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GetCSVHeaderError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(GetCSVHeaderError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetCSVHeaderError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetCSVHeaderError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetCSVHeaderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCSVHeaderError {
fn description(&self) -> &str {
match *self {
GetCSVHeaderError::InternalError(ref cause) => cause,
GetCSVHeaderError::InvalidParameter(ref cause) => cause,
GetCSVHeaderError::NotAuthorized(ref cause) => cause,
GetCSVHeaderError::ResourceNotFound(ref cause) => cause,
GetCSVHeaderError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDeviceError {
InternalError(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl GetDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDeviceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(GetDeviceError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GetDeviceError::InvalidParameter(err.msg))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(GetDeviceError::InvalidUserPoolConfiguration(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(GetDeviceError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(GetDeviceError::PasswordResetRequired(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetDeviceError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDeviceError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(GetDeviceError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(GetDeviceError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDeviceError {
fn description(&self) -> &str {
match *self {
GetDeviceError::InternalError(ref cause) => cause,
GetDeviceError::InvalidParameter(ref cause) => cause,
GetDeviceError::InvalidUserPoolConfiguration(ref cause) => cause,
GetDeviceError::NotAuthorized(ref cause) => cause,
GetDeviceError::PasswordResetRequired(ref cause) => cause,
GetDeviceError::ResourceNotFound(ref cause) => cause,
GetDeviceError::TooManyRequests(ref cause) => cause,
GetDeviceError::UserNotConfirmed(ref cause) => cause,
GetDeviceError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGroupError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl GetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(GetGroupError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GetGroupError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(GetGroupError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetGroupError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetGroupError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
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::InternalError(ref cause) => cause,
GetGroupError::InvalidParameter(ref cause) => cause,
GetGroupError::NotAuthorized(ref cause) => cause,
GetGroupError::ResourceNotFound(ref cause) => cause,
GetGroupError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIdentityProviderByIdentifierError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl GetIdentityProviderByIdentifierError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetIdentityProviderByIdentifierError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(
GetIdentityProviderByIdentifierError::InternalError(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
GetIdentityProviderByIdentifierError::InvalidParameter(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(
GetIdentityProviderByIdentifierError::NotAuthorized(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
GetIdentityProviderByIdentifierError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
GetIdentityProviderByIdentifierError::TooManyRequests(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetIdentityProviderByIdentifierError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIdentityProviderByIdentifierError {
fn description(&self) -> &str {
match *self {
GetIdentityProviderByIdentifierError::InternalError(ref cause) => cause,
GetIdentityProviderByIdentifierError::InvalidParameter(ref cause) => cause,
GetIdentityProviderByIdentifierError::NotAuthorized(ref cause) => cause,
GetIdentityProviderByIdentifierError::ResourceNotFound(ref cause) => cause,
GetIdentityProviderByIdentifierError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSigningCertificateError {
InternalError(String),
ResourceNotFound(String),
}
impl GetSigningCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSigningCertificateError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(GetSigningCertificateError::InternalError(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetSigningCertificateError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSigningCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSigningCertificateError {
fn description(&self) -> &str {
match *self {
GetSigningCertificateError::InternalError(ref cause) => cause,
GetSigningCertificateError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetUICustomizationError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl GetUICustomizationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUICustomizationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(GetUICustomizationError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GetUICustomizationError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(GetUICustomizationError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetUICustomizationError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetUICustomizationError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetUICustomizationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUICustomizationError {
fn description(&self) -> &str {
match *self {
GetUICustomizationError::InternalError(ref cause) => cause,
GetUICustomizationError::InvalidParameter(ref cause) => cause,
GetUICustomizationError::NotAuthorized(ref cause) => cause,
GetUICustomizationError::ResourceNotFound(ref cause) => cause,
GetUICustomizationError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetUserError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl GetUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(GetUserError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GetUserError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(GetUserError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(GetUserError::PasswordResetRequired(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetUserError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetUserError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(GetUserError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(GetUserError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
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::InternalError(ref cause) => cause,
GetUserError::InvalidParameter(ref cause) => cause,
GetUserError::NotAuthorized(ref cause) => cause,
GetUserError::PasswordResetRequired(ref cause) => cause,
GetUserError::ResourceNotFound(ref cause) => cause,
GetUserError::TooManyRequests(ref cause) => cause,
GetUserError::UserNotConfirmed(ref cause) => cause,
GetUserError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetUserAttributeVerificationCodeError {
CodeDeliveryFailure(String),
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
LimitExceeded(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl GetUserAttributeVerificationCodeError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetUserAttributeVerificationCodeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CodeDeliveryFailureException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::CodeDeliveryFailure(err.msg),
)
}
"InternalErrorException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::InternalError(err.msg),
)
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::InvalidEmailRoleAccessPolicy(
err.msg,
),
)
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::InvalidLambdaResponse(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::InvalidParameter(err.msg),
)
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::InvalidSmsRoleAccessPolicy(err.msg),
)
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::InvalidSmsRoleTrustRelationship(
err.msg,
),
)
}
"LimitExceededException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::LimitExceeded(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::NotAuthorized(err.msg),
)
}
"PasswordResetRequiredException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::PasswordResetRequired(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::TooManyRequests(err.msg),
)
}
"UnexpectedLambdaException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::UnexpectedLambda(err.msg),
)
}
"UserLambdaValidationException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::UserLambdaValidation(err.msg),
)
}
"UserNotConfirmedException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::UserNotConfirmed(err.msg),
)
}
"UserNotFoundException" => {
return RusotoError::Service(
GetUserAttributeVerificationCodeError::UserNotFound(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetUserAttributeVerificationCodeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUserAttributeVerificationCodeError {
fn description(&self) -> &str {
match *self {
GetUserAttributeVerificationCodeError::CodeDeliveryFailure(ref cause) => cause,
GetUserAttributeVerificationCodeError::InternalError(ref cause) => cause,
GetUserAttributeVerificationCodeError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
GetUserAttributeVerificationCodeError::InvalidLambdaResponse(ref cause) => cause,
GetUserAttributeVerificationCodeError::InvalidParameter(ref cause) => cause,
GetUserAttributeVerificationCodeError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
GetUserAttributeVerificationCodeError::InvalidSmsRoleTrustRelationship(ref cause) => {
cause
}
GetUserAttributeVerificationCodeError::LimitExceeded(ref cause) => cause,
GetUserAttributeVerificationCodeError::NotAuthorized(ref cause) => cause,
GetUserAttributeVerificationCodeError::PasswordResetRequired(ref cause) => cause,
GetUserAttributeVerificationCodeError::ResourceNotFound(ref cause) => cause,
GetUserAttributeVerificationCodeError::TooManyRequests(ref cause) => cause,
GetUserAttributeVerificationCodeError::UnexpectedLambda(ref cause) => cause,
GetUserAttributeVerificationCodeError::UserLambdaValidation(ref cause) => cause,
GetUserAttributeVerificationCodeError::UserNotConfirmed(ref cause) => cause,
GetUserAttributeVerificationCodeError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetUserPoolMfaConfigError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl GetUserPoolMfaConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUserPoolMfaConfigError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(GetUserPoolMfaConfigError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GetUserPoolMfaConfigError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(GetUserPoolMfaConfigError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetUserPoolMfaConfigError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetUserPoolMfaConfigError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetUserPoolMfaConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUserPoolMfaConfigError {
fn description(&self) -> &str {
match *self {
GetUserPoolMfaConfigError::InternalError(ref cause) => cause,
GetUserPoolMfaConfigError::InvalidParameter(ref cause) => cause,
GetUserPoolMfaConfigError::NotAuthorized(ref cause) => cause,
GetUserPoolMfaConfigError::ResourceNotFound(ref cause) => cause,
GetUserPoolMfaConfigError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GlobalSignOutError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
}
impl GlobalSignOutError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GlobalSignOutError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(GlobalSignOutError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GlobalSignOutError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(GlobalSignOutError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(GlobalSignOutError::PasswordResetRequired(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GlobalSignOutError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GlobalSignOutError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(GlobalSignOutError::UserNotConfirmed(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GlobalSignOutError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GlobalSignOutError {
fn description(&self) -> &str {
match *self {
GlobalSignOutError::InternalError(ref cause) => cause,
GlobalSignOutError::InvalidParameter(ref cause) => cause,
GlobalSignOutError::NotAuthorized(ref cause) => cause,
GlobalSignOutError::PasswordResetRequired(ref cause) => cause,
GlobalSignOutError::ResourceNotFound(ref cause) => cause,
GlobalSignOutError::TooManyRequests(ref cause) => cause,
GlobalSignOutError::UserNotConfirmed(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum InitiateAuthError {
InternalError(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl InitiateAuthError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<InitiateAuthError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(InitiateAuthError::InternalError(err.msg))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(InitiateAuthError::InvalidLambdaResponse(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(InitiateAuthError::InvalidParameter(err.msg))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(InitiateAuthError::InvalidUserPoolConfiguration(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(InitiateAuthError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(InitiateAuthError::PasswordResetRequired(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(InitiateAuthError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(InitiateAuthError::TooManyRequests(err.msg))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(InitiateAuthError::UnexpectedLambda(err.msg))
}
"UserLambdaValidationException" => {
return RusotoError::Service(InitiateAuthError::UserLambdaValidation(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(InitiateAuthError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(InitiateAuthError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for InitiateAuthError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for InitiateAuthError {
fn description(&self) -> &str {
match *self {
InitiateAuthError::InternalError(ref cause) => cause,
InitiateAuthError::InvalidLambdaResponse(ref cause) => cause,
InitiateAuthError::InvalidParameter(ref cause) => cause,
InitiateAuthError::InvalidUserPoolConfiguration(ref cause) => cause,
InitiateAuthError::NotAuthorized(ref cause) => cause,
InitiateAuthError::PasswordResetRequired(ref cause) => cause,
InitiateAuthError::ResourceNotFound(ref cause) => cause,
InitiateAuthError::TooManyRequests(ref cause) => cause,
InitiateAuthError::UnexpectedLambda(ref cause) => cause,
InitiateAuthError::UserLambdaValidation(ref cause) => cause,
InitiateAuthError::UserNotConfirmed(ref cause) => cause,
InitiateAuthError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDevicesError {
InternalError(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl ListDevicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDevicesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListDevicesError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListDevicesError::InvalidParameter(err.msg))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(ListDevicesError::InvalidUserPoolConfiguration(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListDevicesError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(ListDevicesError::PasswordResetRequired(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListDevicesError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListDevicesError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(ListDevicesError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(ListDevicesError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDevicesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDevicesError {
fn description(&self) -> &str {
match *self {
ListDevicesError::InternalError(ref cause) => cause,
ListDevicesError::InvalidParameter(ref cause) => cause,
ListDevicesError::InvalidUserPoolConfiguration(ref cause) => cause,
ListDevicesError::NotAuthorized(ref cause) => cause,
ListDevicesError::PasswordResetRequired(ref cause) => cause,
ListDevicesError::ResourceNotFound(ref cause) => cause,
ListDevicesError::TooManyRequests(ref cause) => cause,
ListDevicesError::UserNotConfirmed(ref cause) => cause,
ListDevicesError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListGroupsError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl ListGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGroupsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListGroupsError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListGroupsError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListGroupsError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListGroupsError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListGroupsError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
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::InternalError(ref cause) => cause,
ListGroupsError::InvalidParameter(ref cause) => cause,
ListGroupsError::NotAuthorized(ref cause) => cause,
ListGroupsError::ResourceNotFound(ref cause) => cause,
ListGroupsError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListIdentityProvidersError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl ListIdentityProvidersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListIdentityProvidersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListIdentityProvidersError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListIdentityProvidersError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListIdentityProvidersError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListIdentityProvidersError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListIdentityProvidersError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListIdentityProvidersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListIdentityProvidersError {
fn description(&self) -> &str {
match *self {
ListIdentityProvidersError::InternalError(ref cause) => cause,
ListIdentityProvidersError::InvalidParameter(ref cause) => cause,
ListIdentityProvidersError::NotAuthorized(ref cause) => cause,
ListIdentityProvidersError::ResourceNotFound(ref cause) => cause,
ListIdentityProvidersError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListResourceServersError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl ListResourceServersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListResourceServersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListResourceServersError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListResourceServersError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListResourceServersError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListResourceServersError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListResourceServersError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListResourceServersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListResourceServersError {
fn description(&self) -> &str {
match *self {
ListResourceServersError::InternalError(ref cause) => cause,
ListResourceServersError::InvalidParameter(ref cause) => cause,
ListResourceServersError::NotAuthorized(ref cause) => cause,
ListResourceServersError::ResourceNotFound(ref cause) => cause,
ListResourceServersError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListTagsForResourceError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListTagsForResourceError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListTagsForResourceError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::InternalError(ref cause) => cause,
ListTagsForResourceError::InvalidParameter(ref cause) => cause,
ListTagsForResourceError::NotAuthorized(ref cause) => cause,
ListTagsForResourceError::ResourceNotFound(ref cause) => cause,
ListTagsForResourceError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListUserImportJobsError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl ListUserImportJobsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUserImportJobsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListUserImportJobsError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListUserImportJobsError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListUserImportJobsError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListUserImportJobsError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListUserImportJobsError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListUserImportJobsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListUserImportJobsError {
fn description(&self) -> &str {
match *self {
ListUserImportJobsError::InternalError(ref cause) => cause,
ListUserImportJobsError::InvalidParameter(ref cause) => cause,
ListUserImportJobsError::NotAuthorized(ref cause) => cause,
ListUserImportJobsError::ResourceNotFound(ref cause) => cause,
ListUserImportJobsError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListUserPoolClientsError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl ListUserPoolClientsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUserPoolClientsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListUserPoolClientsError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListUserPoolClientsError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListUserPoolClientsError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListUserPoolClientsError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListUserPoolClientsError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListUserPoolClientsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListUserPoolClientsError {
fn description(&self) -> &str {
match *self {
ListUserPoolClientsError::InternalError(ref cause) => cause,
ListUserPoolClientsError::InvalidParameter(ref cause) => cause,
ListUserPoolClientsError::NotAuthorized(ref cause) => cause,
ListUserPoolClientsError::ResourceNotFound(ref cause) => cause,
ListUserPoolClientsError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListUserPoolsError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
TooManyRequests(String),
}
impl ListUserPoolsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUserPoolsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListUserPoolsError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListUserPoolsError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListUserPoolsError::NotAuthorized(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListUserPoolsError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListUserPoolsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListUserPoolsError {
fn description(&self) -> &str {
match *self {
ListUserPoolsError::InternalError(ref cause) => cause,
ListUserPoolsError::InvalidParameter(ref cause) => cause,
ListUserPoolsError::NotAuthorized(ref cause) => cause,
ListUserPoolsError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListUsersError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl ListUsersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUsersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListUsersError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListUsersError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListUsersError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListUsersError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListUsersError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
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::InternalError(ref cause) => cause,
ListUsersError::InvalidParameter(ref cause) => cause,
ListUsersError::NotAuthorized(ref cause) => cause,
ListUsersError::ResourceNotFound(ref cause) => cause,
ListUsersError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListUsersInGroupError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl ListUsersInGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUsersInGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(ListUsersInGroupError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListUsersInGroupError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(ListUsersInGroupError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListUsersInGroupError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListUsersInGroupError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListUsersInGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListUsersInGroupError {
fn description(&self) -> &str {
match *self {
ListUsersInGroupError::InternalError(ref cause) => cause,
ListUsersInGroupError::InvalidParameter(ref cause) => cause,
ListUsersInGroupError::NotAuthorized(ref cause) => cause,
ListUsersInGroupError::ResourceNotFound(ref cause) => cause,
ListUsersInGroupError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResendConfirmationCodeError {
CodeDeliveryFailure(String),
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
LimitExceeded(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotFound(String),
}
impl ResendConfirmationCodeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResendConfirmationCodeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CodeDeliveryFailureException" => {
return RusotoError::Service(ResendConfirmationCodeError::CodeDeliveryFailure(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(ResendConfirmationCodeError::InternalError(
err.msg,
))
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(
ResendConfirmationCodeError::InvalidEmailRoleAccessPolicy(err.msg),
)
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(
ResendConfirmationCodeError::InvalidLambdaResponse(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(ResendConfirmationCodeError::InvalidParameter(
err.msg,
))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(
ResendConfirmationCodeError::InvalidSmsRoleAccessPolicy(err.msg),
)
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
ResendConfirmationCodeError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"LimitExceededException" => {
return RusotoError::Service(ResendConfirmationCodeError::LimitExceeded(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(ResendConfirmationCodeError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ResendConfirmationCodeError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ResendConfirmationCodeError::TooManyRequests(
err.msg,
))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(ResendConfirmationCodeError::UnexpectedLambda(
err.msg,
))
}
"UserLambdaValidationException" => {
return RusotoError::Service(ResendConfirmationCodeError::UserLambdaValidation(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(ResendConfirmationCodeError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ResendConfirmationCodeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResendConfirmationCodeError {
fn description(&self) -> &str {
match *self {
ResendConfirmationCodeError::CodeDeliveryFailure(ref cause) => cause,
ResendConfirmationCodeError::InternalError(ref cause) => cause,
ResendConfirmationCodeError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
ResendConfirmationCodeError::InvalidLambdaResponse(ref cause) => cause,
ResendConfirmationCodeError::InvalidParameter(ref cause) => cause,
ResendConfirmationCodeError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
ResendConfirmationCodeError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
ResendConfirmationCodeError::LimitExceeded(ref cause) => cause,
ResendConfirmationCodeError::NotAuthorized(ref cause) => cause,
ResendConfirmationCodeError::ResourceNotFound(ref cause) => cause,
ResendConfirmationCodeError::TooManyRequests(ref cause) => cause,
ResendConfirmationCodeError::UnexpectedLambda(ref cause) => cause,
ResendConfirmationCodeError::UserLambdaValidation(ref cause) => cause,
ResendConfirmationCodeError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RespondToAuthChallengeError {
AliasExists(String),
CodeMismatch(String),
ExpiredCode(String),
InternalError(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidPassword(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
InvalidUserPoolConfiguration(String),
MFAMethodNotFound(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
SoftwareTokenMFANotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl RespondToAuthChallengeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RespondToAuthChallengeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AliasExistsException" => {
return RusotoError::Service(RespondToAuthChallengeError::AliasExists(err.msg))
}
"CodeMismatchException" => {
return RusotoError::Service(RespondToAuthChallengeError::CodeMismatch(err.msg))
}
"ExpiredCodeException" => {
return RusotoError::Service(RespondToAuthChallengeError::ExpiredCode(err.msg))
}
"InternalErrorException" => {
return RusotoError::Service(RespondToAuthChallengeError::InternalError(
err.msg,
))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(
RespondToAuthChallengeError::InvalidLambdaResponse(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(RespondToAuthChallengeError::InvalidParameter(
err.msg,
))
}
"InvalidPasswordException" => {
return RusotoError::Service(RespondToAuthChallengeError::InvalidPassword(
err.msg,
))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(
RespondToAuthChallengeError::InvalidSmsRoleAccessPolicy(err.msg),
)
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
RespondToAuthChallengeError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(
RespondToAuthChallengeError::InvalidUserPoolConfiguration(err.msg),
)
}
"MFAMethodNotFoundException" => {
return RusotoError::Service(RespondToAuthChallengeError::MFAMethodNotFound(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(RespondToAuthChallengeError::NotAuthorized(
err.msg,
))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(
RespondToAuthChallengeError::PasswordResetRequired(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(RespondToAuthChallengeError::ResourceNotFound(
err.msg,
))
}
"SoftwareTokenMFANotFoundException" => {
return RusotoError::Service(
RespondToAuthChallengeError::SoftwareTokenMFANotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(RespondToAuthChallengeError::TooManyRequests(
err.msg,
))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(RespondToAuthChallengeError::UnexpectedLambda(
err.msg,
))
}
"UserLambdaValidationException" => {
return RusotoError::Service(RespondToAuthChallengeError::UserLambdaValidation(
err.msg,
))
}
"UserNotConfirmedException" => {
return RusotoError::Service(RespondToAuthChallengeError::UserNotConfirmed(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(RespondToAuthChallengeError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RespondToAuthChallengeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RespondToAuthChallengeError {
fn description(&self) -> &str {
match *self {
RespondToAuthChallengeError::AliasExists(ref cause) => cause,
RespondToAuthChallengeError::CodeMismatch(ref cause) => cause,
RespondToAuthChallengeError::ExpiredCode(ref cause) => cause,
RespondToAuthChallengeError::InternalError(ref cause) => cause,
RespondToAuthChallengeError::InvalidLambdaResponse(ref cause) => cause,
RespondToAuthChallengeError::InvalidParameter(ref cause) => cause,
RespondToAuthChallengeError::InvalidPassword(ref cause) => cause,
RespondToAuthChallengeError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
RespondToAuthChallengeError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
RespondToAuthChallengeError::InvalidUserPoolConfiguration(ref cause) => cause,
RespondToAuthChallengeError::MFAMethodNotFound(ref cause) => cause,
RespondToAuthChallengeError::NotAuthorized(ref cause) => cause,
RespondToAuthChallengeError::PasswordResetRequired(ref cause) => cause,
RespondToAuthChallengeError::ResourceNotFound(ref cause) => cause,
RespondToAuthChallengeError::SoftwareTokenMFANotFound(ref cause) => cause,
RespondToAuthChallengeError::TooManyRequests(ref cause) => cause,
RespondToAuthChallengeError::UnexpectedLambda(ref cause) => cause,
RespondToAuthChallengeError::UserLambdaValidation(ref cause) => cause,
RespondToAuthChallengeError::UserNotConfirmed(ref cause) => cause,
RespondToAuthChallengeError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetRiskConfigurationError {
CodeDeliveryFailure(String),
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserPoolAddOnNotEnabled(String),
}
impl SetRiskConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetRiskConfigurationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CodeDeliveryFailureException" => {
return RusotoError::Service(SetRiskConfigurationError::CodeDeliveryFailure(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(SetRiskConfigurationError::InternalError(err.msg))
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(
SetRiskConfigurationError::InvalidEmailRoleAccessPolicy(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(SetRiskConfigurationError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(SetRiskConfigurationError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SetRiskConfigurationError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(SetRiskConfigurationError::TooManyRequests(
err.msg,
))
}
"UserPoolAddOnNotEnabledException" => {
return RusotoError::Service(
SetRiskConfigurationError::UserPoolAddOnNotEnabled(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetRiskConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetRiskConfigurationError {
fn description(&self) -> &str {
match *self {
SetRiskConfigurationError::CodeDeliveryFailure(ref cause) => cause,
SetRiskConfigurationError::InternalError(ref cause) => cause,
SetRiskConfigurationError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
SetRiskConfigurationError::InvalidParameter(ref cause) => cause,
SetRiskConfigurationError::NotAuthorized(ref cause) => cause,
SetRiskConfigurationError::ResourceNotFound(ref cause) => cause,
SetRiskConfigurationError::TooManyRequests(ref cause) => cause,
SetRiskConfigurationError::UserPoolAddOnNotEnabled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetUICustomizationError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl SetUICustomizationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetUICustomizationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(SetUICustomizationError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(SetUICustomizationError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(SetUICustomizationError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SetUICustomizationError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(SetUICustomizationError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetUICustomizationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetUICustomizationError {
fn description(&self) -> &str {
match *self {
SetUICustomizationError::InternalError(ref cause) => cause,
SetUICustomizationError::InvalidParameter(ref cause) => cause,
SetUICustomizationError::NotAuthorized(ref cause) => cause,
SetUICustomizationError::ResourceNotFound(ref cause) => cause,
SetUICustomizationError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetUserMFAPreferenceError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl SetUserMFAPreferenceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetUserMFAPreferenceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(SetUserMFAPreferenceError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(SetUserMFAPreferenceError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(SetUserMFAPreferenceError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(SetUserMFAPreferenceError::PasswordResetRequired(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SetUserMFAPreferenceError::ResourceNotFound(
err.msg,
))
}
"UserNotConfirmedException" => {
return RusotoError::Service(SetUserMFAPreferenceError::UserNotConfirmed(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(SetUserMFAPreferenceError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetUserMFAPreferenceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetUserMFAPreferenceError {
fn description(&self) -> &str {
match *self {
SetUserMFAPreferenceError::InternalError(ref cause) => cause,
SetUserMFAPreferenceError::InvalidParameter(ref cause) => cause,
SetUserMFAPreferenceError::NotAuthorized(ref cause) => cause,
SetUserMFAPreferenceError::PasswordResetRequired(ref cause) => cause,
SetUserMFAPreferenceError::ResourceNotFound(ref cause) => cause,
SetUserMFAPreferenceError::UserNotConfirmed(ref cause) => cause,
SetUserMFAPreferenceError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetUserPoolMfaConfigError {
InternalError(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl SetUserPoolMfaConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetUserPoolMfaConfigError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(SetUserPoolMfaConfigError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(SetUserPoolMfaConfigError::InvalidParameter(
err.msg,
))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(
SetUserPoolMfaConfigError::InvalidSmsRoleAccessPolicy(err.msg),
)
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
SetUserPoolMfaConfigError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(SetUserPoolMfaConfigError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SetUserPoolMfaConfigError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(SetUserPoolMfaConfigError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetUserPoolMfaConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetUserPoolMfaConfigError {
fn description(&self) -> &str {
match *self {
SetUserPoolMfaConfigError::InternalError(ref cause) => cause,
SetUserPoolMfaConfigError::InvalidParameter(ref cause) => cause,
SetUserPoolMfaConfigError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
SetUserPoolMfaConfigError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
SetUserPoolMfaConfigError::NotAuthorized(ref cause) => cause,
SetUserPoolMfaConfigError::ResourceNotFound(ref cause) => cause,
SetUserPoolMfaConfigError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetUserSettingsError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl SetUserSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetUserSettingsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(SetUserSettingsError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(SetUserSettingsError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(SetUserSettingsError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(SetUserSettingsError::PasswordResetRequired(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SetUserSettingsError::ResourceNotFound(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(SetUserSettingsError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(SetUserSettingsError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetUserSettingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetUserSettingsError {
fn description(&self) -> &str {
match *self {
SetUserSettingsError::InternalError(ref cause) => cause,
SetUserSettingsError::InvalidParameter(ref cause) => cause,
SetUserSettingsError::NotAuthorized(ref cause) => cause,
SetUserSettingsError::PasswordResetRequired(ref cause) => cause,
SetUserSettingsError::ResourceNotFound(ref cause) => cause,
SetUserSettingsError::UserNotConfirmed(ref cause) => cause,
SetUserSettingsError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SignUpError {
CodeDeliveryFailure(String),
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidPassword(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UsernameExists(String),
}
impl SignUpError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SignUpError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CodeDeliveryFailureException" => {
return RusotoError::Service(SignUpError::CodeDeliveryFailure(err.msg))
}
"InternalErrorException" => {
return RusotoError::Service(SignUpError::InternalError(err.msg))
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(SignUpError::InvalidEmailRoleAccessPolicy(err.msg))
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(SignUpError::InvalidLambdaResponse(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(SignUpError::InvalidParameter(err.msg))
}
"InvalidPasswordException" => {
return RusotoError::Service(SignUpError::InvalidPassword(err.msg))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(SignUpError::InvalidSmsRoleAccessPolicy(err.msg))
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(SignUpError::InvalidSmsRoleTrustRelationship(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(SignUpError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SignUpError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(SignUpError::TooManyRequests(err.msg))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(SignUpError::UnexpectedLambda(err.msg))
}
"UserLambdaValidationException" => {
return RusotoError::Service(SignUpError::UserLambdaValidation(err.msg))
}
"UsernameExistsException" => {
return RusotoError::Service(SignUpError::UsernameExists(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SignUpError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SignUpError {
fn description(&self) -> &str {
match *self {
SignUpError::CodeDeliveryFailure(ref cause) => cause,
SignUpError::InternalError(ref cause) => cause,
SignUpError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
SignUpError::InvalidLambdaResponse(ref cause) => cause,
SignUpError::InvalidParameter(ref cause) => cause,
SignUpError::InvalidPassword(ref cause) => cause,
SignUpError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
SignUpError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
SignUpError::NotAuthorized(ref cause) => cause,
SignUpError::ResourceNotFound(ref cause) => cause,
SignUpError::TooManyRequests(ref cause) => cause,
SignUpError::UnexpectedLambda(ref cause) => cause,
SignUpError::UserLambdaValidation(ref cause) => cause,
SignUpError::UsernameExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartUserImportJobError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
PreconditionNotMet(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl StartUserImportJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartUserImportJobError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(StartUserImportJobError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(StartUserImportJobError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(StartUserImportJobError::NotAuthorized(err.msg))
}
"PreconditionNotMetException" => {
return RusotoError::Service(StartUserImportJobError::PreconditionNotMet(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StartUserImportJobError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(StartUserImportJobError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartUserImportJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartUserImportJobError {
fn description(&self) -> &str {
match *self {
StartUserImportJobError::InternalError(ref cause) => cause,
StartUserImportJobError::InvalidParameter(ref cause) => cause,
StartUserImportJobError::NotAuthorized(ref cause) => cause,
StartUserImportJobError::PreconditionNotMet(ref cause) => cause,
StartUserImportJobError::ResourceNotFound(ref cause) => cause,
StartUserImportJobError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopUserImportJobError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
PreconditionNotMet(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl StopUserImportJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopUserImportJobError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(StopUserImportJobError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(StopUserImportJobError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(StopUserImportJobError::NotAuthorized(err.msg))
}
"PreconditionNotMetException" => {
return RusotoError::Service(StopUserImportJobError::PreconditionNotMet(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StopUserImportJobError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(StopUserImportJobError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StopUserImportJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopUserImportJobError {
fn description(&self) -> &str {
match *self {
StopUserImportJobError::InternalError(ref cause) => cause,
StopUserImportJobError::InvalidParameter(ref cause) => cause,
StopUserImportJobError::NotAuthorized(ref cause) => cause,
StopUserImportJobError::PreconditionNotMet(ref cause) => cause,
StopUserImportJobError::ResourceNotFound(ref cause) => cause,
StopUserImportJobError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(TagResourceError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(TagResourceError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(TagResourceError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(TagResourceError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagResourceError {
fn description(&self) -> &str {
match *self {
TagResourceError::InternalError(ref cause) => cause,
TagResourceError::InvalidParameter(ref cause) => cause,
TagResourceError::NotAuthorized(ref cause) => cause,
TagResourceError::ResourceNotFound(ref cause) => cause,
TagResourceError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(UntagResourceError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(UntagResourceError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(UntagResourceError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UntagResourceError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagResourceError {
fn description(&self) -> &str {
match *self {
UntagResourceError::InternalError(ref cause) => cause,
UntagResourceError::InvalidParameter(ref cause) => cause,
UntagResourceError::NotAuthorized(ref cause) => cause,
UntagResourceError::ResourceNotFound(ref cause) => cause,
UntagResourceError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAuthEventFeedbackError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotFound(String),
UserPoolAddOnNotEnabled(String),
}
impl UpdateAuthEventFeedbackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAuthEventFeedbackError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(UpdateAuthEventFeedbackError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateAuthEventFeedbackError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(UpdateAuthEventFeedbackError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateAuthEventFeedbackError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateAuthEventFeedbackError::TooManyRequests(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(UpdateAuthEventFeedbackError::UserNotFound(
err.msg,
))
}
"UserPoolAddOnNotEnabledException" => {
return RusotoError::Service(
UpdateAuthEventFeedbackError::UserPoolAddOnNotEnabled(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateAuthEventFeedbackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAuthEventFeedbackError {
fn description(&self) -> &str {
match *self {
UpdateAuthEventFeedbackError::InternalError(ref cause) => cause,
UpdateAuthEventFeedbackError::InvalidParameter(ref cause) => cause,
UpdateAuthEventFeedbackError::NotAuthorized(ref cause) => cause,
UpdateAuthEventFeedbackError::ResourceNotFound(ref cause) => cause,
UpdateAuthEventFeedbackError::TooManyRequests(ref cause) => cause,
UpdateAuthEventFeedbackError::UserNotFound(ref cause) => cause,
UpdateAuthEventFeedbackError::UserPoolAddOnNotEnabled(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDeviceStatusError {
InternalError(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl UpdateDeviceStatusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDeviceStatusError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(UpdateDeviceStatusError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateDeviceStatusError::InvalidParameter(err.msg))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(
UpdateDeviceStatusError::InvalidUserPoolConfiguration(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(UpdateDeviceStatusError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(UpdateDeviceStatusError::PasswordResetRequired(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateDeviceStatusError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateDeviceStatusError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(UpdateDeviceStatusError::UserNotConfirmed(err.msg))
}
"UserNotFoundException" => {
return RusotoError::Service(UpdateDeviceStatusError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDeviceStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDeviceStatusError {
fn description(&self) -> &str {
match *self {
UpdateDeviceStatusError::InternalError(ref cause) => cause,
UpdateDeviceStatusError::InvalidParameter(ref cause) => cause,
UpdateDeviceStatusError::InvalidUserPoolConfiguration(ref cause) => cause,
UpdateDeviceStatusError::NotAuthorized(ref cause) => cause,
UpdateDeviceStatusError::PasswordResetRequired(ref cause) => cause,
UpdateDeviceStatusError::ResourceNotFound(ref cause) => cause,
UpdateDeviceStatusError::TooManyRequests(ref cause) => cause,
UpdateDeviceStatusError::UserNotConfirmed(ref cause) => cause,
UpdateDeviceStatusError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateGroupError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl UpdateGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(UpdateGroupError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateGroupError::InvalidParameter(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(UpdateGroupError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateGroupError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateGroupError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
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::InternalError(ref cause) => cause,
UpdateGroupError::InvalidParameter(ref cause) => cause,
UpdateGroupError::NotAuthorized(ref cause) => cause,
UpdateGroupError::ResourceNotFound(ref cause) => cause,
UpdateGroupError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateIdentityProviderError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UnsupportedIdentityProvider(String),
}
impl UpdateIdentityProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateIdentityProviderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(UpdateIdentityProviderError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateIdentityProviderError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(UpdateIdentityProviderError::NotAuthorized(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateIdentityProviderError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateIdentityProviderError::TooManyRequests(
err.msg,
))
}
"UnsupportedIdentityProviderException" => {
return RusotoError::Service(
UpdateIdentityProviderError::UnsupportedIdentityProvider(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateIdentityProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateIdentityProviderError {
fn description(&self) -> &str {
match *self {
UpdateIdentityProviderError::InternalError(ref cause) => cause,
UpdateIdentityProviderError::InvalidParameter(ref cause) => cause,
UpdateIdentityProviderError::NotAuthorized(ref cause) => cause,
UpdateIdentityProviderError::ResourceNotFound(ref cause) => cause,
UpdateIdentityProviderError::TooManyRequests(ref cause) => cause,
UpdateIdentityProviderError::UnsupportedIdentityProvider(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateResourceServerError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl UpdateResourceServerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateResourceServerError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(UpdateResourceServerError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateResourceServerError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(UpdateResourceServerError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateResourceServerError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateResourceServerError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateResourceServerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateResourceServerError {
fn description(&self) -> &str {
match *self {
UpdateResourceServerError::InternalError(ref cause) => cause,
UpdateResourceServerError::InvalidParameter(ref cause) => cause,
UpdateResourceServerError::NotAuthorized(ref cause) => cause,
UpdateResourceServerError::ResourceNotFound(ref cause) => cause,
UpdateResourceServerError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateUserAttributesError {
AliasExists(String),
CodeDeliveryFailure(String),
CodeMismatch(String),
ExpiredCode(String),
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidLambdaResponse(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UnexpectedLambda(String),
UserLambdaValidation(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl UpdateUserAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserAttributesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AliasExistsException" => {
return RusotoError::Service(UpdateUserAttributesError::AliasExists(err.msg))
}
"CodeDeliveryFailureException" => {
return RusotoError::Service(UpdateUserAttributesError::CodeDeliveryFailure(
err.msg,
))
}
"CodeMismatchException" => {
return RusotoError::Service(UpdateUserAttributesError::CodeMismatch(err.msg))
}
"ExpiredCodeException" => {
return RusotoError::Service(UpdateUserAttributesError::ExpiredCode(err.msg))
}
"InternalErrorException" => {
return RusotoError::Service(UpdateUserAttributesError::InternalError(err.msg))
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(
UpdateUserAttributesError::InvalidEmailRoleAccessPolicy(err.msg),
)
}
"InvalidLambdaResponseException" => {
return RusotoError::Service(UpdateUserAttributesError::InvalidLambdaResponse(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateUserAttributesError::InvalidParameter(
err.msg,
))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(
UpdateUserAttributesError::InvalidSmsRoleAccessPolicy(err.msg),
)
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
UpdateUserAttributesError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(UpdateUserAttributesError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(UpdateUserAttributesError::PasswordResetRequired(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateUserAttributesError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateUserAttributesError::TooManyRequests(
err.msg,
))
}
"UnexpectedLambdaException" => {
return RusotoError::Service(UpdateUserAttributesError::UnexpectedLambda(
err.msg,
))
}
"UserLambdaValidationException" => {
return RusotoError::Service(UpdateUserAttributesError::UserLambdaValidation(
err.msg,
))
}
"UserNotConfirmedException" => {
return RusotoError::Service(UpdateUserAttributesError::UserNotConfirmed(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(UpdateUserAttributesError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateUserAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateUserAttributesError {
fn description(&self) -> &str {
match *self {
UpdateUserAttributesError::AliasExists(ref cause) => cause,
UpdateUserAttributesError::CodeDeliveryFailure(ref cause) => cause,
UpdateUserAttributesError::CodeMismatch(ref cause) => cause,
UpdateUserAttributesError::ExpiredCode(ref cause) => cause,
UpdateUserAttributesError::InternalError(ref cause) => cause,
UpdateUserAttributesError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
UpdateUserAttributesError::InvalidLambdaResponse(ref cause) => cause,
UpdateUserAttributesError::InvalidParameter(ref cause) => cause,
UpdateUserAttributesError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
UpdateUserAttributesError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
UpdateUserAttributesError::NotAuthorized(ref cause) => cause,
UpdateUserAttributesError::PasswordResetRequired(ref cause) => cause,
UpdateUserAttributesError::ResourceNotFound(ref cause) => cause,
UpdateUserAttributesError::TooManyRequests(ref cause) => cause,
UpdateUserAttributesError::UnexpectedLambda(ref cause) => cause,
UpdateUserAttributesError::UserLambdaValidation(ref cause) => cause,
UpdateUserAttributesError::UserNotConfirmed(ref cause) => cause,
UpdateUserAttributesError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateUserPoolError {
ConcurrentModification(String),
InternalError(String),
InvalidEmailRoleAccessPolicy(String),
InvalidParameter(String),
InvalidSmsRoleAccessPolicy(String),
InvalidSmsRoleTrustRelationship(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
UserImportInProgress(String),
UserPoolTagging(String),
}
impl UpdateUserPoolError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserPoolError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(UpdateUserPoolError::ConcurrentModification(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(UpdateUserPoolError::InternalError(err.msg))
}
"InvalidEmailRoleAccessPolicyException" => {
return RusotoError::Service(UpdateUserPoolError::InvalidEmailRoleAccessPolicy(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateUserPoolError::InvalidParameter(err.msg))
}
"InvalidSmsRoleAccessPolicyException" => {
return RusotoError::Service(UpdateUserPoolError::InvalidSmsRoleAccessPolicy(
err.msg,
))
}
"InvalidSmsRoleTrustRelationshipException" => {
return RusotoError::Service(
UpdateUserPoolError::InvalidSmsRoleTrustRelationship(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(UpdateUserPoolError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateUserPoolError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateUserPoolError::TooManyRequests(err.msg))
}
"UserImportInProgressException" => {
return RusotoError::Service(UpdateUserPoolError::UserImportInProgress(err.msg))
}
"UserPoolTaggingException" => {
return RusotoError::Service(UpdateUserPoolError::UserPoolTagging(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateUserPoolError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateUserPoolError {
fn description(&self) -> &str {
match *self {
UpdateUserPoolError::ConcurrentModification(ref cause) => cause,
UpdateUserPoolError::InternalError(ref cause) => cause,
UpdateUserPoolError::InvalidEmailRoleAccessPolicy(ref cause) => cause,
UpdateUserPoolError::InvalidParameter(ref cause) => cause,
UpdateUserPoolError::InvalidSmsRoleAccessPolicy(ref cause) => cause,
UpdateUserPoolError::InvalidSmsRoleTrustRelationship(ref cause) => cause,
UpdateUserPoolError::NotAuthorized(ref cause) => cause,
UpdateUserPoolError::ResourceNotFound(ref cause) => cause,
UpdateUserPoolError::TooManyRequests(ref cause) => cause,
UpdateUserPoolError::UserImportInProgress(ref cause) => cause,
UpdateUserPoolError::UserPoolTagging(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateUserPoolClientError {
ConcurrentModification(String),
InternalError(String),
InvalidOAuthFlow(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
ScopeDoesNotExist(String),
TooManyRequests(String),
}
impl UpdateUserPoolClientError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserPoolClientError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(UpdateUserPoolClientError::ConcurrentModification(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(UpdateUserPoolClientError::InternalError(err.msg))
}
"InvalidOAuthFlowException" => {
return RusotoError::Service(UpdateUserPoolClientError::InvalidOAuthFlow(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateUserPoolClientError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(UpdateUserPoolClientError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateUserPoolClientError::ResourceNotFound(
err.msg,
))
}
"ScopeDoesNotExistException" => {
return RusotoError::Service(UpdateUserPoolClientError::ScopeDoesNotExist(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateUserPoolClientError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateUserPoolClientError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateUserPoolClientError {
fn description(&self) -> &str {
match *self {
UpdateUserPoolClientError::ConcurrentModification(ref cause) => cause,
UpdateUserPoolClientError::InternalError(ref cause) => cause,
UpdateUserPoolClientError::InvalidOAuthFlow(ref cause) => cause,
UpdateUserPoolClientError::InvalidParameter(ref cause) => cause,
UpdateUserPoolClientError::NotAuthorized(ref cause) => cause,
UpdateUserPoolClientError::ResourceNotFound(ref cause) => cause,
UpdateUserPoolClientError::ScopeDoesNotExist(ref cause) => cause,
UpdateUserPoolClientError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateUserPoolDomainError {
InternalError(String),
InvalidParameter(String),
NotAuthorized(String),
ResourceNotFound(String),
TooManyRequests(String),
}
impl UpdateUserPoolDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserPoolDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalErrorException" => {
return RusotoError::Service(UpdateUserPoolDomainError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateUserPoolDomainError::InvalidParameter(
err.msg,
))
}
"NotAuthorizedException" => {
return RusotoError::Service(UpdateUserPoolDomainError::NotAuthorized(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateUserPoolDomainError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateUserPoolDomainError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateUserPoolDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateUserPoolDomainError {
fn description(&self) -> &str {
match *self {
UpdateUserPoolDomainError::InternalError(ref cause) => cause,
UpdateUserPoolDomainError::InvalidParameter(ref cause) => cause,
UpdateUserPoolDomainError::NotAuthorized(ref cause) => cause,
UpdateUserPoolDomainError::ResourceNotFound(ref cause) => cause,
UpdateUserPoolDomainError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum VerifySoftwareTokenError {
CodeMismatch(String),
EnableSoftwareTokenMFA(String),
InternalError(String),
InvalidParameter(String),
InvalidUserPoolConfiguration(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
SoftwareTokenMFANotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl VerifySoftwareTokenError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<VerifySoftwareTokenError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CodeMismatchException" => {
return RusotoError::Service(VerifySoftwareTokenError::CodeMismatch(err.msg))
}
"EnableSoftwareTokenMFAException" => {
return RusotoError::Service(VerifySoftwareTokenError::EnableSoftwareTokenMFA(
err.msg,
))
}
"InternalErrorException" => {
return RusotoError::Service(VerifySoftwareTokenError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(VerifySoftwareTokenError::InvalidParameter(
err.msg,
))
}
"InvalidUserPoolConfigurationException" => {
return RusotoError::Service(
VerifySoftwareTokenError::InvalidUserPoolConfiguration(err.msg),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(VerifySoftwareTokenError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(VerifySoftwareTokenError::PasswordResetRequired(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(VerifySoftwareTokenError::ResourceNotFound(
err.msg,
))
}
"SoftwareTokenMFANotFoundException" => {
return RusotoError::Service(
VerifySoftwareTokenError::SoftwareTokenMFANotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(VerifySoftwareTokenError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(VerifySoftwareTokenError::UserNotConfirmed(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(VerifySoftwareTokenError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for VerifySoftwareTokenError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for VerifySoftwareTokenError {
fn description(&self) -> &str {
match *self {
VerifySoftwareTokenError::CodeMismatch(ref cause) => cause,
VerifySoftwareTokenError::EnableSoftwareTokenMFA(ref cause) => cause,
VerifySoftwareTokenError::InternalError(ref cause) => cause,
VerifySoftwareTokenError::InvalidParameter(ref cause) => cause,
VerifySoftwareTokenError::InvalidUserPoolConfiguration(ref cause) => cause,
VerifySoftwareTokenError::NotAuthorized(ref cause) => cause,
VerifySoftwareTokenError::PasswordResetRequired(ref cause) => cause,
VerifySoftwareTokenError::ResourceNotFound(ref cause) => cause,
VerifySoftwareTokenError::SoftwareTokenMFANotFound(ref cause) => cause,
VerifySoftwareTokenError::TooManyRequests(ref cause) => cause,
VerifySoftwareTokenError::UserNotConfirmed(ref cause) => cause,
VerifySoftwareTokenError::UserNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum VerifyUserAttributeError {
CodeMismatch(String),
ExpiredCode(String),
InternalError(String),
InvalidParameter(String),
LimitExceeded(String),
NotAuthorized(String),
PasswordResetRequired(String),
ResourceNotFound(String),
TooManyRequests(String),
UserNotConfirmed(String),
UserNotFound(String),
}
impl VerifyUserAttributeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<VerifyUserAttributeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CodeMismatchException" => {
return RusotoError::Service(VerifyUserAttributeError::CodeMismatch(err.msg))
}
"ExpiredCodeException" => {
return RusotoError::Service(VerifyUserAttributeError::ExpiredCode(err.msg))
}
"InternalErrorException" => {
return RusotoError::Service(VerifyUserAttributeError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(VerifyUserAttributeError::InvalidParameter(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(VerifyUserAttributeError::LimitExceeded(err.msg))
}
"NotAuthorizedException" => {
return RusotoError::Service(VerifyUserAttributeError::NotAuthorized(err.msg))
}
"PasswordResetRequiredException" => {
return RusotoError::Service(VerifyUserAttributeError::PasswordResetRequired(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(VerifyUserAttributeError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(VerifyUserAttributeError::TooManyRequests(err.msg))
}
"UserNotConfirmedException" => {
return RusotoError::Service(VerifyUserAttributeError::UserNotConfirmed(
err.msg,
))
}
"UserNotFoundException" => {
return RusotoError::Service(VerifyUserAttributeError::UserNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for VerifyUserAttributeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for VerifyUserAttributeError {
fn description(&self) -> &str {
match *self {
VerifyUserAttributeError::CodeMismatch(ref cause) => cause,
VerifyUserAttributeError::ExpiredCode(ref cause) => cause,
VerifyUserAttributeError::InternalError(ref cause) => cause,
VerifyUserAttributeError::InvalidParameter(ref cause) => cause,
VerifyUserAttributeError::LimitExceeded(ref cause) => cause,
VerifyUserAttributeError::NotAuthorized(ref cause) => cause,
VerifyUserAttributeError::PasswordResetRequired(ref cause) => cause,
VerifyUserAttributeError::ResourceNotFound(ref cause) => cause,
VerifyUserAttributeError::TooManyRequests(ref cause) => cause,
VerifyUserAttributeError::UserNotConfirmed(ref cause) => cause,
VerifyUserAttributeError::UserNotFound(ref cause) => cause,
}
}
}
pub trait CognitoIdentityProvider {
fn add_custom_attributes(
&self,
input: AddCustomAttributesRequest,
) -> RusotoFuture<AddCustomAttributesResponse, AddCustomAttributesError>;
fn admin_add_user_to_group(
&self,
input: AdminAddUserToGroupRequest,
) -> RusotoFuture<(), AdminAddUserToGroupError>;
fn admin_confirm_sign_up(
&self,
input: AdminConfirmSignUpRequest,
) -> RusotoFuture<AdminConfirmSignUpResponse, AdminConfirmSignUpError>;
fn admin_create_user(
&self,
input: AdminCreateUserRequest,
) -> RusotoFuture<AdminCreateUserResponse, AdminCreateUserError>;
fn admin_delete_user(
&self,
input: AdminDeleteUserRequest,
) -> RusotoFuture<(), AdminDeleteUserError>;
fn admin_delete_user_attributes(
&self,
input: AdminDeleteUserAttributesRequest,
) -> RusotoFuture<AdminDeleteUserAttributesResponse, AdminDeleteUserAttributesError>;
fn admin_disable_provider_for_user(
&self,
input: AdminDisableProviderForUserRequest,
) -> RusotoFuture<AdminDisableProviderForUserResponse, AdminDisableProviderForUserError>;
fn admin_disable_user(
&self,
input: AdminDisableUserRequest,
) -> RusotoFuture<AdminDisableUserResponse, AdminDisableUserError>;
fn admin_enable_user(
&self,
input: AdminEnableUserRequest,
) -> RusotoFuture<AdminEnableUserResponse, AdminEnableUserError>;
fn admin_forget_device(
&self,
input: AdminForgetDeviceRequest,
) -> RusotoFuture<(), AdminForgetDeviceError>;
fn admin_get_device(
&self,
input: AdminGetDeviceRequest,
) -> RusotoFuture<AdminGetDeviceResponse, AdminGetDeviceError>;
fn admin_get_user(
&self,
input: AdminGetUserRequest,
) -> RusotoFuture<AdminGetUserResponse, AdminGetUserError>;
fn admin_initiate_auth(
&self,
input: AdminInitiateAuthRequest,
) -> RusotoFuture<AdminInitiateAuthResponse, AdminInitiateAuthError>;
fn admin_link_provider_for_user(
&self,
input: AdminLinkProviderForUserRequest,
) -> RusotoFuture<AdminLinkProviderForUserResponse, AdminLinkProviderForUserError>;
fn admin_list_devices(
&self,
input: AdminListDevicesRequest,
) -> RusotoFuture<AdminListDevicesResponse, AdminListDevicesError>;
fn admin_list_groups_for_user(
&self,
input: AdminListGroupsForUserRequest,
) -> RusotoFuture<AdminListGroupsForUserResponse, AdminListGroupsForUserError>;
fn admin_list_user_auth_events(
&self,
input: AdminListUserAuthEventsRequest,
) -> RusotoFuture<AdminListUserAuthEventsResponse, AdminListUserAuthEventsError>;
fn admin_remove_user_from_group(
&self,
input: AdminRemoveUserFromGroupRequest,
) -> RusotoFuture<(), AdminRemoveUserFromGroupError>;
fn admin_reset_user_password(
&self,
input: AdminResetUserPasswordRequest,
) -> RusotoFuture<AdminResetUserPasswordResponse, AdminResetUserPasswordError>;
fn admin_respond_to_auth_challenge(
&self,
input: AdminRespondToAuthChallengeRequest,
) -> RusotoFuture<AdminRespondToAuthChallengeResponse, AdminRespondToAuthChallengeError>;
fn admin_set_user_mfa_preference(
&self,
input: AdminSetUserMFAPreferenceRequest,
) -> RusotoFuture<AdminSetUserMFAPreferenceResponse, AdminSetUserMFAPreferenceError>;
fn admin_set_user_password(
&self,
input: AdminSetUserPasswordRequest,
) -> RusotoFuture<AdminSetUserPasswordResponse, AdminSetUserPasswordError>;
fn admin_set_user_settings(
&self,
input: AdminSetUserSettingsRequest,
) -> RusotoFuture<AdminSetUserSettingsResponse, AdminSetUserSettingsError>;
fn admin_update_auth_event_feedback(
&self,
input: AdminUpdateAuthEventFeedbackRequest,
) -> RusotoFuture<AdminUpdateAuthEventFeedbackResponse, AdminUpdateAuthEventFeedbackError>;
fn admin_update_device_status(
&self,
input: AdminUpdateDeviceStatusRequest,
) -> RusotoFuture<AdminUpdateDeviceStatusResponse, AdminUpdateDeviceStatusError>;
fn admin_update_user_attributes(
&self,
input: AdminUpdateUserAttributesRequest,
) -> RusotoFuture<AdminUpdateUserAttributesResponse, AdminUpdateUserAttributesError>;
fn admin_user_global_sign_out(
&self,
input: AdminUserGlobalSignOutRequest,
) -> RusotoFuture<AdminUserGlobalSignOutResponse, AdminUserGlobalSignOutError>;
fn associate_software_token(
&self,
input: AssociateSoftwareTokenRequest,
) -> RusotoFuture<AssociateSoftwareTokenResponse, AssociateSoftwareTokenError>;
fn change_password(
&self,
input: ChangePasswordRequest,
) -> RusotoFuture<ChangePasswordResponse, ChangePasswordError>;
fn confirm_device(
&self,
input: ConfirmDeviceRequest,
) -> RusotoFuture<ConfirmDeviceResponse, ConfirmDeviceError>;
fn confirm_forgot_password(
&self,
input: ConfirmForgotPasswordRequest,
) -> RusotoFuture<ConfirmForgotPasswordResponse, ConfirmForgotPasswordError>;
fn confirm_sign_up(
&self,
input: ConfirmSignUpRequest,
) -> RusotoFuture<ConfirmSignUpResponse, ConfirmSignUpError>;
fn create_group(
&self,
input: CreateGroupRequest,
) -> RusotoFuture<CreateGroupResponse, CreateGroupError>;
fn create_identity_provider(
&self,
input: CreateIdentityProviderRequest,
) -> RusotoFuture<CreateIdentityProviderResponse, CreateIdentityProviderError>;
fn create_resource_server(
&self,
input: CreateResourceServerRequest,
) -> RusotoFuture<CreateResourceServerResponse, CreateResourceServerError>;
fn create_user_import_job(
&self,
input: CreateUserImportJobRequest,
) -> RusotoFuture<CreateUserImportJobResponse, CreateUserImportJobError>;
fn create_user_pool(
&self,
input: CreateUserPoolRequest,
) -> RusotoFuture<CreateUserPoolResponse, CreateUserPoolError>;
fn create_user_pool_client(
&self,
input: CreateUserPoolClientRequest,
) -> RusotoFuture<CreateUserPoolClientResponse, CreateUserPoolClientError>;
fn create_user_pool_domain(
&self,
input: CreateUserPoolDomainRequest,
) -> RusotoFuture<CreateUserPoolDomainResponse, CreateUserPoolDomainError>;
fn delete_group(&self, input: DeleteGroupRequest) -> RusotoFuture<(), DeleteGroupError>;
fn delete_identity_provider(
&self,
input: DeleteIdentityProviderRequest,
) -> RusotoFuture<(), DeleteIdentityProviderError>;
fn delete_resource_server(
&self,
input: DeleteResourceServerRequest,
) -> RusotoFuture<(), DeleteResourceServerError>;
fn delete_user(&self, input: DeleteUserRequest) -> RusotoFuture<(), DeleteUserError>;
fn delete_user_attributes(
&self,
input: DeleteUserAttributesRequest,
) -> RusotoFuture<DeleteUserAttributesResponse, DeleteUserAttributesError>;
fn delete_user_pool(
&self,
input: DeleteUserPoolRequest,
) -> RusotoFuture<(), DeleteUserPoolError>;
fn delete_user_pool_client(
&self,
input: DeleteUserPoolClientRequest,
) -> RusotoFuture<(), DeleteUserPoolClientError>;
fn delete_user_pool_domain(
&self,
input: DeleteUserPoolDomainRequest,
) -> RusotoFuture<DeleteUserPoolDomainResponse, DeleteUserPoolDomainError>;
fn describe_identity_provider(
&self,
input: DescribeIdentityProviderRequest,
) -> RusotoFuture<DescribeIdentityProviderResponse, DescribeIdentityProviderError>;
fn describe_resource_server(
&self,
input: DescribeResourceServerRequest,
) -> RusotoFuture<DescribeResourceServerResponse, DescribeResourceServerError>;
fn describe_risk_configuration(
&self,
input: DescribeRiskConfigurationRequest,
) -> RusotoFuture<DescribeRiskConfigurationResponse, DescribeRiskConfigurationError>;
fn describe_user_import_job(
&self,
input: DescribeUserImportJobRequest,
) -> RusotoFuture<DescribeUserImportJobResponse, DescribeUserImportJobError>;
fn describe_user_pool(
&self,
input: DescribeUserPoolRequest,
) -> RusotoFuture<DescribeUserPoolResponse, DescribeUserPoolError>;
fn describe_user_pool_client(
&self,
input: DescribeUserPoolClientRequest,
) -> RusotoFuture<DescribeUserPoolClientResponse, DescribeUserPoolClientError>;
fn describe_user_pool_domain(
&self,
input: DescribeUserPoolDomainRequest,
) -> RusotoFuture<DescribeUserPoolDomainResponse, DescribeUserPoolDomainError>;
fn forget_device(&self, input: ForgetDeviceRequest) -> RusotoFuture<(), ForgetDeviceError>;
fn forgot_password(
&self,
input: ForgotPasswordRequest,
) -> RusotoFuture<ForgotPasswordResponse, ForgotPasswordError>;
fn get_csv_header(
&self,
input: GetCSVHeaderRequest,
) -> RusotoFuture<GetCSVHeaderResponse, GetCSVHeaderError>;
fn get_device(
&self,
input: GetDeviceRequest,
) -> RusotoFuture<GetDeviceResponse, GetDeviceError>;
fn get_group(&self, input: GetGroupRequest) -> RusotoFuture<GetGroupResponse, GetGroupError>;
fn get_identity_provider_by_identifier(
&self,
input: GetIdentityProviderByIdentifierRequest,
) -> RusotoFuture<GetIdentityProviderByIdentifierResponse, GetIdentityProviderByIdentifierError>;
fn get_signing_certificate(
&self,
input: GetSigningCertificateRequest,
) -> RusotoFuture<GetSigningCertificateResponse, GetSigningCertificateError>;
fn get_ui_customization(
&self,
input: GetUICustomizationRequest,
) -> RusotoFuture<GetUICustomizationResponse, GetUICustomizationError>;
fn get_user(&self, input: GetUserRequest) -> RusotoFuture<GetUserResponse, GetUserError>;
fn get_user_attribute_verification_code(
&self,
input: GetUserAttributeVerificationCodeRequest,
) -> RusotoFuture<GetUserAttributeVerificationCodeResponse, GetUserAttributeVerificationCodeError>;
fn get_user_pool_mfa_config(
&self,
input: GetUserPoolMfaConfigRequest,
) -> RusotoFuture<GetUserPoolMfaConfigResponse, GetUserPoolMfaConfigError>;
fn global_sign_out(
&self,
input: GlobalSignOutRequest,
) -> RusotoFuture<GlobalSignOutResponse, GlobalSignOutError>;
fn initiate_auth(
&self,
input: InitiateAuthRequest,
) -> RusotoFuture<InitiateAuthResponse, InitiateAuthError>;
fn list_devices(
&self,
input: ListDevicesRequest,
) -> RusotoFuture<ListDevicesResponse, ListDevicesError>;
fn list_groups(
&self,
input: ListGroupsRequest,
) -> RusotoFuture<ListGroupsResponse, ListGroupsError>;
fn list_identity_providers(
&self,
input: ListIdentityProvidersRequest,
) -> RusotoFuture<ListIdentityProvidersResponse, ListIdentityProvidersError>;
fn list_resource_servers(
&self,
input: ListResourceServersRequest,
) -> RusotoFuture<ListResourceServersResponse, ListResourceServersError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError>;
fn list_user_import_jobs(
&self,
input: ListUserImportJobsRequest,
) -> RusotoFuture<ListUserImportJobsResponse, ListUserImportJobsError>;
fn list_user_pool_clients(
&self,
input: ListUserPoolClientsRequest,
) -> RusotoFuture<ListUserPoolClientsResponse, ListUserPoolClientsError>;
fn list_user_pools(
&self,
input: ListUserPoolsRequest,
) -> RusotoFuture<ListUserPoolsResponse, ListUserPoolsError>;
fn list_users(
&self,
input: ListUsersRequest,
) -> RusotoFuture<ListUsersResponse, ListUsersError>;
fn list_users_in_group(
&self,
input: ListUsersInGroupRequest,
) -> RusotoFuture<ListUsersInGroupResponse, ListUsersInGroupError>;
fn resend_confirmation_code(
&self,
input: ResendConfirmationCodeRequest,
) -> RusotoFuture<ResendConfirmationCodeResponse, ResendConfirmationCodeError>;
fn respond_to_auth_challenge(
&self,
input: RespondToAuthChallengeRequest,
) -> RusotoFuture<RespondToAuthChallengeResponse, RespondToAuthChallengeError>;
fn set_risk_configuration(
&self,
input: SetRiskConfigurationRequest,
) -> RusotoFuture<SetRiskConfigurationResponse, SetRiskConfigurationError>;
fn set_ui_customization(
&self,
input: SetUICustomizationRequest,
) -> RusotoFuture<SetUICustomizationResponse, SetUICustomizationError>;
fn set_user_mfa_preference(
&self,
input: SetUserMFAPreferenceRequest,
) -> RusotoFuture<SetUserMFAPreferenceResponse, SetUserMFAPreferenceError>;
fn set_user_pool_mfa_config(
&self,
input: SetUserPoolMfaConfigRequest,
) -> RusotoFuture<SetUserPoolMfaConfigResponse, SetUserPoolMfaConfigError>;
fn set_user_settings(
&self,
input: SetUserSettingsRequest,
) -> RusotoFuture<SetUserSettingsResponse, SetUserSettingsError>;
fn sign_up(&self, input: SignUpRequest) -> RusotoFuture<SignUpResponse, SignUpError>;
fn start_user_import_job(
&self,
input: StartUserImportJobRequest,
) -> RusotoFuture<StartUserImportJobResponse, StartUserImportJobError>;
fn stop_user_import_job(
&self,
input: StopUserImportJobRequest,
) -> RusotoFuture<StopUserImportJobResponse, StopUserImportJobError>;
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError>;
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError>;
fn update_auth_event_feedback(
&self,
input: UpdateAuthEventFeedbackRequest,
) -> RusotoFuture<UpdateAuthEventFeedbackResponse, UpdateAuthEventFeedbackError>;
fn update_device_status(
&self,
input: UpdateDeviceStatusRequest,
) -> RusotoFuture<UpdateDeviceStatusResponse, UpdateDeviceStatusError>;
fn update_group(
&self,
input: UpdateGroupRequest,
) -> RusotoFuture<UpdateGroupResponse, UpdateGroupError>;
fn update_identity_provider(
&self,
input: UpdateIdentityProviderRequest,
) -> RusotoFuture<UpdateIdentityProviderResponse, UpdateIdentityProviderError>;
fn update_resource_server(
&self,
input: UpdateResourceServerRequest,
) -> RusotoFuture<UpdateResourceServerResponse, UpdateResourceServerError>;
fn update_user_attributes(
&self,
input: UpdateUserAttributesRequest,
) -> RusotoFuture<UpdateUserAttributesResponse, UpdateUserAttributesError>;
fn update_user_pool(
&self,
input: UpdateUserPoolRequest,
) -> RusotoFuture<UpdateUserPoolResponse, UpdateUserPoolError>;
fn update_user_pool_client(
&self,
input: UpdateUserPoolClientRequest,
) -> RusotoFuture<UpdateUserPoolClientResponse, UpdateUserPoolClientError>;
fn update_user_pool_domain(
&self,
input: UpdateUserPoolDomainRequest,
) -> RusotoFuture<UpdateUserPoolDomainResponse, UpdateUserPoolDomainError>;
fn verify_software_token(
&self,
input: VerifySoftwareTokenRequest,
) -> RusotoFuture<VerifySoftwareTokenResponse, VerifySoftwareTokenError>;
fn verify_user_attribute(
&self,
input: VerifyUserAttributeRequest,
) -> RusotoFuture<VerifyUserAttributeResponse, VerifyUserAttributeError>;
}
#[derive(Clone)]
pub struct CognitoIdentityProviderClient {
client: Client,
region: region::Region,
}
impl CognitoIdentityProviderClient {
pub fn new(region: region::Region) -> CognitoIdentityProviderClient {
CognitoIdentityProviderClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> CognitoIdentityProviderClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
CognitoIdentityProviderClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl CognitoIdentityProvider for CognitoIdentityProviderClient {
fn add_custom_attributes(
&self,
input: AddCustomAttributesRequest,
) -> RusotoFuture<AddCustomAttributesResponse, AddCustomAttributesError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AddCustomAttributes",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AddCustomAttributesResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AddCustomAttributesError::from_response(response))
}),
)
}
})
}
fn admin_add_user_to_group(
&self,
input: AdminAddUserToGroupRequest,
) -> RusotoFuture<(), AdminAddUserToGroupError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminAddUserToGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AdminAddUserToGroupError::from_response(response))
}),
)
}
})
}
fn admin_confirm_sign_up(
&self,
input: AdminConfirmSignUpRequest,
) -> RusotoFuture<AdminConfirmSignUpResponse, AdminConfirmSignUpError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminConfirmSignUp",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminConfirmSignUpResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminConfirmSignUpError::from_response(response))),
)
}
})
}
fn admin_create_user(
&self,
input: AdminCreateUserRequest,
) -> RusotoFuture<AdminCreateUserResponse, AdminCreateUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminCreateUser",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminCreateUserResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminCreateUserError::from_response(response))),
)
}
})
}
fn admin_delete_user(
&self,
input: AdminDeleteUserRequest,
) -> RusotoFuture<(), AdminDeleteUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminDeleteUser",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminDeleteUserError::from_response(response))),
)
}
})
}
fn admin_delete_user_attributes(
&self,
input: AdminDeleteUserAttributesRequest,
) -> RusotoFuture<AdminDeleteUserAttributesResponse, AdminDeleteUserAttributesError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminDeleteUserAttributes",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminDeleteUserAttributesResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminDeleteUserAttributesError::from_response(response))
}))
}
})
}
fn admin_disable_provider_for_user(
&self,
input: AdminDisableProviderForUserRequest,
) -> RusotoFuture<AdminDisableProviderForUserResponse, AdminDisableProviderForUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminDisableProviderForUser",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminDisableProviderForUserResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminDisableProviderForUserError::from_response(response))
}))
}
})
}
fn admin_disable_user(
&self,
input: AdminDisableUserRequest,
) -> RusotoFuture<AdminDisableUserResponse, AdminDisableUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminDisableUser",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminDisableUserResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminDisableUserError::from_response(response))),
)
}
})
}
fn admin_enable_user(
&self,
input: AdminEnableUserRequest,
) -> RusotoFuture<AdminEnableUserResponse, AdminEnableUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminEnableUser",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminEnableUserResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminEnableUserError::from_response(response))),
)
}
})
}
fn admin_forget_device(
&self,
input: AdminForgetDeviceRequest,
) -> RusotoFuture<(), AdminForgetDeviceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminForgetDevice",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminForgetDeviceError::from_response(response))),
)
}
})
}
fn admin_get_device(
&self,
input: AdminGetDeviceRequest,
) -> RusotoFuture<AdminGetDeviceResponse, AdminGetDeviceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminGetDevice",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminGetDeviceResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminGetDeviceError::from_response(response))),
)
}
})
}
fn admin_get_user(
&self,
input: AdminGetUserRequest,
) -> RusotoFuture<AdminGetUserResponse, AdminGetUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminGetUser",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminGetUserResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminGetUserError::from_response(response))),
)
}
})
}
fn admin_initiate_auth(
&self,
input: AdminInitiateAuthRequest,
) -> RusotoFuture<AdminInitiateAuthResponse, AdminInitiateAuthError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminInitiateAuth",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminInitiateAuthResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminInitiateAuthError::from_response(response))),
)
}
})
}
fn admin_link_provider_for_user(
&self,
input: AdminLinkProviderForUserRequest,
) -> RusotoFuture<AdminLinkProviderForUserResponse, AdminLinkProviderForUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminLinkProviderForUser",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminLinkProviderForUserResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminLinkProviderForUserError::from_response(response))
}))
}
})
}
fn admin_list_devices(
&self,
input: AdminListDevicesRequest,
) -> RusotoFuture<AdminListDevicesResponse, AdminListDevicesError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminListDevices",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminListDevicesResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AdminListDevicesError::from_response(response))),
)
}
})
}
fn admin_list_groups_for_user(
&self,
input: AdminListGroupsForUserRequest,
) -> RusotoFuture<AdminListGroupsForUserResponse, AdminListGroupsForUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminListGroupsForUser",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminListGroupsForUserResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AdminListGroupsForUserError::from_response(response))
}),
)
}
})
}
fn admin_list_user_auth_events(
&self,
input: AdminListUserAuthEventsRequest,
) -> RusotoFuture<AdminListUserAuthEventsResponse, AdminListUserAuthEventsError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminListUserAuthEvents",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminListUserAuthEventsResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminListUserAuthEventsError::from_response(response))
}))
}
})
}
fn admin_remove_user_from_group(
&self,
input: AdminRemoveUserFromGroupRequest,
) -> RusotoFuture<(), AdminRemoveUserFromGroupError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminRemoveUserFromGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminRemoveUserFromGroupError::from_response(response))
}))
}
})
}
fn admin_reset_user_password(
&self,
input: AdminResetUserPasswordRequest,
) -> RusotoFuture<AdminResetUserPasswordResponse, AdminResetUserPasswordError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminResetUserPassword",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminResetUserPasswordResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AdminResetUserPasswordError::from_response(response))
}),
)
}
})
}
fn admin_respond_to_auth_challenge(
&self,
input: AdminRespondToAuthChallengeRequest,
) -> RusotoFuture<AdminRespondToAuthChallengeResponse, AdminRespondToAuthChallengeError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminRespondToAuthChallenge",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminRespondToAuthChallengeResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminRespondToAuthChallengeError::from_response(response))
}))
}
})
}
fn admin_set_user_mfa_preference(
&self,
input: AdminSetUserMFAPreferenceRequest,
) -> RusotoFuture<AdminSetUserMFAPreferenceResponse, AdminSetUserMFAPreferenceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminSetUserMFAPreference",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminSetUserMFAPreferenceResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminSetUserMFAPreferenceError::from_response(response))
}))
}
})
}
fn admin_set_user_password(
&self,
input: AdminSetUserPasswordRequest,
) -> RusotoFuture<AdminSetUserPasswordResponse, AdminSetUserPasswordError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminSetUserPassword",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminSetUserPasswordResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AdminSetUserPasswordError::from_response(response))
}),
)
}
})
}
fn admin_set_user_settings(
&self,
input: AdminSetUserSettingsRequest,
) -> RusotoFuture<AdminSetUserSettingsResponse, AdminSetUserSettingsError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminSetUserSettings",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminSetUserSettingsResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AdminSetUserSettingsError::from_response(response))
}),
)
}
})
}
fn admin_update_auth_event_feedback(
&self,
input: AdminUpdateAuthEventFeedbackRequest,
) -> RusotoFuture<AdminUpdateAuthEventFeedbackResponse, AdminUpdateAuthEventFeedbackError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminUpdateAuthEventFeedback",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminUpdateAuthEventFeedbackResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminUpdateAuthEventFeedbackError::from_response(response))
}))
}
})
}
fn admin_update_device_status(
&self,
input: AdminUpdateDeviceStatusRequest,
) -> RusotoFuture<AdminUpdateDeviceStatusResponse, AdminUpdateDeviceStatusError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminUpdateDeviceStatus",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminUpdateDeviceStatusResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminUpdateDeviceStatusError::from_response(response))
}))
}
})
}
fn admin_update_user_attributes(
&self,
input: AdminUpdateUserAttributesRequest,
) -> RusotoFuture<AdminUpdateUserAttributesResponse, AdminUpdateUserAttributesError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminUpdateUserAttributes",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminUpdateUserAttributesResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AdminUpdateUserAttributesError::from_response(response))
}))
}
})
}
fn admin_user_global_sign_out(
&self,
input: AdminUserGlobalSignOutRequest,
) -> RusotoFuture<AdminUserGlobalSignOutResponse, AdminUserGlobalSignOutError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AdminUserGlobalSignOut",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AdminUserGlobalSignOutResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AdminUserGlobalSignOutError::from_response(response))
}),
)
}
})
}
fn associate_software_token(
&self,
input: AssociateSoftwareTokenRequest,
) -> RusotoFuture<AssociateSoftwareTokenResponse, AssociateSoftwareTokenError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.AssociateSoftwareToken",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AssociateSoftwareTokenResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AssociateSoftwareTokenError::from_response(response))
}),
)
}
})
}
fn change_password(
&self,
input: ChangePasswordRequest,
) -> RusotoFuture<ChangePasswordResponse, ChangePasswordError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ChangePassword",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ChangePasswordResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ChangePasswordError::from_response(response))),
)
}
})
}
fn confirm_device(
&self,
input: ConfirmDeviceRequest,
) -> RusotoFuture<ConfirmDeviceResponse, ConfirmDeviceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ConfirmDevice",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ConfirmDeviceResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ConfirmDeviceError::from_response(response))),
)
}
})
}
fn confirm_forgot_password(
&self,
input: ConfirmForgotPasswordRequest,
) -> RusotoFuture<ConfirmForgotPasswordResponse, ConfirmForgotPasswordError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ConfirmForgotPassword",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ConfirmForgotPasswordResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ConfirmForgotPasswordError::from_response(response))
}),
)
}
})
}
fn confirm_sign_up(
&self,
input: ConfirmSignUpRequest,
) -> RusotoFuture<ConfirmSignUpResponse, ConfirmSignUpError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ConfirmSignUp",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ConfirmSignUpResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ConfirmSignUpError::from_response(response))),
)
}
})
}
fn create_group(
&self,
input: CreateGroupRequest,
) -> RusotoFuture<CreateGroupResponse, CreateGroupError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.CreateGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateGroupResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateGroupError::from_response(response))),
)
}
})
}
fn create_identity_provider(
&self,
input: CreateIdentityProviderRequest,
) -> RusotoFuture<CreateIdentityProviderResponse, CreateIdentityProviderError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.CreateIdentityProvider",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateIdentityProviderResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateIdentityProviderError::from_response(response))
}),
)
}
})
}
fn create_resource_server(
&self,
input: CreateResourceServerRequest,
) -> RusotoFuture<CreateResourceServerResponse, CreateResourceServerError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.CreateResourceServer",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateResourceServerResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateResourceServerError::from_response(response))
}),
)
}
})
}
fn create_user_import_job(
&self,
input: CreateUserImportJobRequest,
) -> RusotoFuture<CreateUserImportJobResponse, CreateUserImportJobError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.CreateUserImportJob",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateUserImportJobResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateUserImportJobError::from_response(response))
}),
)
}
})
}
fn create_user_pool(
&self,
input: CreateUserPoolRequest,
) -> RusotoFuture<CreateUserPoolResponse, CreateUserPoolError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.CreateUserPool",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateUserPoolResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateUserPoolError::from_response(response))),
)
}
})
}
fn create_user_pool_client(
&self,
input: CreateUserPoolClientRequest,
) -> RusotoFuture<CreateUserPoolClientResponse, CreateUserPoolClientError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.CreateUserPoolClient",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateUserPoolClientResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateUserPoolClientError::from_response(response))
}),
)
}
})
}
fn create_user_pool_domain(
&self,
input: CreateUserPoolDomainRequest,
) -> RusotoFuture<CreateUserPoolDomainResponse, CreateUserPoolDomainError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.CreateUserPoolDomain",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateUserPoolDomainResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateUserPoolDomainError::from_response(response))
}),
)
}
})
}
fn delete_group(&self, input: DeleteGroupRequest) -> RusotoFuture<(), DeleteGroupError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DeleteGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteGroupError::from_response(response))),
)
}
})
}
fn delete_identity_provider(
&self,
input: DeleteIdentityProviderRequest,
) -> RusotoFuture<(), DeleteIdentityProviderError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DeleteIdentityProvider",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteIdentityProviderError::from_response(response))
}),
)
}
})
}
fn delete_resource_server(
&self,
input: DeleteResourceServerRequest,
) -> RusotoFuture<(), DeleteResourceServerError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DeleteResourceServer",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteResourceServerError::from_response(response))
}),
)
}
})
}
fn delete_user(&self, input: DeleteUserRequest) -> RusotoFuture<(), DeleteUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DeleteUser",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteUserError::from_response(response))),
)
}
})
}
fn delete_user_attributes(
&self,
input: DeleteUserAttributesRequest,
) -> RusotoFuture<DeleteUserAttributesResponse, DeleteUserAttributesError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DeleteUserAttributes",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteUserAttributesResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteUserAttributesError::from_response(response))
}),
)
}
})
}
fn delete_user_pool(
&self,
input: DeleteUserPoolRequest,
) -> RusotoFuture<(), DeleteUserPoolError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DeleteUserPool",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteUserPoolError::from_response(response))),
)
}
})
}
fn delete_user_pool_client(
&self,
input: DeleteUserPoolClientRequest,
) -> RusotoFuture<(), DeleteUserPoolClientError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DeleteUserPoolClient",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteUserPoolClientError::from_response(response))
}),
)
}
})
}
fn delete_user_pool_domain(
&self,
input: DeleteUserPoolDomainRequest,
) -> RusotoFuture<DeleteUserPoolDomainResponse, DeleteUserPoolDomainError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DeleteUserPoolDomain",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteUserPoolDomainResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteUserPoolDomainError::from_response(response))
}),
)
}
})
}
fn describe_identity_provider(
&self,
input: DescribeIdentityProviderRequest,
) -> RusotoFuture<DescribeIdentityProviderResponse, DescribeIdentityProviderError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DescribeIdentityProvider",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeIdentityProviderResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeIdentityProviderError::from_response(response))
}))
}
})
}
fn describe_resource_server(
&self,
input: DescribeResourceServerRequest,
) -> RusotoFuture<DescribeResourceServerResponse, DescribeResourceServerError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DescribeResourceServer",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeResourceServerResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeResourceServerError::from_response(response))
}),
)
}
})
}
fn describe_risk_configuration(
&self,
input: DescribeRiskConfigurationRequest,
) -> RusotoFuture<DescribeRiskConfigurationResponse, DescribeRiskConfigurationError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DescribeRiskConfiguration",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeRiskConfigurationResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeRiskConfigurationError::from_response(response))
}))
}
})
}
fn describe_user_import_job(
&self,
input: DescribeUserImportJobRequest,
) -> RusotoFuture<DescribeUserImportJobResponse, DescribeUserImportJobError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DescribeUserImportJob",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeUserImportJobResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeUserImportJobError::from_response(response))
}),
)
}
})
}
fn describe_user_pool(
&self,
input: DescribeUserPoolRequest,
) -> RusotoFuture<DescribeUserPoolResponse, DescribeUserPoolError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DescribeUserPool",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeUserPoolResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeUserPoolError::from_response(response))),
)
}
})
}
fn describe_user_pool_client(
&self,
input: DescribeUserPoolClientRequest,
) -> RusotoFuture<DescribeUserPoolClientResponse, DescribeUserPoolClientError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DescribeUserPoolClient",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeUserPoolClientResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeUserPoolClientError::from_response(response))
}),
)
}
})
}
fn describe_user_pool_domain(
&self,
input: DescribeUserPoolDomainRequest,
) -> RusotoFuture<DescribeUserPoolDomainResponse, DescribeUserPoolDomainError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.DescribeUserPoolDomain",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeUserPoolDomainResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeUserPoolDomainError::from_response(response))
}),
)
}
})
}
fn forget_device(&self, input: ForgetDeviceRequest) -> RusotoFuture<(), ForgetDeviceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ForgetDevice",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ForgetDeviceError::from_response(response))),
)
}
})
}
fn forgot_password(
&self,
input: ForgotPasswordRequest,
) -> RusotoFuture<ForgotPasswordResponse, ForgotPasswordError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ForgotPassword",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ForgotPasswordResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ForgotPasswordError::from_response(response))),
)
}
})
}
fn get_csv_header(
&self,
input: GetCSVHeaderRequest,
) -> RusotoFuture<GetCSVHeaderResponse, GetCSVHeaderError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.GetCSVHeader",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetCSVHeaderResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetCSVHeaderError::from_response(response))),
)
}
})
}
fn get_device(
&self,
input: GetDeviceRequest,
) -> RusotoFuture<GetDeviceResponse, GetDeviceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.GetDevice",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetDeviceResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDeviceError::from_response(response))),
)
}
})
}
fn get_group(&self, input: GetGroupRequest) -> RusotoFuture<GetGroupResponse, GetGroupError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AWSCognitoIdentityProviderService.GetGroup");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetGroupResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetGroupError::from_response(response))),
)
}
})
}
fn get_identity_provider_by_identifier(
&self,
input: GetIdentityProviderByIdentifierRequest,
) -> RusotoFuture<GetIdentityProviderByIdentifierResponse, GetIdentityProviderByIdentifierError>
{
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.GetIdentityProviderByIdentifier",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetIdentityProviderByIdentifierResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetIdentityProviderByIdentifierError::from_response(
response,
))
}))
}
})
}
fn get_signing_certificate(
&self,
input: GetSigningCertificateRequest,
) -> RusotoFuture<GetSigningCertificateResponse, GetSigningCertificateError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.GetSigningCertificate",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetSigningCertificateResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetSigningCertificateError::from_response(response))
}),
)
}
})
}
fn get_ui_customization(
&self,
input: GetUICustomizationRequest,
) -> RusotoFuture<GetUICustomizationResponse, GetUICustomizationError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.GetUICustomization",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetUICustomizationResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetUICustomizationError::from_response(response))),
)
}
})
}
fn get_user(&self, input: GetUserRequest) -> RusotoFuture<GetUserResponse, GetUserError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AWSCognitoIdentityProviderService.GetUser");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<GetUserResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetUserError::from_response(response))),
)
}
})
}
fn get_user_attribute_verification_code(
&self,
input: GetUserAttributeVerificationCodeRequest,
) -> RusotoFuture<GetUserAttributeVerificationCodeResponse, GetUserAttributeVerificationCodeError>
{
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.GetUserAttributeVerificationCode",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetUserAttributeVerificationCodeResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetUserAttributeVerificationCodeError::from_response(
response,
))
}))
}
})
}
fn get_user_pool_mfa_config(
&self,
input: GetUserPoolMfaConfigRequest,
) -> RusotoFuture<GetUserPoolMfaConfigResponse, GetUserPoolMfaConfigError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.GetUserPoolMfaConfig",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetUserPoolMfaConfigResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetUserPoolMfaConfigError::from_response(response))
}),
)
}
})
}
fn global_sign_out(
&self,
input: GlobalSignOutRequest,
) -> RusotoFuture<GlobalSignOutResponse, GlobalSignOutError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.GlobalSignOut",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GlobalSignOutResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GlobalSignOutError::from_response(response))),
)
}
})
}
fn initiate_auth(
&self,
input: InitiateAuthRequest,
) -> RusotoFuture<InitiateAuthResponse, InitiateAuthError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.InitiateAuth",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<InitiateAuthResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(InitiateAuthError::from_response(response))),
)
}
})
}
fn list_devices(
&self,
input: ListDevicesRequest,
) -> RusotoFuture<ListDevicesResponse, ListDevicesError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListDevices",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListDevicesResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDevicesError::from_response(response))),
)
}
})
}
fn list_groups(
&self,
input: ListGroupsRequest,
) -> RusotoFuture<ListGroupsResponse, ListGroupsError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListGroups",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListGroupsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListGroupsError::from_response(response))),
)
}
})
}
fn list_identity_providers(
&self,
input: ListIdentityProvidersRequest,
) -> RusotoFuture<ListIdentityProvidersResponse, ListIdentityProvidersError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListIdentityProviders",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListIdentityProvidersResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListIdentityProvidersError::from_response(response))
}),
)
}
})
}
fn list_resource_servers(
&self,
input: ListResourceServersRequest,
) -> RusotoFuture<ListResourceServersResponse, ListResourceServersError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListResourceServers",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListResourceServersResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListResourceServersError::from_response(response))
}),
)
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListTagsForResource",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn list_user_import_jobs(
&self,
input: ListUserImportJobsRequest,
) -> RusotoFuture<ListUserImportJobsResponse, ListUserImportJobsError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListUserImportJobs",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListUserImportJobsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListUserImportJobsError::from_response(response))),
)
}
})
}
fn list_user_pool_clients(
&self,
input: ListUserPoolClientsRequest,
) -> RusotoFuture<ListUserPoolClientsResponse, ListUserPoolClientsError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListUserPoolClients",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListUserPoolClientsResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListUserPoolClientsError::from_response(response))
}),
)
}
})
}
fn list_user_pools(
&self,
input: ListUserPoolsRequest,
) -> RusotoFuture<ListUserPoolsResponse, ListUserPoolsError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListUserPools",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListUserPoolsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListUserPoolsError::from_response(response))),
)
}
})
}
fn list_users(
&self,
input: ListUsersRequest,
) -> RusotoFuture<ListUsersResponse, ListUsersError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListUsers",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListUsersResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListUsersError::from_response(response))),
)
}
})
}
fn list_users_in_group(
&self,
input: ListUsersInGroupRequest,
) -> RusotoFuture<ListUsersInGroupResponse, ListUsersInGroupError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ListUsersInGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListUsersInGroupResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListUsersInGroupError::from_response(response))),
)
}
})
}
fn resend_confirmation_code(
&self,
input: ResendConfirmationCodeRequest,
) -> RusotoFuture<ResendConfirmationCodeResponse, ResendConfirmationCodeError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.ResendConfirmationCode",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ResendConfirmationCodeResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ResendConfirmationCodeError::from_response(response))
}),
)
}
})
}
fn respond_to_auth_challenge(
&self,
input: RespondToAuthChallengeRequest,
) -> RusotoFuture<RespondToAuthChallengeResponse, RespondToAuthChallengeError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.RespondToAuthChallenge",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<RespondToAuthChallengeResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RespondToAuthChallengeError::from_response(response))
}),
)
}
})
}
fn set_risk_configuration(
&self,
input: SetRiskConfigurationRequest,
) -> RusotoFuture<SetRiskConfigurationResponse, SetRiskConfigurationError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.SetRiskConfiguration",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<SetRiskConfigurationResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(SetRiskConfigurationError::from_response(response))
}),
)
}
})
}
fn set_ui_customization(
&self,
input: SetUICustomizationRequest,
) -> RusotoFuture<SetUICustomizationResponse, SetUICustomizationError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.SetUICustomization",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<SetUICustomizationResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SetUICustomizationError::from_response(response))),
)
}
})
}
fn set_user_mfa_preference(
&self,
input: SetUserMFAPreferenceRequest,
) -> RusotoFuture<SetUserMFAPreferenceResponse, SetUserMFAPreferenceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.SetUserMFAPreference",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<SetUserMFAPreferenceResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(SetUserMFAPreferenceError::from_response(response))
}),
)
}
})
}
fn set_user_pool_mfa_config(
&self,
input: SetUserPoolMfaConfigRequest,
) -> RusotoFuture<SetUserPoolMfaConfigResponse, SetUserPoolMfaConfigError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.SetUserPoolMfaConfig",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<SetUserPoolMfaConfigResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(SetUserPoolMfaConfigError::from_response(response))
}),
)
}
})
}
fn set_user_settings(
&self,
input: SetUserSettingsRequest,
) -> RusotoFuture<SetUserSettingsResponse, SetUserSettingsError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.SetUserSettings",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<SetUserSettingsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SetUserSettingsError::from_response(response))),
)
}
})
}
fn sign_up(&self, input: SignUpRequest) -> RusotoFuture<SignUpResponse, SignUpError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AWSCognitoIdentityProviderService.SignUp");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<SignUpResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SignUpError::from_response(response))),
)
}
})
}
fn start_user_import_job(
&self,
input: StartUserImportJobRequest,
) -> RusotoFuture<StartUserImportJobResponse, StartUserImportJobError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.StartUserImportJob",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<StartUserImportJobResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartUserImportJobError::from_response(response))),
)
}
})
}
fn stop_user_import_job(
&self,
input: StopUserImportJobRequest,
) -> RusotoFuture<StopUserImportJobResponse, StopUserImportJobError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.StopUserImportJob",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<StopUserImportJobResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopUserImportJobError::from_response(response))),
)
}
})
}
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.TagResource",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<TagResourceResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TagResourceError::from_response(response))),
)
}
})
}
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UntagResource",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UntagResourceResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UntagResourceError::from_response(response))),
)
}
})
}
fn update_auth_event_feedback(
&self,
input: UpdateAuthEventFeedbackRequest,
) -> RusotoFuture<UpdateAuthEventFeedbackResponse, UpdateAuthEventFeedbackError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UpdateAuthEventFeedback",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateAuthEventFeedbackResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateAuthEventFeedbackError::from_response(response))
}))
}
})
}
fn update_device_status(
&self,
input: UpdateDeviceStatusRequest,
) -> RusotoFuture<UpdateDeviceStatusResponse, UpdateDeviceStatusError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UpdateDeviceStatus",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDeviceStatusResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateDeviceStatusError::from_response(response))),
)
}
})
}
fn update_group(
&self,
input: UpdateGroupRequest,
) -> RusotoFuture<UpdateGroupResponse, UpdateGroupError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UpdateGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateGroupResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateGroupError::from_response(response))),
)
}
})
}
fn update_identity_provider(
&self,
input: UpdateIdentityProviderRequest,
) -> RusotoFuture<UpdateIdentityProviderResponse, UpdateIdentityProviderError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UpdateIdentityProvider",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateIdentityProviderResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateIdentityProviderError::from_response(response))
}),
)
}
})
}
fn update_resource_server(
&self,
input: UpdateResourceServerRequest,
) -> RusotoFuture<UpdateResourceServerResponse, UpdateResourceServerError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UpdateResourceServer",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateResourceServerResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateResourceServerError::from_response(response))
}),
)
}
})
}
fn update_user_attributes(
&self,
input: UpdateUserAttributesRequest,
) -> RusotoFuture<UpdateUserAttributesResponse, UpdateUserAttributesError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UpdateUserAttributes",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateUserAttributesResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateUserAttributesError::from_response(response))
}),
)
}
})
}
fn update_user_pool(
&self,
input: UpdateUserPoolRequest,
) -> RusotoFuture<UpdateUserPoolResponse, UpdateUserPoolError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UpdateUserPool",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateUserPoolResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateUserPoolError::from_response(response))),
)
}
})
}
fn update_user_pool_client(
&self,
input: UpdateUserPoolClientRequest,
) -> RusotoFuture<UpdateUserPoolClientResponse, UpdateUserPoolClientError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UpdateUserPoolClient",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateUserPoolClientResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateUserPoolClientError::from_response(response))
}),
)
}
})
}
fn update_user_pool_domain(
&self,
input: UpdateUserPoolDomainRequest,
) -> RusotoFuture<UpdateUserPoolDomainResponse, UpdateUserPoolDomainError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.UpdateUserPoolDomain",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateUserPoolDomainResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateUserPoolDomainError::from_response(response))
}),
)
}
})
}
fn verify_software_token(
&self,
input: VerifySoftwareTokenRequest,
) -> RusotoFuture<VerifySoftwareTokenResponse, VerifySoftwareTokenError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.VerifySoftwareToken",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<VerifySoftwareTokenResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(VerifySoftwareTokenError::from_response(response))
}),
)
}
})
}
fn verify_user_attribute(
&self,
input: VerifyUserAttributeRequest,
) -> RusotoFuture<VerifyUserAttributeResponse, VerifyUserAttributeError> {
let mut request = SignedRequest::new("POST", "cognito-idp", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSCognitoIdentityProviderService.VerifyUserAttribute",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<VerifyUserAttributeResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(VerifyUserAttributeError::from_response(response))
}),
)
}
})
}
}