use std::error::Error;
use std::fmt;
use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};
use serde_json;
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Account {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "AccountType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_type: Option<String>,
#[serde(rename = "AwsAccountId")]
pub aws_account_id: String,
#[serde(rename = "CreatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_timestamp: Option<f64>,
#[serde(rename = "DefaultLicense")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_license: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SigninDelegateGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub signin_delegate_groups: Option<Vec<SigninDelegateGroup>>,
#[serde(rename = "SupportedLicenses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub supported_licenses: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AccountSettings {
#[serde(rename = "DisableRemoteControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_remote_control: Option<bool>,
#[serde(rename = "EnableDialOut")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_dial_out: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AlexaForBusinessMetadata {
#[serde(rename = "AlexaForBusinessRoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alexa_for_business_room_arn: Option<String>,
#[serde(rename = "IsAlexaForBusinessEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_alexa_for_business_enabled: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AssociatePhoneNumberWithUserRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "E164PhoneNumber")]
pub e164_phone_number: String,
#[serde(rename = "UserId")]
pub user_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct AssociatePhoneNumberWithUserResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AssociatePhoneNumbersWithVoiceConnectorGroupRequest {
#[serde(rename = "E164PhoneNumbers")]
pub e164_phone_numbers: Vec<String>,
#[serde(rename = "ForceAssociate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_associate: Option<bool>,
#[serde(rename = "VoiceConnectorGroupId")]
pub voice_connector_group_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct AssociatePhoneNumbersWithVoiceConnectorGroupResponse {
#[serde(rename = "PhoneNumberErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_errors: Option<Vec<PhoneNumberError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AssociatePhoneNumbersWithVoiceConnectorRequest {
#[serde(rename = "E164PhoneNumbers")]
pub e164_phone_numbers: Vec<String>,
#[serde(rename = "ForceAssociate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_associate: Option<bool>,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct AssociatePhoneNumbersWithVoiceConnectorResponse {
#[serde(rename = "PhoneNumberErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_errors: Option<Vec<PhoneNumberError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AssociateSigninDelegateGroupsWithAccountRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "SigninDelegateGroups")]
pub signin_delegate_groups: Vec<SigninDelegateGroup>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct AssociateSigninDelegateGroupsWithAccountResponse {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Attendee {
#[serde(rename = "AttendeeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attendee_id: Option<String>,
#[serde(rename = "ExternalUserId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub external_user_id: Option<String>,
#[serde(rename = "JoinToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub join_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchCreateAttendeeRequest {
#[serde(rename = "Attendees")]
pub attendees: Vec<CreateAttendeeRequestItem>,
#[serde(rename = "MeetingId")]
pub meeting_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchCreateAttendeeResponse {
#[serde(rename = "Attendees")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attendees: Option<Vec<Attendee>>,
#[serde(rename = "Errors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub errors: Option<Vec<ChimeCreateAttendeeError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchCreateRoomMembershipRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "MembershipItemList")]
pub membership_item_list: Vec<MembershipItem>,
#[serde(rename = "RoomId")]
pub room_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchCreateRoomMembershipResponse {
#[serde(rename = "Errors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub errors: Option<Vec<MemberError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchDeletePhoneNumberRequest {
#[serde(rename = "PhoneNumberIds")]
pub phone_number_ids: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchDeletePhoneNumberResponse {
#[serde(rename = "PhoneNumberErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_errors: Option<Vec<PhoneNumberError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchSuspendUserRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UserIdList")]
pub user_id_list: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchSuspendUserResponse {
#[serde(rename = "UserErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_errors: Option<Vec<UserError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchUnsuspendUserRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UserIdList")]
pub user_id_list: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchUnsuspendUserResponse {
#[serde(rename = "UserErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_errors: Option<Vec<UserError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchUpdatePhoneNumberRequest {
#[serde(rename = "UpdatePhoneNumberRequestItems")]
pub update_phone_number_request_items: Vec<UpdatePhoneNumberRequestItem>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchUpdatePhoneNumberResponse {
#[serde(rename = "PhoneNumberErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_errors: Option<Vec<PhoneNumberError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchUpdateUserRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UpdateUserRequestItems")]
pub update_user_request_items: Vec<UpdateUserRequestItem>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchUpdateUserResponse {
#[serde(rename = "UserErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_errors: Option<Vec<UserError>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Bot {
#[serde(rename = "BotEmail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bot_email: Option<String>,
#[serde(rename = "BotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bot_id: Option<String>,
#[serde(rename = "BotType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bot_type: Option<String>,
#[serde(rename = "CreatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_timestamp: Option<f64>,
#[serde(rename = "Disabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disabled: Option<bool>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "SecurityToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_token: Option<String>,
#[serde(rename = "UpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_timestamp: Option<f64>,
#[serde(rename = "UserId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct BusinessCallingSettings {
#[serde(rename = "CdrBucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cdr_bucket: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ConversationRetentionSettings {
#[serde(rename = "RetentionDays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_days: Option<i64>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateAccountRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateAccountResponse {
#[serde(rename = "Account")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account: Option<Account>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ChimeCreateAttendeeError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "ExternalUserId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub external_user_id: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateAttendeeRequest {
#[serde(rename = "ExternalUserId")]
pub external_user_id: String,
#[serde(rename = "MeetingId")]
pub meeting_id: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateAttendeeRequestItem {
#[serde(rename = "ExternalUserId")]
pub external_user_id: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateAttendeeResponse {
#[serde(rename = "Attendee")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attendee: Option<Attendee>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateBotRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "DisplayName")]
pub display_name: String,
#[serde(rename = "Domain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateBotResponse {
#[serde(rename = "Bot")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bot: Option<Bot>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateMeetingRequest {
#[serde(rename = "ClientRequestToken")]
pub client_request_token: String,
#[serde(rename = "ExternalMeetingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub external_meeting_id: Option<String>,
#[serde(rename = "MediaRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub media_region: Option<String>,
#[serde(rename = "MeetingHostId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub meeting_host_id: Option<String>,
#[serde(rename = "NotificationsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notifications_configuration: Option<MeetingNotificationConfiguration>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateMeetingResponse {
#[serde(rename = "Meeting")]
#[serde(skip_serializing_if = "Option::is_none")]
pub meeting: Option<Meeting>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateMeetingWithAttendeesRequest {
#[serde(rename = "Attendees")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attendees: Option<Vec<CreateAttendeeRequestItem>>,
#[serde(rename = "ClientRequestToken")]
pub client_request_token: String,
#[serde(rename = "ExternalMeetingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub external_meeting_id: Option<String>,
#[serde(rename = "MediaRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub media_region: Option<String>,
#[serde(rename = "MeetingHostId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub meeting_host_id: Option<String>,
#[serde(rename = "NotificationsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notifications_configuration: Option<MeetingNotificationConfiguration>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateMeetingWithAttendeesResponse {
#[serde(rename = "Attendees")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attendees: Option<Vec<Attendee>>,
#[serde(rename = "Errors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub errors: Option<Vec<ChimeCreateAttendeeError>>,
#[serde(rename = "Meeting")]
#[serde(skip_serializing_if = "Option::is_none")]
pub meeting: Option<Meeting>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreatePhoneNumberOrderRequest {
#[serde(rename = "E164PhoneNumbers")]
pub e164_phone_numbers: Vec<String>,
#[serde(rename = "ProductType")]
pub product_type: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreatePhoneNumberOrderResponse {
#[serde(rename = "PhoneNumberOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_order: Option<PhoneNumberOrder>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateProxySessionRequest {
#[serde(rename = "Capabilities")]
pub capabilities: Vec<String>,
#[serde(rename = "ExpiryMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expiry_minutes: Option<i64>,
#[serde(rename = "GeoMatchLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub geo_match_level: Option<String>,
#[serde(rename = "GeoMatchParams")]
#[serde(skip_serializing_if = "Option::is_none")]
pub geo_match_params: Option<GeoMatchParams>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "NumberSelectionBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_selection_behavior: Option<String>,
#[serde(rename = "ParticipantPhoneNumbers")]
pub participant_phone_numbers: Vec<String>,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateProxySessionResponse {
#[serde(rename = "ProxySession")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proxy_session: Option<ProxySession>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateRoomMembershipRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "MemberId")]
pub member_id: String,
#[serde(rename = "Role")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
#[serde(rename = "RoomId")]
pub room_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateRoomMembershipResponse {
#[serde(rename = "RoomMembership")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_membership: Option<RoomMembership>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateRoomRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "ClientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateRoomResponse {
#[serde(rename = "Room")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room: Option<Room>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateUserRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "Email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "UserType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_type: Option<String>,
#[serde(rename = "Username")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateUserResponse {
#[serde(rename = "User")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<User>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateVoiceConnectorGroupRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "VoiceConnectorItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector_items: Option<Vec<VoiceConnectorItem>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateVoiceConnectorGroupResponse {
#[serde(rename = "VoiceConnectorGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector_group: Option<VoiceConnectorGroup>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateVoiceConnectorRequest {
#[serde(rename = "AwsRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_region: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RequireEncryption")]
pub require_encryption: bool,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateVoiceConnectorResponse {
#[serde(rename = "VoiceConnector")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector: Option<VoiceConnector>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct Credential {
#[serde(rename = "Password")]
#[serde(skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
#[serde(rename = "Username")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct DNISEmergencyCallingConfiguration {
#[serde(rename = "CallingCountry")]
pub calling_country: String,
#[serde(rename = "EmergencyPhoneNumber")]
pub emergency_phone_number: String,
#[serde(rename = "TestPhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub test_phone_number: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteAccountRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteAccountResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteAttendeeRequest {
#[serde(rename = "AttendeeId")]
pub attendee_id: String,
#[serde(rename = "MeetingId")]
pub meeting_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteEventsConfigurationRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "BotId")]
pub bot_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteMeetingRequest {
#[serde(rename = "MeetingId")]
pub meeting_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeletePhoneNumberRequest {
#[serde(rename = "PhoneNumberId")]
pub phone_number_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteProxySessionRequest {
#[serde(rename = "ProxySessionId")]
pub proxy_session_id: String,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteRoomMembershipRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "MemberId")]
pub member_id: String,
#[serde(rename = "RoomId")]
pub room_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteRoomRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "RoomId")]
pub room_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVoiceConnectorEmergencyCallingConfigurationRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVoiceConnectorGroupRequest {
#[serde(rename = "VoiceConnectorGroupId")]
pub voice_connector_group_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVoiceConnectorOriginationRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVoiceConnectorProxyRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVoiceConnectorRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVoiceConnectorStreamingConfigurationRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVoiceConnectorTerminationCredentialsRequest {
#[serde(rename = "Usernames")]
pub usernames: Vec<String>,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVoiceConnectorTerminationRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DisassociatePhoneNumberFromUserRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UserId")]
pub user_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DisassociatePhoneNumberFromUserResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DisassociatePhoneNumbersFromVoiceConnectorGroupRequest {
#[serde(rename = "E164PhoneNumbers")]
pub e164_phone_numbers: Vec<String>,
#[serde(rename = "VoiceConnectorGroupId")]
pub voice_connector_group_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DisassociatePhoneNumbersFromVoiceConnectorGroupResponse {
#[serde(rename = "PhoneNumberErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_errors: Option<Vec<PhoneNumberError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DisassociatePhoneNumbersFromVoiceConnectorRequest {
#[serde(rename = "E164PhoneNumbers")]
pub e164_phone_numbers: Vec<String>,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DisassociatePhoneNumbersFromVoiceConnectorResponse {
#[serde(rename = "PhoneNumberErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_errors: Option<Vec<PhoneNumberError>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DisassociateSigninDelegateGroupsFromAccountRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "GroupNames")]
pub group_names: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DisassociateSigninDelegateGroupsFromAccountResponse {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct EmergencyCallingConfiguration {
#[serde(rename = "DNIS")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dnis: Option<Vec<DNISEmergencyCallingConfiguration>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EventsConfiguration {
#[serde(rename = "BotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bot_id: Option<String>,
#[serde(rename = "LambdaFunctionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lambda_function_arn: Option<String>,
#[serde(rename = "OutboundEventsHTTPSEndpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outbound_events_https_endpoint: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GeoMatchParams {
#[serde(rename = "AreaCode")]
pub area_code: String,
#[serde(rename = "Country")]
pub country: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetAccountRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetAccountResponse {
#[serde(rename = "Account")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account: Option<Account>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetAccountSettingsRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetAccountSettingsResponse {
#[serde(rename = "AccountSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_settings: Option<AccountSettings>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetAttendeeRequest {
#[serde(rename = "AttendeeId")]
pub attendee_id: String,
#[serde(rename = "MeetingId")]
pub meeting_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetAttendeeResponse {
#[serde(rename = "Attendee")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attendee: Option<Attendee>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetBotRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "BotId")]
pub bot_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetBotResponse {
#[serde(rename = "Bot")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bot: Option<Bot>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetEventsConfigurationRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "BotId")]
pub bot_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetEventsConfigurationResponse {
#[serde(rename = "EventsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub events_configuration: Option<EventsConfiguration>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetGlobalSettingsResponse {
#[serde(rename = "BusinessCalling")]
#[serde(skip_serializing_if = "Option::is_none")]
pub business_calling: Option<BusinessCallingSettings>,
#[serde(rename = "VoiceConnector")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector: Option<VoiceConnectorSettings>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetMeetingRequest {
#[serde(rename = "MeetingId")]
pub meeting_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetMeetingResponse {
#[serde(rename = "Meeting")]
#[serde(skip_serializing_if = "Option::is_none")]
pub meeting: Option<Meeting>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetPhoneNumberOrderRequest {
#[serde(rename = "PhoneNumberOrderId")]
pub phone_number_order_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetPhoneNumberOrderResponse {
#[serde(rename = "PhoneNumberOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_order: Option<PhoneNumberOrder>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetPhoneNumberRequest {
#[serde(rename = "PhoneNumberId")]
pub phone_number_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetPhoneNumberResponse {
#[serde(rename = "PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number: Option<PhoneNumber>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetPhoneNumberSettingsResponse {
#[serde(rename = "CallingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub calling_name: Option<String>,
#[serde(rename = "CallingNameUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub calling_name_updated_timestamp: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetProxySessionRequest {
#[serde(rename = "ProxySessionId")]
pub proxy_session_id: String,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetProxySessionResponse {
#[serde(rename = "ProxySession")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proxy_session: Option<ProxySession>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetRetentionSettingsRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetRetentionSettingsResponse {
#[serde(rename = "InitiateDeletionTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initiate_deletion_timestamp: Option<f64>,
#[serde(rename = "RetentionSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_settings: Option<RetentionSettings>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetRoomRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "RoomId")]
pub room_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetRoomResponse {
#[serde(rename = "Room")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room: Option<Room>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetUserRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UserId")]
pub user_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetUserResponse {
#[serde(rename = "User")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<User>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetUserSettingsRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UserId")]
pub user_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetUserSettingsResponse {
#[serde(rename = "UserSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_settings: Option<UserSettings>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVoiceConnectorEmergencyCallingConfigurationRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetVoiceConnectorEmergencyCallingConfigurationResponse {
#[serde(rename = "EmergencyCallingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub emergency_calling_configuration: Option<EmergencyCallingConfiguration>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVoiceConnectorGroupRequest {
#[serde(rename = "VoiceConnectorGroupId")]
pub voice_connector_group_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetVoiceConnectorGroupResponse {
#[serde(rename = "VoiceConnectorGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector_group: Option<VoiceConnectorGroup>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVoiceConnectorLoggingConfigurationRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetVoiceConnectorLoggingConfigurationResponse {
#[serde(rename = "LoggingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_configuration: Option<LoggingConfiguration>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVoiceConnectorOriginationRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetVoiceConnectorOriginationResponse {
#[serde(rename = "Origination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub origination: Option<Origination>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVoiceConnectorProxyRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetVoiceConnectorProxyResponse {
#[serde(rename = "Proxy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proxy: Option<Proxy>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVoiceConnectorRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetVoiceConnectorResponse {
#[serde(rename = "VoiceConnector")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector: Option<VoiceConnector>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVoiceConnectorStreamingConfigurationRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetVoiceConnectorStreamingConfigurationResponse {
#[serde(rename = "StreamingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub streaming_configuration: Option<StreamingConfiguration>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVoiceConnectorTerminationHealthRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetVoiceConnectorTerminationHealthResponse {
#[serde(rename = "TerminationHealth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub termination_health: Option<TerminationHealth>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVoiceConnectorTerminationRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetVoiceConnectorTerminationResponse {
#[serde(rename = "Termination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub termination: Option<Termination>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Invite {
#[serde(rename = "EmailAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_address: Option<String>,
#[serde(rename = "EmailStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_status: Option<String>,
#[serde(rename = "InviteId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invite_id: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct InviteUsersRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UserEmailList")]
pub user_email_list: Vec<String>,
#[serde(rename = "UserType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_type: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct InviteUsersResponse {
#[serde(rename = "Invites")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invites: Option<Vec<Invite>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListAccountsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserEmail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_email: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListAccountsResponse {
#[serde(rename = "Accounts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accounts: Option<Vec<Account>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListAttendeeTagsRequest {
#[serde(rename = "AttendeeId")]
pub attendee_id: String,
#[serde(rename = "MeetingId")]
pub meeting_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListAttendeeTagsResponse {
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListAttendeesRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "MeetingId")]
pub meeting_id: String,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListAttendeesResponse {
#[serde(rename = "Attendees")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attendees: Option<Vec<Attendee>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListBotsRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[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>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListBotsResponse {
#[serde(rename = "Bots")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bots: Option<Vec<Bot>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListMeetingTagsRequest {
#[serde(rename = "MeetingId")]
pub meeting_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListMeetingTagsResponse {
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListMeetingsRequest {
#[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>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListMeetingsResponse {
#[serde(rename = "Meetings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub meetings: Option<Vec<Meeting>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListPhoneNumberOrdersRequest {
#[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>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListPhoneNumberOrdersResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "PhoneNumberOrders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_orders: Option<Vec<PhoneNumberOrder>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListPhoneNumbersRequest {
#[serde(rename = "FilterName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_name: Option<String>,
#[serde(rename = "FilterValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_value: Option<String>,
#[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 = "ProductType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_type: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListPhoneNumbersResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "PhoneNumbers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_numbers: Option<Vec<PhoneNumber>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListProxySessionsRequest {
#[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 = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListProxySessionsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ProxySessions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proxy_sessions: Option<Vec<ProxySession>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListRoomMembershipsRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[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 = "RoomId")]
pub room_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListRoomMembershipsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "RoomMemberships")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_memberships: Option<Vec<RoomMembership>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListRoomsRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "MemberId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub member_id: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListRoomsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Rooms")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rooms: Option<Vec<Room>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListTagsForResourceRequest {
#[serde(rename = "ResourceARN")]
pub resource_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListTagsForResourceResponse {
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListUsersRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[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 = "UserEmail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_email: Option<String>,
#[serde(rename = "UserType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_type: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListUsersResponse {
#[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<User>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListVoiceConnectorGroupsRequest {
#[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>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListVoiceConnectorGroupsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "VoiceConnectorGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector_groups: Option<Vec<VoiceConnectorGroup>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListVoiceConnectorTerminationCredentialsRequest {
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListVoiceConnectorTerminationCredentialsResponse {
#[serde(rename = "Usernames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub usernames: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListVoiceConnectorsRequest {
#[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>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListVoiceConnectorsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "VoiceConnectors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connectors: Option<Vec<VoiceConnector>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct LoggingConfiguration {
#[serde(rename = "EnableSIPLogs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_sip_logs: Option<bool>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct LogoutUserRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UserId")]
pub user_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct LogoutUserResponse {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MediaPlacement {
#[serde(rename = "AudioFallbackUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_fallback_url: Option<String>,
#[serde(rename = "AudioHostUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_host_url: Option<String>,
#[serde(rename = "ScreenDataUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub screen_data_url: Option<String>,
#[serde(rename = "ScreenSharingUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub screen_sharing_url: Option<String>,
#[serde(rename = "ScreenViewingUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub screen_viewing_url: Option<String>,
#[serde(rename = "SignalingUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub signaling_url: Option<String>,
#[serde(rename = "TurnControlUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub turn_control_url: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Meeting {
#[serde(rename = "ExternalMeetingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub external_meeting_id: Option<String>,
#[serde(rename = "MediaPlacement")]
#[serde(skip_serializing_if = "Option::is_none")]
pub media_placement: Option<MediaPlacement>,
#[serde(rename = "MediaRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub media_region: Option<String>,
#[serde(rename = "MeetingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub meeting_id: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct MeetingNotificationConfiguration {
#[serde(rename = "SnsTopicArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sns_topic_arn: Option<String>,
#[serde(rename = "SqsQueueArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sqs_queue_arn: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Member {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "Email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "FullName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub full_name: Option<String>,
#[serde(rename = "MemberId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub member_id: Option<String>,
#[serde(rename = "MemberType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub member_type: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MemberError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "MemberId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub member_id: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct MembershipItem {
#[serde(rename = "MemberId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub member_id: Option<String>,
#[serde(rename = "Role")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct OrderedPhoneNumber {
#[serde(rename = "E164PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub e164_phone_number: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Origination {
#[serde(rename = "Disabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disabled: Option<bool>,
#[serde(rename = "Routes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub routes: Option<Vec<OriginationRoute>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct OriginationRoute {
#[serde(rename = "Host")]
#[serde(skip_serializing_if = "Option::is_none")]
pub host: Option<String>,
#[serde(rename = "Port")]
#[serde(skip_serializing_if = "Option::is_none")]
pub port: Option<i64>,
#[serde(rename = "Priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "Protocol")]
#[serde(skip_serializing_if = "Option::is_none")]
pub protocol: Option<String>,
#[serde(rename = "Weight")]
#[serde(skip_serializing_if = "Option::is_none")]
pub weight: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Participant {
#[serde(rename = "PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number: Option<String>,
#[serde(rename = "ProxyPhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proxy_phone_number: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PhoneNumber {
#[serde(rename = "Associations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associations: Option<Vec<PhoneNumberAssociation>>,
#[serde(rename = "CallingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub calling_name: Option<String>,
#[serde(rename = "CallingNameStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub calling_name_status: Option<String>,
#[serde(rename = "Capabilities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub capabilities: Option<PhoneNumberCapabilities>,
#[serde(rename = "CreatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_timestamp: Option<f64>,
#[serde(rename = "DeletionTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletion_timestamp: Option<f64>,
#[serde(rename = "E164PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub e164_phone_number: Option<String>,
#[serde(rename = "PhoneNumberId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_id: Option<String>,
#[serde(rename = "ProductType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_type: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "UpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_timestamp: Option<f64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PhoneNumberAssociation {
#[serde(rename = "AssociatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_timestamp: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PhoneNumberCapabilities {
#[serde(rename = "InboundCall")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inbound_call: Option<bool>,
#[serde(rename = "InboundMMS")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inbound_mms: Option<bool>,
#[serde(rename = "InboundSMS")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inbound_sms: Option<bool>,
#[serde(rename = "OutboundCall")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outbound_call: Option<bool>,
#[serde(rename = "OutboundMMS")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outbound_mms: Option<bool>,
#[serde(rename = "OutboundSMS")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outbound_sms: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PhoneNumberError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "PhoneNumberId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PhoneNumberOrder {
#[serde(rename = "CreatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_timestamp: Option<f64>,
#[serde(rename = "OrderedPhoneNumbers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ordered_phone_numbers: Option<Vec<OrderedPhoneNumber>>,
#[serde(rename = "PhoneNumberOrderId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_order_id: Option<String>,
#[serde(rename = "ProductType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_type: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "UpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_timestamp: Option<f64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Proxy {
#[serde(rename = "DefaultSessionExpiryMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_session_expiry_minutes: Option<i64>,
#[serde(rename = "Disabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disabled: Option<bool>,
#[serde(rename = "FallBackPhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fall_back_phone_number: Option<String>,
#[serde(rename = "PhoneNumberCountries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number_countries: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ProxySession {
#[serde(rename = "Capabilities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub capabilities: Option<Vec<String>>,
#[serde(rename = "CreatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_timestamp: Option<f64>,
#[serde(rename = "EndedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ended_timestamp: Option<f64>,
#[serde(rename = "ExpiryMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expiry_minutes: Option<i64>,
#[serde(rename = "GeoMatchLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub geo_match_level: Option<String>,
#[serde(rename = "GeoMatchParams")]
#[serde(skip_serializing_if = "Option::is_none")]
pub geo_match_params: Option<GeoMatchParams>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "NumberSelectionBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_selection_behavior: Option<String>,
#[serde(rename = "Participants")]
#[serde(skip_serializing_if = "Option::is_none")]
pub participants: Option<Vec<Participant>>,
#[serde(rename = "ProxySessionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proxy_session_id: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "UpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_timestamp: Option<f64>,
#[serde(rename = "VoiceConnectorId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector_id: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutEventsConfigurationRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "BotId")]
pub bot_id: String,
#[serde(rename = "LambdaFunctionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lambda_function_arn: Option<String>,
#[serde(rename = "OutboundEventsHTTPSEndpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outbound_events_https_endpoint: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutEventsConfigurationResponse {
#[serde(rename = "EventsConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub events_configuration: Option<EventsConfiguration>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutRetentionSettingsRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "RetentionSettings")]
pub retention_settings: RetentionSettings,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutRetentionSettingsResponse {
#[serde(rename = "InitiateDeletionTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initiate_deletion_timestamp: Option<f64>,
#[serde(rename = "RetentionSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_settings: Option<RetentionSettings>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutVoiceConnectorEmergencyCallingConfigurationRequest {
#[serde(rename = "EmergencyCallingConfiguration")]
pub emergency_calling_configuration: EmergencyCallingConfiguration,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutVoiceConnectorEmergencyCallingConfigurationResponse {
#[serde(rename = "EmergencyCallingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub emergency_calling_configuration: Option<EmergencyCallingConfiguration>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutVoiceConnectorLoggingConfigurationRequest {
#[serde(rename = "LoggingConfiguration")]
pub logging_configuration: LoggingConfiguration,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutVoiceConnectorLoggingConfigurationResponse {
#[serde(rename = "LoggingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_configuration: Option<LoggingConfiguration>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutVoiceConnectorOriginationRequest {
#[serde(rename = "Origination")]
pub origination: Origination,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutVoiceConnectorOriginationResponse {
#[serde(rename = "Origination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub origination: Option<Origination>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutVoiceConnectorProxyRequest {
#[serde(rename = "DefaultSessionExpiryMinutes")]
pub default_session_expiry_minutes: i64,
#[serde(rename = "Disabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disabled: Option<bool>,
#[serde(rename = "FallBackPhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fall_back_phone_number: Option<String>,
#[serde(rename = "PhoneNumberPoolCountries")]
pub phone_number_pool_countries: Vec<String>,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutVoiceConnectorProxyResponse {
#[serde(rename = "Proxy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proxy: Option<Proxy>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutVoiceConnectorStreamingConfigurationRequest {
#[serde(rename = "StreamingConfiguration")]
pub streaming_configuration: StreamingConfiguration,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutVoiceConnectorStreamingConfigurationResponse {
#[serde(rename = "StreamingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub streaming_configuration: Option<StreamingConfiguration>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutVoiceConnectorTerminationCredentialsRequest {
#[serde(rename = "Credentials")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credentials: Option<Vec<Credential>>,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutVoiceConnectorTerminationRequest {
#[serde(rename = "Termination")]
pub termination: Termination,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutVoiceConnectorTerminationResponse {
#[serde(rename = "Termination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub termination: Option<Termination>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct RedactConversationMessageRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "ConversationId")]
pub conversation_id: String,
#[serde(rename = "MessageId")]
pub message_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RedactConversationMessageResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct RedactRoomMessageRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "MessageId")]
pub message_id: String,
#[serde(rename = "RoomId")]
pub room_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RedactRoomMessageResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct RegenerateSecurityTokenRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "BotId")]
pub bot_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RegenerateSecurityTokenResponse {
#[serde(rename = "Bot")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bot: Option<Bot>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ResetPersonalPINRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UserId")]
pub user_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ResetPersonalPINResponse {
#[serde(rename = "User")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<User>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct RestorePhoneNumberRequest {
#[serde(rename = "PhoneNumberId")]
pub phone_number_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RestorePhoneNumberResponse {
#[serde(rename = "PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number: Option<PhoneNumber>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct RetentionSettings {
#[serde(rename = "ConversationRetentionSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub conversation_retention_settings: Option<ConversationRetentionSettings>,
#[serde(rename = "RoomRetentionSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_retention_settings: Option<RoomRetentionSettings>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Room {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "CreatedBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_by: Option<String>,
#[serde(rename = "CreatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_timestamp: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RoomId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_id: Option<String>,
#[serde(rename = "UpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_timestamp: Option<f64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RoomMembership {
#[serde(rename = "InvitedBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invited_by: Option<String>,
#[serde(rename = "Member")]
#[serde(skip_serializing_if = "Option::is_none")]
pub member: Option<Member>,
#[serde(rename = "Role")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
#[serde(rename = "RoomId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_id: Option<String>,
#[serde(rename = "UpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_timestamp: Option<f64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct RoomRetentionSettings {
#[serde(rename = "RetentionDays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_days: Option<i64>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct SearchAvailablePhoneNumbersRequest {
#[serde(rename = "AreaCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub area_code: Option<String>,
#[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 = "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 = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "TollFreePrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub toll_free_prefix: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SearchAvailablePhoneNumbersResponse {
#[serde(rename = "E164PhoneNumbers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub e164_phone_numbers: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct SigninDelegateGroup {
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct StreamingConfiguration {
#[serde(rename = "DataRetentionInHours")]
pub data_retention_in_hours: i64,
#[serde(rename = "Disabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disabled: Option<bool>,
#[serde(rename = "StreamingNotificationTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub streaming_notification_targets: Option<Vec<StreamingNotificationTarget>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct StreamingNotificationTarget {
#[serde(rename = "NotificationTarget")]
pub notification_target: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Tag {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TagAttendeeRequest {
#[serde(rename = "AttendeeId")]
pub attendee_id: String,
#[serde(rename = "MeetingId")]
pub meeting_id: String,
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TagMeetingRequest {
#[serde(rename = "MeetingId")]
pub meeting_id: String,
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TagResourceRequest {
#[serde(rename = "ResourceARN")]
pub resource_arn: String,
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TelephonySettings {
#[serde(rename = "InboundCalling")]
pub inbound_calling: bool,
#[serde(rename = "OutboundCalling")]
pub outbound_calling: bool,
#[serde(rename = "SMS")]
pub sms: bool,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Termination {
#[serde(rename = "CallingRegions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub calling_regions: Option<Vec<String>>,
#[serde(rename = "CidrAllowedList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_allowed_list: Option<Vec<String>>,
#[serde(rename = "CpsLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cps_limit: Option<i64>,
#[serde(rename = "DefaultPhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_phone_number: Option<String>,
#[serde(rename = "Disabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disabled: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TerminationHealth {
#[serde(rename = "Source")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
#[serde(rename = "Timestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UntagAttendeeRequest {
#[serde(rename = "AttendeeId")]
pub attendee_id: String,
#[serde(rename = "MeetingId")]
pub meeting_id: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UntagMeetingRequest {
#[serde(rename = "MeetingId")]
pub meeting_id: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UntagResourceRequest {
#[serde(rename = "ResourceARN")]
pub resource_arn: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateAccountRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateAccountResponse {
#[serde(rename = "Account")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account: Option<Account>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateAccountSettingsRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "AccountSettings")]
pub account_settings: AccountSettings,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateAccountSettingsResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateBotRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "BotId")]
pub bot_id: String,
#[serde(rename = "Disabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disabled: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateBotResponse {
#[serde(rename = "Bot")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bot: Option<Bot>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateGlobalSettingsRequest {
#[serde(rename = "BusinessCalling")]
pub business_calling: BusinessCallingSettings,
#[serde(rename = "VoiceConnector")]
pub voice_connector: VoiceConnectorSettings,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdatePhoneNumberRequest {
#[serde(rename = "CallingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub calling_name: Option<String>,
#[serde(rename = "PhoneNumberId")]
pub phone_number_id: String,
#[serde(rename = "ProductType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_type: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdatePhoneNumberRequestItem {
#[serde(rename = "CallingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub calling_name: Option<String>,
#[serde(rename = "PhoneNumberId")]
pub phone_number_id: String,
#[serde(rename = "ProductType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_type: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdatePhoneNumberResponse {
#[serde(rename = "PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number: Option<PhoneNumber>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdatePhoneNumberSettingsRequest {
#[serde(rename = "CallingName")]
pub calling_name: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateProxySessionRequest {
#[serde(rename = "Capabilities")]
pub capabilities: Vec<String>,
#[serde(rename = "ExpiryMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expiry_minutes: Option<i64>,
#[serde(rename = "ProxySessionId")]
pub proxy_session_id: String,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateProxySessionResponse {
#[serde(rename = "ProxySession")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proxy_session: Option<ProxySession>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateRoomMembershipRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "MemberId")]
pub member_id: String,
#[serde(rename = "Role")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
#[serde(rename = "RoomId")]
pub room_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateRoomMembershipResponse {
#[serde(rename = "RoomMembership")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_membership: Option<RoomMembership>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateRoomRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RoomId")]
pub room_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateRoomResponse {
#[serde(rename = "Room")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room: Option<Room>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateUserRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "AlexaForBusinessMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alexa_for_business_metadata: Option<AlexaForBusinessMetadata>,
#[serde(rename = "LicenseType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub license_type: Option<String>,
#[serde(rename = "UserId")]
pub user_id: String,
#[serde(rename = "UserType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_type: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateUserRequestItem {
#[serde(rename = "AlexaForBusinessMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alexa_for_business_metadata: Option<AlexaForBusinessMetadata>,
#[serde(rename = "LicenseType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub license_type: Option<String>,
#[serde(rename = "UserId")]
pub user_id: String,
#[serde(rename = "UserType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_type: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateUserResponse {
#[serde(rename = "User")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<User>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateUserSettingsRequest {
#[serde(rename = "AccountId")]
pub account_id: String,
#[serde(rename = "UserId")]
pub user_id: String,
#[serde(rename = "UserSettings")]
pub user_settings: UserSettings,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateVoiceConnectorGroupRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "VoiceConnectorGroupId")]
pub voice_connector_group_id: String,
#[serde(rename = "VoiceConnectorItems")]
pub voice_connector_items: Vec<VoiceConnectorItem>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateVoiceConnectorGroupResponse {
#[serde(rename = "VoiceConnectorGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector_group: Option<VoiceConnectorGroup>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateVoiceConnectorRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RequireEncryption")]
pub require_encryption: bool,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateVoiceConnectorResponse {
#[serde(rename = "VoiceConnector")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector: Option<VoiceConnector>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct User {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "AlexaForBusinessMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alexa_for_business_metadata: Option<AlexaForBusinessMetadata>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "InvitedOn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invited_on: Option<f64>,
#[serde(rename = "LicenseType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub license_type: Option<String>,
#[serde(rename = "PersonalPIN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub personal_pin: Option<String>,
#[serde(rename = "PrimaryEmail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub primary_email: Option<String>,
#[serde(rename = "PrimaryProvisionedNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub primary_provisioned_number: Option<String>,
#[serde(rename = "RegisteredOn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registered_on: Option<f64>,
#[serde(rename = "UserId")]
pub user_id: String,
#[serde(rename = "UserInvitationStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_invitation_status: Option<String>,
#[serde(rename = "UserRegistrationStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_registration_status: Option<String>,
#[serde(rename = "UserType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_type: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UserError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "UserId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct UserSettings {
#[serde(rename = "Telephony")]
pub telephony: TelephonySettings,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VoiceConnector {
#[serde(rename = "AwsRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_region: Option<String>,
#[serde(rename = "CreatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_timestamp: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OutboundHostName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outbound_host_name: Option<String>,
#[serde(rename = "RequireEncryption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub require_encryption: Option<bool>,
#[serde(rename = "UpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_timestamp: Option<f64>,
#[serde(rename = "VoiceConnectorId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VoiceConnectorGroup {
#[serde(rename = "CreatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_timestamp: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "UpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_timestamp: Option<f64>,
#[serde(rename = "VoiceConnectorGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector_group_id: Option<String>,
#[serde(rename = "VoiceConnectorItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub voice_connector_items: Option<Vec<VoiceConnectorItem>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VoiceConnectorItem {
#[serde(rename = "Priority")]
pub priority: i64,
#[serde(rename = "VoiceConnectorId")]
pub voice_connector_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VoiceConnectorSettings {
#[serde(rename = "CdrBucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cdr_bucket: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum AssociatePhoneNumberWithUserError {
AccessDenied(String),
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl AssociatePhoneNumberWithUserError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociatePhoneNumberWithUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(AssociatePhoneNumberWithUserError::AccessDenied(
err.msg,
))
}
"BadRequestException" => {
return RusotoError::Service(AssociatePhoneNumberWithUserError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(AssociatePhoneNumberWithUserError::Forbidden(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(AssociatePhoneNumberWithUserError::NotFound(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(AssociatePhoneNumberWithUserError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
AssociatePhoneNumberWithUserError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
AssociatePhoneNumberWithUserError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
AssociatePhoneNumberWithUserError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for AssociatePhoneNumberWithUserError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
AssociatePhoneNumberWithUserError::AccessDenied(ref cause) => write!(f, "{}", cause),
AssociatePhoneNumberWithUserError::BadRequest(ref cause) => write!(f, "{}", cause),
AssociatePhoneNumberWithUserError::Forbidden(ref cause) => write!(f, "{}", cause),
AssociatePhoneNumberWithUserError::NotFound(ref cause) => write!(f, "{}", cause),
AssociatePhoneNumberWithUserError::ServiceFailure(ref cause) => write!(f, "{}", cause),
AssociatePhoneNumberWithUserError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumberWithUserError::ThrottledClient(ref cause) => write!(f, "{}", cause),
AssociatePhoneNumberWithUserError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for AssociatePhoneNumberWithUserError {}
#[derive(Debug, PartialEq)]
pub enum AssociatePhoneNumbersWithVoiceConnectorError {
AccessDenied(String),
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl AssociatePhoneNumbersWithVoiceConnectorError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociatePhoneNumbersWithVoiceConnectorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorError::AccessDenied(err.msg),
)
}
"BadRequestException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for AssociatePhoneNumbersWithVoiceConnectorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
AssociatePhoneNumbersWithVoiceConnectorError::AccessDenied(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for AssociatePhoneNumbersWithVoiceConnectorError {}
#[derive(Debug, PartialEq)]
pub enum AssociatePhoneNumbersWithVoiceConnectorGroupError {
AccessDenied(String),
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl AssociatePhoneNumbersWithVoiceConnectorGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociatePhoneNumbersWithVoiceConnectorGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorGroupError::AccessDenied(err.msg),
)
}
"BadRequestException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorGroupError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorGroupError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorGroupError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorGroupError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorGroupError::ServiceUnavailable(
err.msg,
),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorGroupError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
AssociatePhoneNumbersWithVoiceConnectorGroupError::UnauthorizedClient(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for AssociatePhoneNumbersWithVoiceConnectorGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
AssociatePhoneNumbersWithVoiceConnectorGroupError::AccessDenied(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorGroupError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorGroupError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorGroupError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorGroupError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorGroupError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorGroupError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
AssociatePhoneNumbersWithVoiceConnectorGroupError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for AssociatePhoneNumbersWithVoiceConnectorGroupError {}
#[derive(Debug, PartialEq)]
pub enum AssociateSigninDelegateGroupsWithAccountError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl AssociateSigninDelegateGroupsWithAccountError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateSigninDelegateGroupsWithAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
AssociateSigninDelegateGroupsWithAccountError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
AssociateSigninDelegateGroupsWithAccountError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
AssociateSigninDelegateGroupsWithAccountError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
AssociateSigninDelegateGroupsWithAccountError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
AssociateSigninDelegateGroupsWithAccountError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
AssociateSigninDelegateGroupsWithAccountError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
AssociateSigninDelegateGroupsWithAccountError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for AssociateSigninDelegateGroupsWithAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
AssociateSigninDelegateGroupsWithAccountError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
AssociateSigninDelegateGroupsWithAccountError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
AssociateSigninDelegateGroupsWithAccountError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
AssociateSigninDelegateGroupsWithAccountError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
AssociateSigninDelegateGroupsWithAccountError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
AssociateSigninDelegateGroupsWithAccountError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
AssociateSigninDelegateGroupsWithAccountError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for AssociateSigninDelegateGroupsWithAccountError {}
#[derive(Debug, PartialEq)]
pub enum BatchCreateAttendeeError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl BatchCreateAttendeeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchCreateAttendeeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(BatchCreateAttendeeError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(BatchCreateAttendeeError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(BatchCreateAttendeeError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(BatchCreateAttendeeError::ResourceLimitExceeded(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(BatchCreateAttendeeError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(BatchCreateAttendeeError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(BatchCreateAttendeeError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(BatchCreateAttendeeError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchCreateAttendeeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchCreateAttendeeError::BadRequest(ref cause) => write!(f, "{}", cause),
BatchCreateAttendeeError::Forbidden(ref cause) => write!(f, "{}", cause),
BatchCreateAttendeeError::NotFound(ref cause) => write!(f, "{}", cause),
BatchCreateAttendeeError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
BatchCreateAttendeeError::ServiceFailure(ref cause) => write!(f, "{}", cause),
BatchCreateAttendeeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
BatchCreateAttendeeError::ThrottledClient(ref cause) => write!(f, "{}", cause),
BatchCreateAttendeeError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchCreateAttendeeError {}
#[derive(Debug, PartialEq)]
pub enum BatchCreateRoomMembershipError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl BatchCreateRoomMembershipError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchCreateRoomMembershipError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(BatchCreateRoomMembershipError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(BatchCreateRoomMembershipError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(BatchCreateRoomMembershipError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(BatchCreateRoomMembershipError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
BatchCreateRoomMembershipError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(BatchCreateRoomMembershipError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(
BatchCreateRoomMembershipError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchCreateRoomMembershipError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchCreateRoomMembershipError::BadRequest(ref cause) => write!(f, "{}", cause),
BatchCreateRoomMembershipError::Forbidden(ref cause) => write!(f, "{}", cause),
BatchCreateRoomMembershipError::NotFound(ref cause) => write!(f, "{}", cause),
BatchCreateRoomMembershipError::ServiceFailure(ref cause) => write!(f, "{}", cause),
BatchCreateRoomMembershipError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
BatchCreateRoomMembershipError::ThrottledClient(ref cause) => write!(f, "{}", cause),
BatchCreateRoomMembershipError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchCreateRoomMembershipError {}
#[derive(Debug, PartialEq)]
pub enum BatchDeletePhoneNumberError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl BatchDeletePhoneNumberError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchDeletePhoneNumberError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(BatchDeletePhoneNumberError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(BatchDeletePhoneNumberError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(BatchDeletePhoneNumberError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(BatchDeletePhoneNumberError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(BatchDeletePhoneNumberError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(BatchDeletePhoneNumberError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(BatchDeletePhoneNumberError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchDeletePhoneNumberError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchDeletePhoneNumberError::BadRequest(ref cause) => write!(f, "{}", cause),
BatchDeletePhoneNumberError::Forbidden(ref cause) => write!(f, "{}", cause),
BatchDeletePhoneNumberError::NotFound(ref cause) => write!(f, "{}", cause),
BatchDeletePhoneNumberError::ServiceFailure(ref cause) => write!(f, "{}", cause),
BatchDeletePhoneNumberError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
BatchDeletePhoneNumberError::ThrottledClient(ref cause) => write!(f, "{}", cause),
BatchDeletePhoneNumberError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchDeletePhoneNumberError {}
#[derive(Debug, PartialEq)]
pub enum BatchSuspendUserError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl BatchSuspendUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchSuspendUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(BatchSuspendUserError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(BatchSuspendUserError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(BatchSuspendUserError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(BatchSuspendUserError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(BatchSuspendUserError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(BatchSuspendUserError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(BatchSuspendUserError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchSuspendUserError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchSuspendUserError::BadRequest(ref cause) => write!(f, "{}", cause),
BatchSuspendUserError::Forbidden(ref cause) => write!(f, "{}", cause),
BatchSuspendUserError::NotFound(ref cause) => write!(f, "{}", cause),
BatchSuspendUserError::ServiceFailure(ref cause) => write!(f, "{}", cause),
BatchSuspendUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
BatchSuspendUserError::ThrottledClient(ref cause) => write!(f, "{}", cause),
BatchSuspendUserError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchSuspendUserError {}
#[derive(Debug, PartialEq)]
pub enum BatchUnsuspendUserError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl BatchUnsuspendUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchUnsuspendUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(BatchUnsuspendUserError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(BatchUnsuspendUserError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(BatchUnsuspendUserError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(BatchUnsuspendUserError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(BatchUnsuspendUserError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(BatchUnsuspendUserError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(BatchUnsuspendUserError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchUnsuspendUserError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchUnsuspendUserError::BadRequest(ref cause) => write!(f, "{}", cause),
BatchUnsuspendUserError::Forbidden(ref cause) => write!(f, "{}", cause),
BatchUnsuspendUserError::NotFound(ref cause) => write!(f, "{}", cause),
BatchUnsuspendUserError::ServiceFailure(ref cause) => write!(f, "{}", cause),
BatchUnsuspendUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
BatchUnsuspendUserError::ThrottledClient(ref cause) => write!(f, "{}", cause),
BatchUnsuspendUserError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchUnsuspendUserError {}
#[derive(Debug, PartialEq)]
pub enum BatchUpdatePhoneNumberError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl BatchUpdatePhoneNumberError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchUpdatePhoneNumberError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(BatchUpdatePhoneNumberError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(BatchUpdatePhoneNumberError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(BatchUpdatePhoneNumberError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(BatchUpdatePhoneNumberError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(BatchUpdatePhoneNumberError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(BatchUpdatePhoneNumberError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(BatchUpdatePhoneNumberError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchUpdatePhoneNumberError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchUpdatePhoneNumberError::BadRequest(ref cause) => write!(f, "{}", cause),
BatchUpdatePhoneNumberError::Forbidden(ref cause) => write!(f, "{}", cause),
BatchUpdatePhoneNumberError::NotFound(ref cause) => write!(f, "{}", cause),
BatchUpdatePhoneNumberError::ServiceFailure(ref cause) => write!(f, "{}", cause),
BatchUpdatePhoneNumberError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
BatchUpdatePhoneNumberError::ThrottledClient(ref cause) => write!(f, "{}", cause),
BatchUpdatePhoneNumberError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchUpdatePhoneNumberError {}
#[derive(Debug, PartialEq)]
pub enum BatchUpdateUserError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl BatchUpdateUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchUpdateUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(BatchUpdateUserError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(BatchUpdateUserError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(BatchUpdateUserError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(BatchUpdateUserError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(BatchUpdateUserError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(BatchUpdateUserError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(BatchUpdateUserError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchUpdateUserError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchUpdateUserError::BadRequest(ref cause) => write!(f, "{}", cause),
BatchUpdateUserError::Forbidden(ref cause) => write!(f, "{}", cause),
BatchUpdateUserError::NotFound(ref cause) => write!(f, "{}", cause),
BatchUpdateUserError::ServiceFailure(ref cause) => write!(f, "{}", cause),
BatchUpdateUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
BatchUpdateUserError::ThrottledClient(ref cause) => write!(f, "{}", cause),
BatchUpdateUserError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchUpdateUserError {}
#[derive(Debug, PartialEq)]
pub enum CreateAccountError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateAccountError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateAccountError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateAccountError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(CreateAccountError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateAccountError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(CreateAccountError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreateAccountError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateAccountError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateAccountError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateAccountError::NotFound(ref cause) => write!(f, "{}", cause),
CreateAccountError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateAccountError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateAccountError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateAccountError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateAccountError {}
#[derive(Debug, PartialEq)]
pub enum CreateAttendeeError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateAttendeeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAttendeeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateAttendeeError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateAttendeeError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateAttendeeError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(CreateAttendeeError::ResourceLimitExceeded(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(CreateAttendeeError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateAttendeeError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(CreateAttendeeError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreateAttendeeError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateAttendeeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateAttendeeError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateAttendeeError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateAttendeeError::NotFound(ref cause) => write!(f, "{}", cause),
CreateAttendeeError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateAttendeeError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateAttendeeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateAttendeeError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateAttendeeError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateAttendeeError {}
#[derive(Debug, PartialEq)]
pub enum CreateBotError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateBotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBotError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateBotError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateBotError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateBotError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(CreateBotError::ResourceLimitExceeded(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(CreateBotError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateBotError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(CreateBotError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreateBotError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateBotError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateBotError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateBotError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateBotError::NotFound(ref cause) => write!(f, "{}", cause),
CreateBotError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateBotError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateBotError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateBotError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateBotError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateBotError {}
#[derive(Debug, PartialEq)]
pub enum CreateMeetingError {
BadRequest(String),
Forbidden(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateMeetingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateMeetingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateMeetingError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateMeetingError::Forbidden(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(CreateMeetingError::ResourceLimitExceeded(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(CreateMeetingError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateMeetingError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(CreateMeetingError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreateMeetingError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateMeetingError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateMeetingError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateMeetingError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateMeetingError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateMeetingError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateMeetingError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateMeetingError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateMeetingError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateMeetingError {}
#[derive(Debug, PartialEq)]
pub enum CreateMeetingWithAttendeesError {
BadRequest(String),
Forbidden(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateMeetingWithAttendeesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateMeetingWithAttendeesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateMeetingWithAttendeesError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(CreateMeetingWithAttendeesError::Forbidden(
err.msg,
))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(
CreateMeetingWithAttendeesError::ResourceLimitExceeded(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(CreateMeetingWithAttendeesError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
CreateMeetingWithAttendeesError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(CreateMeetingWithAttendeesError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(
CreateMeetingWithAttendeesError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateMeetingWithAttendeesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateMeetingWithAttendeesError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateMeetingWithAttendeesError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateMeetingWithAttendeesError::ResourceLimitExceeded(ref cause) => {
write!(f, "{}", cause)
}
CreateMeetingWithAttendeesError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateMeetingWithAttendeesError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
CreateMeetingWithAttendeesError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateMeetingWithAttendeesError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for CreateMeetingWithAttendeesError {}
#[derive(Debug, PartialEq)]
pub enum CreatePhoneNumberOrderError {
AccessDenied(String),
BadRequest(String),
Forbidden(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreatePhoneNumberOrderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePhoneNumberOrderError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreatePhoneNumberOrderError::AccessDenied(err.msg))
}
"BadRequestException" => {
return RusotoError::Service(CreatePhoneNumberOrderError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreatePhoneNumberOrderError::Forbidden(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(
CreatePhoneNumberOrderError::ResourceLimitExceeded(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(CreatePhoneNumberOrderError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreatePhoneNumberOrderError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(CreatePhoneNumberOrderError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreatePhoneNumberOrderError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreatePhoneNumberOrderError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreatePhoneNumberOrderError::AccessDenied(ref cause) => write!(f, "{}", cause),
CreatePhoneNumberOrderError::BadRequest(ref cause) => write!(f, "{}", cause),
CreatePhoneNumberOrderError::Forbidden(ref cause) => write!(f, "{}", cause),
CreatePhoneNumberOrderError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
CreatePhoneNumberOrderError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreatePhoneNumberOrderError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreatePhoneNumberOrderError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreatePhoneNumberOrderError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreatePhoneNumberOrderError {}
#[derive(Debug, PartialEq)]
pub enum CreateProxySessionError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateProxySessionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateProxySessionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateProxySessionError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateProxySessionError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateProxySessionError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(CreateProxySessionError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateProxySessionError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(CreateProxySessionError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreateProxySessionError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateProxySessionError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateProxySessionError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateProxySessionError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateProxySessionError::NotFound(ref cause) => write!(f, "{}", cause),
CreateProxySessionError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateProxySessionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateProxySessionError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateProxySessionError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateProxySessionError {}
#[derive(Debug, PartialEq)]
pub enum CreateRoomError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRoomError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateRoomError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateRoomError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateRoomError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(CreateRoomError::ResourceLimitExceeded(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(CreateRoomError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateRoomError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(CreateRoomError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreateRoomError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateRoomError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateRoomError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateRoomError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateRoomError::NotFound(ref cause) => write!(f, "{}", cause),
CreateRoomError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateRoomError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateRoomError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateRoomError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateRoomError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateRoomError {}
#[derive(Debug, PartialEq)]
pub enum CreateRoomMembershipError {
BadRequest(String),
Conflict(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateRoomMembershipError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRoomMembershipError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateRoomMembershipError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateRoomMembershipError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateRoomMembershipError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateRoomMembershipError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(CreateRoomMembershipError::ResourceLimitExceeded(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(CreateRoomMembershipError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateRoomMembershipError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(CreateRoomMembershipError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreateRoomMembershipError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateRoomMembershipError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateRoomMembershipError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateRoomMembershipError::Conflict(ref cause) => write!(f, "{}", cause),
CreateRoomMembershipError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateRoomMembershipError::NotFound(ref cause) => write!(f, "{}", cause),
CreateRoomMembershipError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateRoomMembershipError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateRoomMembershipError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateRoomMembershipError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateRoomMembershipError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateRoomMembershipError {}
#[derive(Debug, PartialEq)]
pub enum CreateUserError {
BadRequest(String),
Conflict(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateUserError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateUserError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateUserError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateUserError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(CreateUserError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateUserError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(CreateUserError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreateUserError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateUserError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateUserError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateUserError::Conflict(ref cause) => write!(f, "{}", cause),
CreateUserError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateUserError::NotFound(ref cause) => write!(f, "{}", cause),
CreateUserError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateUserError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateUserError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateUserError {}
#[derive(Debug, PartialEq)]
pub enum CreateVoiceConnectorError {
AccessDenied(String),
BadRequest(String),
Forbidden(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateVoiceConnectorError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVoiceConnectorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreateVoiceConnectorError::AccessDenied(err.msg))
}
"BadRequestException" => {
return RusotoError::Service(CreateVoiceConnectorError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateVoiceConnectorError::Forbidden(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(CreateVoiceConnectorError::ResourceLimitExceeded(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(CreateVoiceConnectorError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateVoiceConnectorError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(CreateVoiceConnectorError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(CreateVoiceConnectorError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateVoiceConnectorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateVoiceConnectorError::AccessDenied(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateVoiceConnectorError {}
#[derive(Debug, PartialEq)]
pub enum CreateVoiceConnectorGroupError {
AccessDenied(String),
BadRequest(String),
Forbidden(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl CreateVoiceConnectorGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVoiceConnectorGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreateVoiceConnectorGroupError::AccessDenied(
err.msg,
))
}
"BadRequestException" => {
return RusotoError::Service(CreateVoiceConnectorGroupError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(CreateVoiceConnectorGroupError::Forbidden(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(
CreateVoiceConnectorGroupError::ResourceLimitExceeded(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(CreateVoiceConnectorGroupError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
CreateVoiceConnectorGroupError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(CreateVoiceConnectorGroupError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(
CreateVoiceConnectorGroupError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateVoiceConnectorGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateVoiceConnectorGroupError::AccessDenied(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorGroupError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorGroupError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorGroupError::ResourceLimitExceeded(ref cause) => {
write!(f, "{}", cause)
}
CreateVoiceConnectorGroupError::ServiceFailure(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorGroupError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorGroupError::ThrottledClient(ref cause) => write!(f, "{}", cause),
CreateVoiceConnectorGroupError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateVoiceConnectorGroupError {}
#[derive(Debug, PartialEq)]
pub enum DeleteAccountError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
UnprocessableEntity(String),
}
impl DeleteAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteAccountError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteAccountError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteAccountError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteAccountError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteAccountError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(DeleteAccountError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(DeleteAccountError::UnauthorizedClient(err.msg))
}
"UnprocessableEntityException" => {
return RusotoError::Service(DeleteAccountError::UnprocessableEntity(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteAccountError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteAccountError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteAccountError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteAccountError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteAccountError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteAccountError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeleteAccountError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
DeleteAccountError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteAccountError {}
#[derive(Debug, PartialEq)]
pub enum DeleteAttendeeError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteAttendeeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAttendeeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteAttendeeError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteAttendeeError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteAttendeeError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteAttendeeError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteAttendeeError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(DeleteAttendeeError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(DeleteAttendeeError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteAttendeeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteAttendeeError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteAttendeeError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteAttendeeError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteAttendeeError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteAttendeeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteAttendeeError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeleteAttendeeError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteAttendeeError {}
#[derive(Debug, PartialEq)]
pub enum DeleteEventsConfigurationError {
BadRequest(String),
Forbidden(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
UnauthorizedClient(String),
}
impl DeleteEventsConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteEventsConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteEventsConfigurationError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteEventsConfigurationError::Forbidden(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(
DeleteEventsConfigurationError::ResourceLimitExceeded(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteEventsConfigurationError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DeleteEventsConfigurationError::ServiceUnavailable(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DeleteEventsConfigurationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteEventsConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteEventsConfigurationError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteEventsConfigurationError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteEventsConfigurationError::ResourceLimitExceeded(ref cause) => {
write!(f, "{}", cause)
}
DeleteEventsConfigurationError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteEventsConfigurationError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteEventsConfigurationError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteEventsConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum DeleteMeetingError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteMeetingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteMeetingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteMeetingError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteMeetingError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteMeetingError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteMeetingError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteMeetingError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(DeleteMeetingError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(DeleteMeetingError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteMeetingError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteMeetingError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteMeetingError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteMeetingError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteMeetingError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteMeetingError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteMeetingError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeleteMeetingError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteMeetingError {}
#[derive(Debug, PartialEq)]
pub enum DeletePhoneNumberError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeletePhoneNumberError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePhoneNumberError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeletePhoneNumberError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeletePhoneNumberError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeletePhoneNumberError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeletePhoneNumberError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeletePhoneNumberError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(DeletePhoneNumberError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(DeletePhoneNumberError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeletePhoneNumberError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeletePhoneNumberError::BadRequest(ref cause) => write!(f, "{}", cause),
DeletePhoneNumberError::Forbidden(ref cause) => write!(f, "{}", cause),
DeletePhoneNumberError::NotFound(ref cause) => write!(f, "{}", cause),
DeletePhoneNumberError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeletePhoneNumberError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeletePhoneNumberError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeletePhoneNumberError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeletePhoneNumberError {}
#[derive(Debug, PartialEq)]
pub enum DeleteProxySessionError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteProxySessionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteProxySessionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteProxySessionError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteProxySessionError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteProxySessionError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteProxySessionError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteProxySessionError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(DeleteProxySessionError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(DeleteProxySessionError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteProxySessionError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteProxySessionError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteProxySessionError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteProxySessionError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteProxySessionError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteProxySessionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteProxySessionError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeleteProxySessionError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteProxySessionError {}
#[derive(Debug, PartialEq)]
pub enum DeleteRoomError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRoomError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteRoomError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteRoomError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteRoomError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteRoomError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteRoomError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(DeleteRoomError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(DeleteRoomError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteRoomError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteRoomError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteRoomError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteRoomError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteRoomError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteRoomError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteRoomError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeleteRoomError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteRoomError {}
#[derive(Debug, PartialEq)]
pub enum DeleteRoomMembershipError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteRoomMembershipError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRoomMembershipError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteRoomMembershipError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteRoomMembershipError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteRoomMembershipError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteRoomMembershipError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteRoomMembershipError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(DeleteRoomMembershipError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(DeleteRoomMembershipError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteRoomMembershipError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteRoomMembershipError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteRoomMembershipError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteRoomMembershipError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteRoomMembershipError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteRoomMembershipError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteRoomMembershipError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeleteRoomMembershipError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteRoomMembershipError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVoiceConnectorError {
BadRequest(String),
Conflict(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteVoiceConnectorError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVoiceConnectorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVoiceConnectorError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteVoiceConnectorError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteVoiceConnectorError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVoiceConnectorError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteVoiceConnectorError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteVoiceConnectorError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(DeleteVoiceConnectorError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(DeleteVoiceConnectorError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVoiceConnectorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVoiceConnectorError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteVoiceConnectorError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVoiceConnectorEmergencyCallingConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteVoiceConnectorEmergencyCallingConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteVoiceConnectorEmergencyCallingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
DeleteVoiceConnectorEmergencyCallingConfigurationError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
DeleteVoiceConnectorEmergencyCallingConfigurationError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
DeleteVoiceConnectorEmergencyCallingConfigurationError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
DeleteVoiceConnectorEmergencyCallingConfigurationError::ServiceFailure(
err.msg,
),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DeleteVoiceConnectorEmergencyCallingConfigurationError::ServiceUnavailable(
err.msg,
),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorEmergencyCallingConfigurationError::ThrottledClient(
err.msg,
),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorEmergencyCallingConfigurationError::UnauthorizedClient(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVoiceConnectorEmergencyCallingConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVoiceConnectorEmergencyCallingConfigurationError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorEmergencyCallingConfigurationError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorEmergencyCallingConfigurationError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorEmergencyCallingConfigurationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorEmergencyCallingConfigurationError::ServiceUnavailable(
ref cause,
) => write!(f, "{}", cause),
DeleteVoiceConnectorEmergencyCallingConfigurationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorEmergencyCallingConfigurationError::UnauthorizedClient(
ref cause,
) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteVoiceConnectorEmergencyCallingConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVoiceConnectorGroupError {
BadRequest(String),
Conflict(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteVoiceConnectorGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVoiceConnectorGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVoiceConnectorGroupError::BadRequest(
err.msg,
))
}
"ConflictException" => {
return RusotoError::Service(DeleteVoiceConnectorGroupError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteVoiceConnectorGroupError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVoiceConnectorGroupError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteVoiceConnectorGroupError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DeleteVoiceConnectorGroupError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(DeleteVoiceConnectorGroupError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorGroupError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVoiceConnectorGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVoiceConnectorGroupError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorGroupError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorGroupError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorGroupError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorGroupError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorGroupError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorGroupError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorGroupError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteVoiceConnectorGroupError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVoiceConnectorOriginationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteVoiceConnectorOriginationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteVoiceConnectorOriginationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVoiceConnectorOriginationError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteVoiceConnectorOriginationError::Forbidden(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVoiceConnectorOriginationError::NotFound(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(
DeleteVoiceConnectorOriginationError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DeleteVoiceConnectorOriginationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorOriginationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorOriginationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVoiceConnectorOriginationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVoiceConnectorOriginationError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorOriginationError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorOriginationError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorOriginationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorOriginationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorOriginationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorOriginationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DeleteVoiceConnectorOriginationError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVoiceConnectorProxyError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteVoiceConnectorProxyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVoiceConnectorProxyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVoiceConnectorProxyError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteVoiceConnectorProxyError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVoiceConnectorProxyError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(DeleteVoiceConnectorProxyError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DeleteVoiceConnectorProxyError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(DeleteVoiceConnectorProxyError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorProxyError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVoiceConnectorProxyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVoiceConnectorProxyError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorProxyError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorProxyError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorProxyError::ServiceFailure(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorProxyError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorProxyError::ThrottledClient(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorProxyError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteVoiceConnectorProxyError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVoiceConnectorStreamingConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteVoiceConnectorStreamingConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteVoiceConnectorStreamingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
DeleteVoiceConnectorStreamingConfigurationError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
DeleteVoiceConnectorStreamingConfigurationError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
DeleteVoiceConnectorStreamingConfigurationError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
DeleteVoiceConnectorStreamingConfigurationError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DeleteVoiceConnectorStreamingConfigurationError::ServiceUnavailable(
err.msg,
),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorStreamingConfigurationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorStreamingConfigurationError::UnauthorizedClient(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVoiceConnectorStreamingConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVoiceConnectorStreamingConfigurationError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorStreamingConfigurationError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorStreamingConfigurationError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorStreamingConfigurationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorStreamingConfigurationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorStreamingConfigurationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorStreamingConfigurationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DeleteVoiceConnectorStreamingConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVoiceConnectorTerminationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteVoiceConnectorTerminationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteVoiceConnectorTerminationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVoiceConnectorTerminationError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteVoiceConnectorTerminationError::Forbidden(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVoiceConnectorTerminationError::NotFound(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVoiceConnectorTerminationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVoiceConnectorTerminationError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorTerminationError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorTerminationError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVoiceConnectorTerminationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorTerminationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorTerminationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorTerminationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DeleteVoiceConnectorTerminationError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVoiceConnectorTerminationCredentialsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DeleteVoiceConnectorTerminationCredentialsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteVoiceConnectorTerminationCredentialsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationCredentialsError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationCredentialsError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationCredentialsError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationCredentialsError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationCredentialsError::ServiceUnavailable(
err.msg,
),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationCredentialsError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DeleteVoiceConnectorTerminationCredentialsError::UnauthorizedClient(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVoiceConnectorTerminationCredentialsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVoiceConnectorTerminationCredentialsError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorTerminationCredentialsError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorTerminationCredentialsError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorTerminationCredentialsError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorTerminationCredentialsError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorTerminationCredentialsError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
DeleteVoiceConnectorTerminationCredentialsError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DeleteVoiceConnectorTerminationCredentialsError {}
#[derive(Debug, PartialEq)]
pub enum DisassociatePhoneNumberFromUserError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DisassociatePhoneNumberFromUserError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociatePhoneNumberFromUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DisassociatePhoneNumberFromUserError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(DisassociatePhoneNumberFromUserError::Forbidden(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DisassociatePhoneNumberFromUserError::NotFound(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(
DisassociatePhoneNumberFromUserError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DisassociatePhoneNumberFromUserError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
DisassociatePhoneNumberFromUserError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DisassociatePhoneNumberFromUserError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DisassociatePhoneNumberFromUserError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DisassociatePhoneNumberFromUserError::BadRequest(ref cause) => write!(f, "{}", cause),
DisassociatePhoneNumberFromUserError::Forbidden(ref cause) => write!(f, "{}", cause),
DisassociatePhoneNumberFromUserError::NotFound(ref cause) => write!(f, "{}", cause),
DisassociatePhoneNumberFromUserError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumberFromUserError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumberFromUserError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumberFromUserError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DisassociatePhoneNumberFromUserError {}
#[derive(Debug, PartialEq)]
pub enum DisassociatePhoneNumbersFromVoiceConnectorError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DisassociatePhoneNumbersFromVoiceConnectorError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociatePhoneNumbersFromVoiceConnectorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorError::ServiceUnavailable(
err.msg,
),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorError::UnauthorizedClient(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DisassociatePhoneNumbersFromVoiceConnectorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DisassociatePhoneNumbersFromVoiceConnectorError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DisassociatePhoneNumbersFromVoiceConnectorError {}
#[derive(Debug, PartialEq)]
pub enum DisassociatePhoneNumbersFromVoiceConnectorGroupError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DisassociatePhoneNumbersFromVoiceConnectorGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociatePhoneNumbersFromVoiceConnectorGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorGroupError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorGroupError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorGroupError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorGroupError::ServiceFailure(
err.msg,
),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorGroupError::ServiceUnavailable(
err.msg,
),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorGroupError::ThrottledClient(
err.msg,
),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DisassociatePhoneNumbersFromVoiceConnectorGroupError::UnauthorizedClient(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DisassociatePhoneNumbersFromVoiceConnectorGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DisassociatePhoneNumbersFromVoiceConnectorGroupError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorGroupError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorGroupError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorGroupError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorGroupError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorGroupError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
DisassociatePhoneNumbersFromVoiceConnectorGroupError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DisassociatePhoneNumbersFromVoiceConnectorGroupError {}
#[derive(Debug, PartialEq)]
pub enum DisassociateSigninDelegateGroupsFromAccountError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl DisassociateSigninDelegateGroupsFromAccountError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateSigninDelegateGroupsFromAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
DisassociateSigninDelegateGroupsFromAccountError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
DisassociateSigninDelegateGroupsFromAccountError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
DisassociateSigninDelegateGroupsFromAccountError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
DisassociateSigninDelegateGroupsFromAccountError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DisassociateSigninDelegateGroupsFromAccountError::ServiceUnavailable(
err.msg,
),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
DisassociateSigninDelegateGroupsFromAccountError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
DisassociateSigninDelegateGroupsFromAccountError::UnauthorizedClient(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DisassociateSigninDelegateGroupsFromAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DisassociateSigninDelegateGroupsFromAccountError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
DisassociateSigninDelegateGroupsFromAccountError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
DisassociateSigninDelegateGroupsFromAccountError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
DisassociateSigninDelegateGroupsFromAccountError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
DisassociateSigninDelegateGroupsFromAccountError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
DisassociateSigninDelegateGroupsFromAccountError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
DisassociateSigninDelegateGroupsFromAccountError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DisassociateSigninDelegateGroupsFromAccountError {}
#[derive(Debug, PartialEq)]
pub enum GetAccountError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetAccountError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetAccountError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetAccountError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetAccountError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetAccountError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(GetAccountError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetAccountError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetAccountError::BadRequest(ref cause) => write!(f, "{}", cause),
GetAccountError::Forbidden(ref cause) => write!(f, "{}", cause),
GetAccountError::NotFound(ref cause) => write!(f, "{}", cause),
GetAccountError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetAccountError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetAccountError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetAccountError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetAccountError {}
#[derive(Debug, PartialEq)]
pub enum GetAccountSettingsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetAccountSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAccountSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetAccountSettingsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetAccountSettingsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetAccountSettingsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetAccountSettingsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetAccountSettingsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(GetAccountSettingsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetAccountSettingsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetAccountSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetAccountSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetAccountSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
GetAccountSettingsError::NotFound(ref cause) => write!(f, "{}", cause),
GetAccountSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetAccountSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetAccountSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetAccountSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetAccountSettingsError {}
#[derive(Debug, PartialEq)]
pub enum GetAttendeeError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetAttendeeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAttendeeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetAttendeeError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetAttendeeError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetAttendeeError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetAttendeeError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetAttendeeError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(GetAttendeeError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetAttendeeError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetAttendeeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetAttendeeError::BadRequest(ref cause) => write!(f, "{}", cause),
GetAttendeeError::Forbidden(ref cause) => write!(f, "{}", cause),
GetAttendeeError::NotFound(ref cause) => write!(f, "{}", cause),
GetAttendeeError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetAttendeeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetAttendeeError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetAttendeeError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetAttendeeError {}
#[derive(Debug, PartialEq)]
pub enum GetBotError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetBotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBotError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetBotError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetBotError::Forbidden(err.msg))
}
"NotFoundException" => return RusotoError::Service(GetBotError::NotFound(err.msg)),
"ServiceFailureException" => {
return RusotoError::Service(GetBotError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetBotError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(GetBotError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetBotError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetBotError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetBotError::BadRequest(ref cause) => write!(f, "{}", cause),
GetBotError::Forbidden(ref cause) => write!(f, "{}", cause),
GetBotError::NotFound(ref cause) => write!(f, "{}", cause),
GetBotError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetBotError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetBotError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetBotError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetBotError {}
#[derive(Debug, PartialEq)]
pub enum GetEventsConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
UnauthorizedClient(String),
}
impl GetEventsConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetEventsConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetEventsConfigurationError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetEventsConfigurationError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetEventsConfigurationError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(
GetEventsConfigurationError::ResourceLimitExceeded(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(GetEventsConfigurationError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetEventsConfigurationError::ServiceUnavailable(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetEventsConfigurationError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetEventsConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetEventsConfigurationError::BadRequest(ref cause) => write!(f, "{}", cause),
GetEventsConfigurationError::Forbidden(ref cause) => write!(f, "{}", cause),
GetEventsConfigurationError::NotFound(ref cause) => write!(f, "{}", cause),
GetEventsConfigurationError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
GetEventsConfigurationError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetEventsConfigurationError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetEventsConfigurationError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetEventsConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum GetGlobalSettingsError {
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetGlobalSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGlobalSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetGlobalSettingsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetGlobalSettingsError::Forbidden(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetGlobalSettingsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetGlobalSettingsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(GetGlobalSettingsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetGlobalSettingsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetGlobalSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetGlobalSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetGlobalSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
GetGlobalSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetGlobalSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetGlobalSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetGlobalSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetGlobalSettingsError {}
#[derive(Debug, PartialEq)]
pub enum GetMeetingError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetMeetingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetMeetingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetMeetingError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetMeetingError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetMeetingError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetMeetingError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetMeetingError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(GetMeetingError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetMeetingError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetMeetingError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetMeetingError::BadRequest(ref cause) => write!(f, "{}", cause),
GetMeetingError::Forbidden(ref cause) => write!(f, "{}", cause),
GetMeetingError::NotFound(ref cause) => write!(f, "{}", cause),
GetMeetingError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetMeetingError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetMeetingError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetMeetingError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetMeetingError {}
#[derive(Debug, PartialEq)]
pub enum GetPhoneNumberError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetPhoneNumberError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPhoneNumberError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetPhoneNumberError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetPhoneNumberError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetPhoneNumberError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetPhoneNumberError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetPhoneNumberError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(GetPhoneNumberError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetPhoneNumberError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetPhoneNumberError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetPhoneNumberError::BadRequest(ref cause) => write!(f, "{}", cause),
GetPhoneNumberError::Forbidden(ref cause) => write!(f, "{}", cause),
GetPhoneNumberError::NotFound(ref cause) => write!(f, "{}", cause),
GetPhoneNumberError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetPhoneNumberError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetPhoneNumberError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetPhoneNumberError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetPhoneNumberError {}
#[derive(Debug, PartialEq)]
pub enum GetPhoneNumberOrderError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetPhoneNumberOrderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPhoneNumberOrderError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetPhoneNumberOrderError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetPhoneNumberOrderError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetPhoneNumberOrderError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetPhoneNumberOrderError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetPhoneNumberOrderError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(GetPhoneNumberOrderError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetPhoneNumberOrderError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetPhoneNumberOrderError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetPhoneNumberOrderError::BadRequest(ref cause) => write!(f, "{}", cause),
GetPhoneNumberOrderError::Forbidden(ref cause) => write!(f, "{}", cause),
GetPhoneNumberOrderError::NotFound(ref cause) => write!(f, "{}", cause),
GetPhoneNumberOrderError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetPhoneNumberOrderError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetPhoneNumberOrderError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetPhoneNumberOrderError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetPhoneNumberOrderError {}
#[derive(Debug, PartialEq)]
pub enum GetPhoneNumberSettingsError {
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetPhoneNumberSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPhoneNumberSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetPhoneNumberSettingsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetPhoneNumberSettingsError::Forbidden(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetPhoneNumberSettingsError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetPhoneNumberSettingsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(GetPhoneNumberSettingsError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetPhoneNumberSettingsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetPhoneNumberSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetPhoneNumberSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetPhoneNumberSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
GetPhoneNumberSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetPhoneNumberSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetPhoneNumberSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetPhoneNumberSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetPhoneNumberSettingsError {}
#[derive(Debug, PartialEq)]
pub enum GetProxySessionError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetProxySessionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetProxySessionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetProxySessionError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetProxySessionError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetProxySessionError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetProxySessionError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetProxySessionError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(GetProxySessionError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetProxySessionError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetProxySessionError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetProxySessionError::BadRequest(ref cause) => write!(f, "{}", cause),
GetProxySessionError::Forbidden(ref cause) => write!(f, "{}", cause),
GetProxySessionError::NotFound(ref cause) => write!(f, "{}", cause),
GetProxySessionError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetProxySessionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetProxySessionError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetProxySessionError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetProxySessionError {}
#[derive(Debug, PartialEq)]
pub enum GetRetentionSettingsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetRetentionSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRetentionSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetRetentionSettingsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetRetentionSettingsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetRetentionSettingsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetRetentionSettingsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetRetentionSettingsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(GetRetentionSettingsError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetRetentionSettingsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetRetentionSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetRetentionSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetRetentionSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
GetRetentionSettingsError::NotFound(ref cause) => write!(f, "{}", cause),
GetRetentionSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetRetentionSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetRetentionSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetRetentionSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetRetentionSettingsError {}
#[derive(Debug, PartialEq)]
pub enum GetRoomError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRoomError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetRoomError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetRoomError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetRoomError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetRoomError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetRoomError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(GetRoomError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetRoomError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetRoomError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetRoomError::BadRequest(ref cause) => write!(f, "{}", cause),
GetRoomError::Forbidden(ref cause) => write!(f, "{}", cause),
GetRoomError::NotFound(ref cause) => write!(f, "{}", cause),
GetRoomError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetRoomError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetRoomError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetRoomError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetRoomError {}
#[derive(Debug, PartialEq)]
pub enum GetUserError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetUserError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetUserError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetUserError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetUserError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetUserError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(GetUserError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetUserError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetUserError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetUserError::BadRequest(ref cause) => write!(f, "{}", cause),
GetUserError::Forbidden(ref cause) => write!(f, "{}", cause),
GetUserError::NotFound(ref cause) => write!(f, "{}", cause),
GetUserError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetUserError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetUserError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetUserError {}
#[derive(Debug, PartialEq)]
pub enum GetUserSettingsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetUserSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUserSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetUserSettingsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetUserSettingsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetUserSettingsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetUserSettingsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetUserSettingsError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(GetUserSettingsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetUserSettingsError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetUserSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetUserSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetUserSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
GetUserSettingsError::NotFound(ref cause) => write!(f, "{}", cause),
GetUserSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetUserSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetUserSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetUserSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetUserSettingsError {}
#[derive(Debug, PartialEq)]
pub enum GetVoiceConnectorError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetVoiceConnectorError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetVoiceConnectorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetVoiceConnectorError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetVoiceConnectorError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetVoiceConnectorError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetVoiceConnectorError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetVoiceConnectorError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(GetVoiceConnectorError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetVoiceConnectorError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVoiceConnectorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVoiceConnectorError::BadRequest(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorError::Forbidden(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorError::NotFound(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetVoiceConnectorError {}
#[derive(Debug, PartialEq)]
pub enum GetVoiceConnectorEmergencyCallingConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetVoiceConnectorEmergencyCallingConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetVoiceConnectorEmergencyCallingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
GetVoiceConnectorEmergencyCallingConfigurationError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
GetVoiceConnectorEmergencyCallingConfigurationError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
GetVoiceConnectorEmergencyCallingConfigurationError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
GetVoiceConnectorEmergencyCallingConfigurationError::ServiceFailure(
err.msg,
),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
GetVoiceConnectorEmergencyCallingConfigurationError::ServiceUnavailable(
err.msg,
),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
GetVoiceConnectorEmergencyCallingConfigurationError::ThrottledClient(
err.msg,
),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
GetVoiceConnectorEmergencyCallingConfigurationError::UnauthorizedClient(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVoiceConnectorEmergencyCallingConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVoiceConnectorEmergencyCallingConfigurationError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorEmergencyCallingConfigurationError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorEmergencyCallingConfigurationError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorEmergencyCallingConfigurationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorEmergencyCallingConfigurationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorEmergencyCallingConfigurationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorEmergencyCallingConfigurationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for GetVoiceConnectorEmergencyCallingConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum GetVoiceConnectorGroupError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetVoiceConnectorGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetVoiceConnectorGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetVoiceConnectorGroupError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetVoiceConnectorGroupError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetVoiceConnectorGroupError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetVoiceConnectorGroupError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetVoiceConnectorGroupError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(GetVoiceConnectorGroupError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetVoiceConnectorGroupError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVoiceConnectorGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVoiceConnectorGroupError::BadRequest(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorGroupError::Forbidden(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorGroupError::NotFound(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorGroupError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorGroupError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorGroupError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorGroupError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetVoiceConnectorGroupError {}
#[derive(Debug, PartialEq)]
pub enum GetVoiceConnectorLoggingConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetVoiceConnectorLoggingConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetVoiceConnectorLoggingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
GetVoiceConnectorLoggingConfigurationError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
GetVoiceConnectorLoggingConfigurationError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
GetVoiceConnectorLoggingConfigurationError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
GetVoiceConnectorLoggingConfigurationError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
GetVoiceConnectorLoggingConfigurationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
GetVoiceConnectorLoggingConfigurationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
GetVoiceConnectorLoggingConfigurationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVoiceConnectorLoggingConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVoiceConnectorLoggingConfigurationError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorLoggingConfigurationError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorLoggingConfigurationError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorLoggingConfigurationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorLoggingConfigurationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorLoggingConfigurationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorLoggingConfigurationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for GetVoiceConnectorLoggingConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum GetVoiceConnectorOriginationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetVoiceConnectorOriginationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetVoiceConnectorOriginationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetVoiceConnectorOriginationError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(GetVoiceConnectorOriginationError::Forbidden(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(GetVoiceConnectorOriginationError::NotFound(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(GetVoiceConnectorOriginationError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
GetVoiceConnectorOriginationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
GetVoiceConnectorOriginationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
GetVoiceConnectorOriginationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVoiceConnectorOriginationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVoiceConnectorOriginationError::BadRequest(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorOriginationError::Forbidden(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorOriginationError::NotFound(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorOriginationError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorOriginationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorOriginationError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorOriginationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for GetVoiceConnectorOriginationError {}
#[derive(Debug, PartialEq)]
pub enum GetVoiceConnectorProxyError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetVoiceConnectorProxyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetVoiceConnectorProxyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetVoiceConnectorProxyError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(GetVoiceConnectorProxyError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetVoiceConnectorProxyError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(GetVoiceConnectorProxyError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetVoiceConnectorProxyError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(GetVoiceConnectorProxyError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(GetVoiceConnectorProxyError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVoiceConnectorProxyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVoiceConnectorProxyError::BadRequest(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorProxyError::Forbidden(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorProxyError::NotFound(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorProxyError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorProxyError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorProxyError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorProxyError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetVoiceConnectorProxyError {}
#[derive(Debug, PartialEq)]
pub enum GetVoiceConnectorStreamingConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetVoiceConnectorStreamingConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetVoiceConnectorStreamingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
GetVoiceConnectorStreamingConfigurationError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
GetVoiceConnectorStreamingConfigurationError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
GetVoiceConnectorStreamingConfigurationError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
GetVoiceConnectorStreamingConfigurationError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
GetVoiceConnectorStreamingConfigurationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
GetVoiceConnectorStreamingConfigurationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
GetVoiceConnectorStreamingConfigurationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVoiceConnectorStreamingConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVoiceConnectorStreamingConfigurationError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorStreamingConfigurationError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorStreamingConfigurationError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorStreamingConfigurationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorStreamingConfigurationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorStreamingConfigurationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorStreamingConfigurationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for GetVoiceConnectorStreamingConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum GetVoiceConnectorTerminationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetVoiceConnectorTerminationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetVoiceConnectorTerminationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetVoiceConnectorTerminationError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(GetVoiceConnectorTerminationError::Forbidden(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(GetVoiceConnectorTerminationError::NotFound(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(GetVoiceConnectorTerminationError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
GetVoiceConnectorTerminationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
GetVoiceConnectorTerminationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
GetVoiceConnectorTerminationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVoiceConnectorTerminationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVoiceConnectorTerminationError::BadRequest(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorTerminationError::Forbidden(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorTerminationError::NotFound(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorTerminationError::ServiceFailure(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorTerminationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorTerminationError::ThrottledClient(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorTerminationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for GetVoiceConnectorTerminationError {}
#[derive(Debug, PartialEq)]
pub enum GetVoiceConnectorTerminationHealthError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl GetVoiceConnectorTerminationHealthError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetVoiceConnectorTerminationHealthError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
GetVoiceConnectorTerminationHealthError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
GetVoiceConnectorTerminationHealthError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(GetVoiceConnectorTerminationHealthError::NotFound(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(
GetVoiceConnectorTerminationHealthError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
GetVoiceConnectorTerminationHealthError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
GetVoiceConnectorTerminationHealthError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
GetVoiceConnectorTerminationHealthError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVoiceConnectorTerminationHealthError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVoiceConnectorTerminationHealthError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorTerminationHealthError::Forbidden(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorTerminationHealthError::NotFound(ref cause) => write!(f, "{}", cause),
GetVoiceConnectorTerminationHealthError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorTerminationHealthError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorTerminationHealthError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
GetVoiceConnectorTerminationHealthError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for GetVoiceConnectorTerminationHealthError {}
#[derive(Debug, PartialEq)]
pub enum InviteUsersError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl InviteUsersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<InviteUsersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(InviteUsersError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(InviteUsersError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(InviteUsersError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(InviteUsersError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(InviteUsersError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(InviteUsersError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(InviteUsersError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for InviteUsersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
InviteUsersError::BadRequest(ref cause) => write!(f, "{}", cause),
InviteUsersError::Forbidden(ref cause) => write!(f, "{}", cause),
InviteUsersError::NotFound(ref cause) => write!(f, "{}", cause),
InviteUsersError::ServiceFailure(ref cause) => write!(f, "{}", cause),
InviteUsersError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
InviteUsersError::ThrottledClient(ref cause) => write!(f, "{}", cause),
InviteUsersError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for InviteUsersError {}
#[derive(Debug, PartialEq)]
pub enum ListAccountsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListAccountsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAccountsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListAccountsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListAccountsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListAccountsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListAccountsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListAccountsError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ListAccountsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListAccountsError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListAccountsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListAccountsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListAccountsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListAccountsError::NotFound(ref cause) => write!(f, "{}", cause),
ListAccountsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListAccountsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListAccountsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListAccountsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListAccountsError {}
#[derive(Debug, PartialEq)]
pub enum ListAttendeeTagsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListAttendeeTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAttendeeTagsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListAttendeeTagsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListAttendeeTagsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListAttendeeTagsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListAttendeeTagsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListAttendeeTagsError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ListAttendeeTagsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListAttendeeTagsError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListAttendeeTagsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListAttendeeTagsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListAttendeeTagsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListAttendeeTagsError::NotFound(ref cause) => write!(f, "{}", cause),
ListAttendeeTagsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListAttendeeTagsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListAttendeeTagsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListAttendeeTagsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListAttendeeTagsError {}
#[derive(Debug, PartialEq)]
pub enum ListAttendeesError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListAttendeesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAttendeesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListAttendeesError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListAttendeesError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListAttendeesError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListAttendeesError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListAttendeesError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ListAttendeesError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListAttendeesError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListAttendeesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListAttendeesError::BadRequest(ref cause) => write!(f, "{}", cause),
ListAttendeesError::Forbidden(ref cause) => write!(f, "{}", cause),
ListAttendeesError::NotFound(ref cause) => write!(f, "{}", cause),
ListAttendeesError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListAttendeesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListAttendeesError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListAttendeesError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListAttendeesError {}
#[derive(Debug, PartialEq)]
pub enum ListBotsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListBotsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBotsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListBotsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListBotsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListBotsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListBotsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListBotsError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ListBotsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListBotsError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListBotsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListBotsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListBotsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListBotsError::NotFound(ref cause) => write!(f, "{}", cause),
ListBotsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListBotsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListBotsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListBotsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListBotsError {}
#[derive(Debug, PartialEq)]
pub enum ListMeetingTagsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListMeetingTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListMeetingTagsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListMeetingTagsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListMeetingTagsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListMeetingTagsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListMeetingTagsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListMeetingTagsError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ListMeetingTagsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListMeetingTagsError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListMeetingTagsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListMeetingTagsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListMeetingTagsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListMeetingTagsError::NotFound(ref cause) => write!(f, "{}", cause),
ListMeetingTagsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListMeetingTagsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListMeetingTagsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListMeetingTagsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListMeetingTagsError {}
#[derive(Debug, PartialEq)]
pub enum ListMeetingsError {
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListMeetingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListMeetingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListMeetingsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListMeetingsError::Forbidden(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListMeetingsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListMeetingsError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ListMeetingsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListMeetingsError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListMeetingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListMeetingsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListMeetingsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListMeetingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListMeetingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListMeetingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListMeetingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListMeetingsError {}
#[derive(Debug, PartialEq)]
pub enum ListPhoneNumberOrdersError {
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListPhoneNumberOrdersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPhoneNumberOrdersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListPhoneNumberOrdersError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListPhoneNumberOrdersError::Forbidden(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListPhoneNumberOrdersError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListPhoneNumberOrdersError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(ListPhoneNumberOrdersError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListPhoneNumberOrdersError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListPhoneNumberOrdersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListPhoneNumberOrdersError::BadRequest(ref cause) => write!(f, "{}", cause),
ListPhoneNumberOrdersError::Forbidden(ref cause) => write!(f, "{}", cause),
ListPhoneNumberOrdersError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListPhoneNumberOrdersError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListPhoneNumberOrdersError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListPhoneNumberOrdersError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListPhoneNumberOrdersError {}
#[derive(Debug, PartialEq)]
pub enum ListPhoneNumbersError {
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListPhoneNumbersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPhoneNumbersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListPhoneNumbersError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListPhoneNumbersError::Forbidden(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListPhoneNumbersError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListPhoneNumbersError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ListPhoneNumbersError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListPhoneNumbersError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListPhoneNumbersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListPhoneNumbersError::BadRequest(ref cause) => write!(f, "{}", cause),
ListPhoneNumbersError::Forbidden(ref cause) => write!(f, "{}", cause),
ListPhoneNumbersError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListPhoneNumbersError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListPhoneNumbersError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListPhoneNumbersError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListPhoneNumbersError {}
#[derive(Debug, PartialEq)]
pub enum ListProxySessionsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListProxySessionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListProxySessionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListProxySessionsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListProxySessionsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListProxySessionsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListProxySessionsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListProxySessionsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(ListProxySessionsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListProxySessionsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListProxySessionsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListProxySessionsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListProxySessionsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListProxySessionsError::NotFound(ref cause) => write!(f, "{}", cause),
ListProxySessionsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListProxySessionsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListProxySessionsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListProxySessionsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListProxySessionsError {}
#[derive(Debug, PartialEq)]
pub enum ListRoomMembershipsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListRoomMembershipsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRoomMembershipsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListRoomMembershipsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListRoomMembershipsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListRoomMembershipsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListRoomMembershipsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListRoomMembershipsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(ListRoomMembershipsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListRoomMembershipsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListRoomMembershipsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListRoomMembershipsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListRoomMembershipsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListRoomMembershipsError::NotFound(ref cause) => write!(f, "{}", cause),
ListRoomMembershipsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListRoomMembershipsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListRoomMembershipsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListRoomMembershipsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListRoomMembershipsError {}
#[derive(Debug, PartialEq)]
pub enum ListRoomsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListRoomsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRoomsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListRoomsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListRoomsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListRoomsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListRoomsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListRoomsError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ListRoomsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListRoomsError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListRoomsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListRoomsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListRoomsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListRoomsError::NotFound(ref cause) => write!(f, "{}", cause),
ListRoomsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListRoomsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListRoomsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListRoomsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListRoomsError {}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
UnauthorizedClient(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListTagsForResourceError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListTagsForResourceError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListTagsForResourceError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListTagsForResourceError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListTagsForResourceError::ServiceUnavailable(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListTagsForResourceError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListTagsForResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListTagsForResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::Forbidden(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::NotFound(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListTagsForResourceError {}
#[derive(Debug, PartialEq)]
pub enum ListUsersError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListUsersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUsersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListUsersError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListUsersError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListUsersError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListUsersError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListUsersError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ListUsersError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListUsersError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListUsersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListUsersError::BadRequest(ref cause) => write!(f, "{}", cause),
ListUsersError::Forbidden(ref cause) => write!(f, "{}", cause),
ListUsersError::NotFound(ref cause) => write!(f, "{}", cause),
ListUsersError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListUsersError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListUsersError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListUsersError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListUsersError {}
#[derive(Debug, PartialEq)]
pub enum ListVoiceConnectorGroupsError {
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListVoiceConnectorGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVoiceConnectorGroupsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListVoiceConnectorGroupsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListVoiceConnectorGroupsError::Forbidden(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListVoiceConnectorGroupsError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListVoiceConnectorGroupsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(ListVoiceConnectorGroupsError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListVoiceConnectorGroupsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListVoiceConnectorGroupsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListVoiceConnectorGroupsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorGroupsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorGroupsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorGroupsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorGroupsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorGroupsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListVoiceConnectorGroupsError {}
#[derive(Debug, PartialEq)]
pub enum ListVoiceConnectorTerminationCredentialsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListVoiceConnectorTerminationCredentialsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListVoiceConnectorTerminationCredentialsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
ListVoiceConnectorTerminationCredentialsError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
ListVoiceConnectorTerminationCredentialsError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
ListVoiceConnectorTerminationCredentialsError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
ListVoiceConnectorTerminationCredentialsError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
ListVoiceConnectorTerminationCredentialsError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
ListVoiceConnectorTerminationCredentialsError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
ListVoiceConnectorTerminationCredentialsError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListVoiceConnectorTerminationCredentialsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListVoiceConnectorTerminationCredentialsError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
ListVoiceConnectorTerminationCredentialsError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
ListVoiceConnectorTerminationCredentialsError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
ListVoiceConnectorTerminationCredentialsError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
ListVoiceConnectorTerminationCredentialsError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
ListVoiceConnectorTerminationCredentialsError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
ListVoiceConnectorTerminationCredentialsError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for ListVoiceConnectorTerminationCredentialsError {}
#[derive(Debug, PartialEq)]
pub enum ListVoiceConnectorsError {
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ListVoiceConnectorsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVoiceConnectorsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListVoiceConnectorsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListVoiceConnectorsError::Forbidden(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ListVoiceConnectorsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListVoiceConnectorsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(ListVoiceConnectorsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ListVoiceConnectorsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListVoiceConnectorsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListVoiceConnectorsError::BadRequest(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorsError::Forbidden(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ListVoiceConnectorsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListVoiceConnectorsError {}
#[derive(Debug, PartialEq)]
pub enum LogoutUserError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl LogoutUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<LogoutUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(LogoutUserError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(LogoutUserError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(LogoutUserError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(LogoutUserError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(LogoutUserError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(LogoutUserError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(LogoutUserError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for LogoutUserError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
LogoutUserError::BadRequest(ref cause) => write!(f, "{}", cause),
LogoutUserError::Forbidden(ref cause) => write!(f, "{}", cause),
LogoutUserError::NotFound(ref cause) => write!(f, "{}", cause),
LogoutUserError::ServiceFailure(ref cause) => write!(f, "{}", cause),
LogoutUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
LogoutUserError::ThrottledClient(ref cause) => write!(f, "{}", cause),
LogoutUserError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for LogoutUserError {}
#[derive(Debug, PartialEq)]
pub enum PutEventsConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
UnauthorizedClient(String),
}
impl PutEventsConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutEventsConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(PutEventsConfigurationError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(PutEventsConfigurationError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(PutEventsConfigurationError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(
PutEventsConfigurationError::ResourceLimitExceeded(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(PutEventsConfigurationError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(PutEventsConfigurationError::ServiceUnavailable(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(PutEventsConfigurationError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutEventsConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutEventsConfigurationError::BadRequest(ref cause) => write!(f, "{}", cause),
PutEventsConfigurationError::Forbidden(ref cause) => write!(f, "{}", cause),
PutEventsConfigurationError::NotFound(ref cause) => write!(f, "{}", cause),
PutEventsConfigurationError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
PutEventsConfigurationError::ServiceFailure(ref cause) => write!(f, "{}", cause),
PutEventsConfigurationError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
PutEventsConfigurationError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutEventsConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum PutRetentionSettingsError {
BadRequest(String),
Conflict(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl PutRetentionSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutRetentionSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(PutRetentionSettingsError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(PutRetentionSettingsError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(PutRetentionSettingsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(PutRetentionSettingsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(PutRetentionSettingsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(PutRetentionSettingsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(PutRetentionSettingsError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(PutRetentionSettingsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutRetentionSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutRetentionSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
PutRetentionSettingsError::Conflict(ref cause) => write!(f, "{}", cause),
PutRetentionSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
PutRetentionSettingsError::NotFound(ref cause) => write!(f, "{}", cause),
PutRetentionSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
PutRetentionSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
PutRetentionSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
PutRetentionSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutRetentionSettingsError {}
#[derive(Debug, PartialEq)]
pub enum PutVoiceConnectorEmergencyCallingConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl PutVoiceConnectorEmergencyCallingConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutVoiceConnectorEmergencyCallingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
PutVoiceConnectorEmergencyCallingConfigurationError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
PutVoiceConnectorEmergencyCallingConfigurationError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
PutVoiceConnectorEmergencyCallingConfigurationError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
PutVoiceConnectorEmergencyCallingConfigurationError::ServiceFailure(
err.msg,
),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
PutVoiceConnectorEmergencyCallingConfigurationError::ServiceUnavailable(
err.msg,
),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
PutVoiceConnectorEmergencyCallingConfigurationError::ThrottledClient(
err.msg,
),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
PutVoiceConnectorEmergencyCallingConfigurationError::UnauthorizedClient(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutVoiceConnectorEmergencyCallingConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutVoiceConnectorEmergencyCallingConfigurationError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorEmergencyCallingConfigurationError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorEmergencyCallingConfigurationError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorEmergencyCallingConfigurationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorEmergencyCallingConfigurationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorEmergencyCallingConfigurationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorEmergencyCallingConfigurationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for PutVoiceConnectorEmergencyCallingConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum PutVoiceConnectorLoggingConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl PutVoiceConnectorLoggingConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutVoiceConnectorLoggingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
PutVoiceConnectorLoggingConfigurationError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
PutVoiceConnectorLoggingConfigurationError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
PutVoiceConnectorLoggingConfigurationError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
PutVoiceConnectorLoggingConfigurationError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
PutVoiceConnectorLoggingConfigurationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
PutVoiceConnectorLoggingConfigurationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
PutVoiceConnectorLoggingConfigurationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutVoiceConnectorLoggingConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutVoiceConnectorLoggingConfigurationError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorLoggingConfigurationError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorLoggingConfigurationError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorLoggingConfigurationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorLoggingConfigurationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorLoggingConfigurationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorLoggingConfigurationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for PutVoiceConnectorLoggingConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum PutVoiceConnectorOriginationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl PutVoiceConnectorOriginationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutVoiceConnectorOriginationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(PutVoiceConnectorOriginationError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(PutVoiceConnectorOriginationError::Forbidden(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(PutVoiceConnectorOriginationError::NotFound(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(PutVoiceConnectorOriginationError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
PutVoiceConnectorOriginationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
PutVoiceConnectorOriginationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
PutVoiceConnectorOriginationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutVoiceConnectorOriginationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutVoiceConnectorOriginationError::BadRequest(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorOriginationError::Forbidden(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorOriginationError::NotFound(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorOriginationError::ServiceFailure(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorOriginationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorOriginationError::ThrottledClient(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorOriginationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for PutVoiceConnectorOriginationError {}
#[derive(Debug, PartialEq)]
pub enum PutVoiceConnectorProxyError {
AccessDenied(String),
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl PutVoiceConnectorProxyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutVoiceConnectorProxyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(PutVoiceConnectorProxyError::AccessDenied(err.msg))
}
"BadRequestException" => {
return RusotoError::Service(PutVoiceConnectorProxyError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(PutVoiceConnectorProxyError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(PutVoiceConnectorProxyError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(PutVoiceConnectorProxyError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(PutVoiceConnectorProxyError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(PutVoiceConnectorProxyError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(PutVoiceConnectorProxyError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutVoiceConnectorProxyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutVoiceConnectorProxyError::AccessDenied(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorProxyError::BadRequest(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorProxyError::Forbidden(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorProxyError::NotFound(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorProxyError::ServiceFailure(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorProxyError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorProxyError::ThrottledClient(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorProxyError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutVoiceConnectorProxyError {}
#[derive(Debug, PartialEq)]
pub enum PutVoiceConnectorStreamingConfigurationError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl PutVoiceConnectorStreamingConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutVoiceConnectorStreamingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
PutVoiceConnectorStreamingConfigurationError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
PutVoiceConnectorStreamingConfigurationError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
PutVoiceConnectorStreamingConfigurationError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
PutVoiceConnectorStreamingConfigurationError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
PutVoiceConnectorStreamingConfigurationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
PutVoiceConnectorStreamingConfigurationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
PutVoiceConnectorStreamingConfigurationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutVoiceConnectorStreamingConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutVoiceConnectorStreamingConfigurationError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorStreamingConfigurationError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorStreamingConfigurationError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorStreamingConfigurationError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorStreamingConfigurationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorStreamingConfigurationError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorStreamingConfigurationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for PutVoiceConnectorStreamingConfigurationError {}
#[derive(Debug, PartialEq)]
pub enum PutVoiceConnectorTerminationError {
AccessDenied(String),
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl PutVoiceConnectorTerminationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutVoiceConnectorTerminationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(PutVoiceConnectorTerminationError::AccessDenied(
err.msg,
))
}
"BadRequestException" => {
return RusotoError::Service(PutVoiceConnectorTerminationError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(PutVoiceConnectorTerminationError::Forbidden(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(PutVoiceConnectorTerminationError::NotFound(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(PutVoiceConnectorTerminationError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutVoiceConnectorTerminationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutVoiceConnectorTerminationError::AccessDenied(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorTerminationError::BadRequest(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorTerminationError::Forbidden(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorTerminationError::NotFound(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorTerminationError::ServiceFailure(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorTerminationError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorTerminationError::ThrottledClient(ref cause) => write!(f, "{}", cause),
PutVoiceConnectorTerminationError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for PutVoiceConnectorTerminationError {}
#[derive(Debug, PartialEq)]
pub enum PutVoiceConnectorTerminationCredentialsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl PutVoiceConnectorTerminationCredentialsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutVoiceConnectorTerminationCredentialsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationCredentialsError::BadRequest(err.msg),
)
}
"ForbiddenException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationCredentialsError::Forbidden(err.msg),
)
}
"NotFoundException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationCredentialsError::NotFound(err.msg),
)
}
"ServiceFailureException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationCredentialsError::ServiceFailure(err.msg),
)
}
"ServiceUnavailableException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationCredentialsError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationCredentialsError::ThrottledClient(err.msg),
)
}
"UnauthorizedClientException" => {
return RusotoError::Service(
PutVoiceConnectorTerminationCredentialsError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutVoiceConnectorTerminationCredentialsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutVoiceConnectorTerminationCredentialsError::BadRequest(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorTerminationCredentialsError::Forbidden(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorTerminationCredentialsError::NotFound(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorTerminationCredentialsError::ServiceFailure(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorTerminationCredentialsError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorTerminationCredentialsError::ThrottledClient(ref cause) => {
write!(f, "{}", cause)
}
PutVoiceConnectorTerminationCredentialsError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for PutVoiceConnectorTerminationCredentialsError {}
#[derive(Debug, PartialEq)]
pub enum RedactConversationMessageError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl RedactConversationMessageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RedactConversationMessageError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(RedactConversationMessageError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(RedactConversationMessageError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(RedactConversationMessageError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(RedactConversationMessageError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
RedactConversationMessageError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(RedactConversationMessageError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(
RedactConversationMessageError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for RedactConversationMessageError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
RedactConversationMessageError::BadRequest(ref cause) => write!(f, "{}", cause),
RedactConversationMessageError::Forbidden(ref cause) => write!(f, "{}", cause),
RedactConversationMessageError::NotFound(ref cause) => write!(f, "{}", cause),
RedactConversationMessageError::ServiceFailure(ref cause) => write!(f, "{}", cause),
RedactConversationMessageError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
RedactConversationMessageError::ThrottledClient(ref cause) => write!(f, "{}", cause),
RedactConversationMessageError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for RedactConversationMessageError {}
#[derive(Debug, PartialEq)]
pub enum RedactRoomMessageError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl RedactRoomMessageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RedactRoomMessageError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(RedactRoomMessageError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(RedactRoomMessageError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(RedactRoomMessageError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(RedactRoomMessageError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(RedactRoomMessageError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(RedactRoomMessageError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(RedactRoomMessageError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for RedactRoomMessageError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
RedactRoomMessageError::BadRequest(ref cause) => write!(f, "{}", cause),
RedactRoomMessageError::Forbidden(ref cause) => write!(f, "{}", cause),
RedactRoomMessageError::NotFound(ref cause) => write!(f, "{}", cause),
RedactRoomMessageError::ServiceFailure(ref cause) => write!(f, "{}", cause),
RedactRoomMessageError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
RedactRoomMessageError::ThrottledClient(ref cause) => write!(f, "{}", cause),
RedactRoomMessageError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for RedactRoomMessageError {}
#[derive(Debug, PartialEq)]
pub enum RegenerateSecurityTokenError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl RegenerateSecurityTokenError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegenerateSecurityTokenError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(RegenerateSecurityTokenError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(RegenerateSecurityTokenError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(RegenerateSecurityTokenError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(RegenerateSecurityTokenError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(RegenerateSecurityTokenError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(RegenerateSecurityTokenError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(RegenerateSecurityTokenError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for RegenerateSecurityTokenError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
RegenerateSecurityTokenError::BadRequest(ref cause) => write!(f, "{}", cause),
RegenerateSecurityTokenError::Forbidden(ref cause) => write!(f, "{}", cause),
RegenerateSecurityTokenError::NotFound(ref cause) => write!(f, "{}", cause),
RegenerateSecurityTokenError::ServiceFailure(ref cause) => write!(f, "{}", cause),
RegenerateSecurityTokenError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
RegenerateSecurityTokenError::ThrottledClient(ref cause) => write!(f, "{}", cause),
RegenerateSecurityTokenError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for RegenerateSecurityTokenError {}
#[derive(Debug, PartialEq)]
pub enum ResetPersonalPINError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl ResetPersonalPINError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResetPersonalPINError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ResetPersonalPINError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ResetPersonalPINError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ResetPersonalPINError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(ResetPersonalPINError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ResetPersonalPINError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(ResetPersonalPINError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(ResetPersonalPINError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ResetPersonalPINError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ResetPersonalPINError::BadRequest(ref cause) => write!(f, "{}", cause),
ResetPersonalPINError::Forbidden(ref cause) => write!(f, "{}", cause),
ResetPersonalPINError::NotFound(ref cause) => write!(f, "{}", cause),
ResetPersonalPINError::ServiceFailure(ref cause) => write!(f, "{}", cause),
ResetPersonalPINError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ResetPersonalPINError::ThrottledClient(ref cause) => write!(f, "{}", cause),
ResetPersonalPINError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ResetPersonalPINError {}
#[derive(Debug, PartialEq)]
pub enum RestorePhoneNumberError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl RestorePhoneNumberError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestorePhoneNumberError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(RestorePhoneNumberError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(RestorePhoneNumberError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(RestorePhoneNumberError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(RestorePhoneNumberError::ResourceLimitExceeded(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(RestorePhoneNumberError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(RestorePhoneNumberError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(RestorePhoneNumberError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(RestorePhoneNumberError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for RestorePhoneNumberError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
RestorePhoneNumberError::BadRequest(ref cause) => write!(f, "{}", cause),
RestorePhoneNumberError::Forbidden(ref cause) => write!(f, "{}", cause),
RestorePhoneNumberError::NotFound(ref cause) => write!(f, "{}", cause),
RestorePhoneNumberError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
RestorePhoneNumberError::ServiceFailure(ref cause) => write!(f, "{}", cause),
RestorePhoneNumberError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
RestorePhoneNumberError::ThrottledClient(ref cause) => write!(f, "{}", cause),
RestorePhoneNumberError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for RestorePhoneNumberError {}
#[derive(Debug, PartialEq)]
pub enum SearchAvailablePhoneNumbersError {
AccessDenied(String),
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl SearchAvailablePhoneNumbersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<SearchAvailablePhoneNumbersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(SearchAvailablePhoneNumbersError::AccessDenied(
err.msg,
))
}
"BadRequestException" => {
return RusotoError::Service(SearchAvailablePhoneNumbersError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(SearchAvailablePhoneNumbersError::Forbidden(
err.msg,
))
}
"ServiceFailureException" => {
return RusotoError::Service(SearchAvailablePhoneNumbersError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
SearchAvailablePhoneNumbersError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(SearchAvailablePhoneNumbersError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(
SearchAvailablePhoneNumbersError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for SearchAvailablePhoneNumbersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
SearchAvailablePhoneNumbersError::AccessDenied(ref cause) => write!(f, "{}", cause),
SearchAvailablePhoneNumbersError::BadRequest(ref cause) => write!(f, "{}", cause),
SearchAvailablePhoneNumbersError::Forbidden(ref cause) => write!(f, "{}", cause),
SearchAvailablePhoneNumbersError::ServiceFailure(ref cause) => write!(f, "{}", cause),
SearchAvailablePhoneNumbersError::ServiceUnavailable(ref cause) => {
write!(f, "{}", cause)
}
SearchAvailablePhoneNumbersError::ThrottledClient(ref cause) => write!(f, "{}", cause),
SearchAvailablePhoneNumbersError::UnauthorizedClient(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for SearchAvailablePhoneNumbersError {}
#[derive(Debug, PartialEq)]
pub enum TagAttendeeError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl TagAttendeeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagAttendeeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(TagAttendeeError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(TagAttendeeError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(TagAttendeeError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(TagAttendeeError::ResourceLimitExceeded(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(TagAttendeeError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(TagAttendeeError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(TagAttendeeError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(TagAttendeeError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for TagAttendeeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
TagAttendeeError::BadRequest(ref cause) => write!(f, "{}", cause),
TagAttendeeError::Forbidden(ref cause) => write!(f, "{}", cause),
TagAttendeeError::NotFound(ref cause) => write!(f, "{}", cause),
TagAttendeeError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
TagAttendeeError::ServiceFailure(ref cause) => write!(f, "{}", cause),
TagAttendeeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
TagAttendeeError::ThrottledClient(ref cause) => write!(f, "{}", cause),
TagAttendeeError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for TagAttendeeError {}
#[derive(Debug, PartialEq)]
pub enum TagMeetingError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ResourceLimitExceeded(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl TagMeetingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagMeetingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(TagMeetingError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(TagMeetingError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(TagMeetingError::NotFound(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(TagMeetingError::ResourceLimitExceeded(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(TagMeetingError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(TagMeetingError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(TagMeetingError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(TagMeetingError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for TagMeetingError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
TagMeetingError::BadRequest(ref cause) => write!(f, "{}", cause),
TagMeetingError::Forbidden(ref cause) => write!(f, "{}", cause),
TagMeetingError::NotFound(ref cause) => write!(f, "{}", cause),
TagMeetingError::ResourceLimitExceeded(ref cause) => write!(f, "{}", cause),
TagMeetingError::ServiceFailure(ref cause) => write!(f, "{}", cause),
TagMeetingError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
TagMeetingError::ThrottledClient(ref cause) => write!(f, "{}", cause),
TagMeetingError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for TagMeetingError {}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
UnauthorizedClient(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(TagResourceError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(TagResourceError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(TagResourceError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(TagResourceError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(TagResourceError::ServiceUnavailable(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(TagResourceError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for TagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
TagResourceError::Forbidden(ref cause) => write!(f, "{}", cause),
TagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
TagResourceError::ServiceFailure(ref cause) => write!(f, "{}", cause),
TagResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
TagResourceError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for TagResourceError {}
#[derive(Debug, PartialEq)]
pub enum UntagAttendeeError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UntagAttendeeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagAttendeeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UntagAttendeeError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UntagAttendeeError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UntagAttendeeError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UntagAttendeeError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UntagAttendeeError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(UntagAttendeeError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UntagAttendeeError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UntagAttendeeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UntagAttendeeError::BadRequest(ref cause) => write!(f, "{}", cause),
UntagAttendeeError::Forbidden(ref cause) => write!(f, "{}", cause),
UntagAttendeeError::NotFound(ref cause) => write!(f, "{}", cause),
UntagAttendeeError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UntagAttendeeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UntagAttendeeError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UntagAttendeeError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UntagAttendeeError {}
#[derive(Debug, PartialEq)]
pub enum UntagMeetingError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UntagMeetingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagMeetingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UntagMeetingError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UntagMeetingError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UntagMeetingError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UntagMeetingError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UntagMeetingError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(UntagMeetingError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UntagMeetingError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UntagMeetingError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UntagMeetingError::BadRequest(ref cause) => write!(f, "{}", cause),
UntagMeetingError::Forbidden(ref cause) => write!(f, "{}", cause),
UntagMeetingError::NotFound(ref cause) => write!(f, "{}", cause),
UntagMeetingError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UntagMeetingError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UntagMeetingError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UntagMeetingError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UntagMeetingError {}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
UnauthorizedClient(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UntagResourceError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UntagResourceError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UntagResourceError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UntagResourceError::ServiceUnavailable(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UntagResourceError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UntagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
UntagResourceError::Forbidden(ref cause) => write!(f, "{}", cause),
UntagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
UntagResourceError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UntagResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UntagResourceError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UntagResourceError {}
#[derive(Debug, PartialEq)]
pub enum UpdateAccountError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateAccountError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateAccountError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateAccountError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateAccountError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateAccountError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateAccountError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateAccountError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateAccountError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateAccountError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateAccountError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateAccountError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateAccountError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateAccountError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateAccountError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateAccountError {}
#[derive(Debug, PartialEq)]
pub enum UpdateAccountSettingsError {
BadRequest(String),
Conflict(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateAccountSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAccountSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateAccountSettingsError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateAccountSettingsError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateAccountSettingsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateAccountSettingsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateAccountSettingsError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateAccountSettingsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateAccountSettingsError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateAccountSettingsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateAccountSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateAccountSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateAccountSettingsError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateAccountSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateAccountSettingsError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateAccountSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateAccountSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateAccountSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateAccountSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateAccountSettingsError {}
#[derive(Debug, PartialEq)]
pub enum UpdateBotError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateBotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateBotError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateBotError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateBotError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateBotError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateBotError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateBotError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateBotError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateBotError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateBotError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateBotError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateBotError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateBotError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateBotError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateBotError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateBotError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateBotError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateBotError {}
#[derive(Debug, PartialEq)]
pub enum UpdateGlobalSettingsError {
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateGlobalSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGlobalSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateGlobalSettingsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateGlobalSettingsError::Forbidden(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateGlobalSettingsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateGlobalSettingsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateGlobalSettingsError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateGlobalSettingsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateGlobalSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateGlobalSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateGlobalSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateGlobalSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateGlobalSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateGlobalSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateGlobalSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateGlobalSettingsError {}
#[derive(Debug, PartialEq)]
pub enum UpdatePhoneNumberError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdatePhoneNumberError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdatePhoneNumberError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdatePhoneNumberError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdatePhoneNumberError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdatePhoneNumberError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdatePhoneNumberError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdatePhoneNumberError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdatePhoneNumberError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdatePhoneNumberError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdatePhoneNumberError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdatePhoneNumberError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberError::NotFound(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdatePhoneNumberError {}
#[derive(Debug, PartialEq)]
pub enum UpdatePhoneNumberSettingsError {
BadRequest(String),
Forbidden(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdatePhoneNumberSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdatePhoneNumberSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdatePhoneNumberSettingsError::BadRequest(
err.msg,
))
}
"ForbiddenException" => {
return RusotoError::Service(UpdatePhoneNumberSettingsError::Forbidden(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdatePhoneNumberSettingsError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
UpdatePhoneNumberSettingsError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(UpdatePhoneNumberSettingsError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(
UpdatePhoneNumberSettingsError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdatePhoneNumberSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdatePhoneNumberSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdatePhoneNumberSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdatePhoneNumberSettingsError {}
#[derive(Debug, PartialEq)]
pub enum UpdateProxySessionError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateProxySessionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateProxySessionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateProxySessionError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateProxySessionError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateProxySessionError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateProxySessionError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateProxySessionError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateProxySessionError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateProxySessionError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateProxySessionError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateProxySessionError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateProxySessionError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateProxySessionError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateProxySessionError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateProxySessionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateProxySessionError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateProxySessionError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateProxySessionError {}
#[derive(Debug, PartialEq)]
pub enum UpdateRoomError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRoomError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateRoomError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateRoomError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateRoomError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateRoomError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateRoomError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateRoomError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateRoomError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateRoomError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateRoomError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateRoomError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateRoomError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateRoomError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateRoomError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateRoomError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateRoomError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateRoomError {}
#[derive(Debug, PartialEq)]
pub enum UpdateRoomMembershipError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateRoomMembershipError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRoomMembershipError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateRoomMembershipError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateRoomMembershipError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateRoomMembershipError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateRoomMembershipError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateRoomMembershipError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateRoomMembershipError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateRoomMembershipError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateRoomMembershipError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateRoomMembershipError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateRoomMembershipError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateRoomMembershipError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateRoomMembershipError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateRoomMembershipError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateRoomMembershipError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateRoomMembershipError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateRoomMembershipError {}
#[derive(Debug, PartialEq)]
pub enum UpdateUserError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateUserError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateUserError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateUserError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateUserError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateUserError::ServiceUnavailable(err.msg))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateUserError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateUserError::UnauthorizedClient(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateUserError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateUserError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateUserError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateUserError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateUserError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateUserError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateUserError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateUserError {}
#[derive(Debug, PartialEq)]
pub enum UpdateUserSettingsError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateUserSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserSettingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateUserSettingsError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateUserSettingsError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateUserSettingsError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateUserSettingsError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateUserSettingsError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateUserSettingsError::ThrottledClient(err.msg))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateUserSettingsError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateUserSettingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateUserSettingsError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateUserSettingsError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateUserSettingsError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateUserSettingsError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateUserSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateUserSettingsError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateUserSettingsError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateUserSettingsError {}
#[derive(Debug, PartialEq)]
pub enum UpdateVoiceConnectorError {
BadRequest(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateVoiceConnectorError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateVoiceConnectorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateVoiceConnectorError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateVoiceConnectorError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateVoiceConnectorError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateVoiceConnectorError::ServiceFailure(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateVoiceConnectorError::ServiceUnavailable(
err.msg,
))
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateVoiceConnectorError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(UpdateVoiceConnectorError::UnauthorizedClient(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateVoiceConnectorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateVoiceConnectorError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateVoiceConnectorError {}
#[derive(Debug, PartialEq)]
pub enum UpdateVoiceConnectorGroupError {
BadRequest(String),
Conflict(String),
Forbidden(String),
NotFound(String),
ServiceFailure(String),
ServiceUnavailable(String),
ThrottledClient(String),
UnauthorizedClient(String),
}
impl UpdateVoiceConnectorGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateVoiceConnectorGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateVoiceConnectorGroupError::BadRequest(
err.msg,
))
}
"ConflictException" => {
return RusotoError::Service(UpdateVoiceConnectorGroupError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateVoiceConnectorGroupError::Forbidden(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateVoiceConnectorGroupError::NotFound(err.msg))
}
"ServiceFailureException" => {
return RusotoError::Service(UpdateVoiceConnectorGroupError::ServiceFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
UpdateVoiceConnectorGroupError::ServiceUnavailable(err.msg),
)
}
"ThrottledClientException" => {
return RusotoError::Service(UpdateVoiceConnectorGroupError::ThrottledClient(
err.msg,
))
}
"UnauthorizedClientException" => {
return RusotoError::Service(
UpdateVoiceConnectorGroupError::UnauthorizedClient(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateVoiceConnectorGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateVoiceConnectorGroupError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorGroupError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorGroupError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorGroupError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorGroupError::ServiceFailure(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorGroupError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorGroupError::ThrottledClient(ref cause) => write!(f, "{}", cause),
UpdateVoiceConnectorGroupError::UnauthorizedClient(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateVoiceConnectorGroupError {}
#[async_trait]
pub trait Chime {
async fn associate_phone_number_with_user(
&self,
input: AssociatePhoneNumberWithUserRequest,
) -> Result<AssociatePhoneNumberWithUserResponse, RusotoError<AssociatePhoneNumberWithUserError>>;
async fn associate_phone_numbers_with_voice_connector(
&self,
input: AssociatePhoneNumbersWithVoiceConnectorRequest,
) -> Result<
AssociatePhoneNumbersWithVoiceConnectorResponse,
RusotoError<AssociatePhoneNumbersWithVoiceConnectorError>,
>;
async fn associate_phone_numbers_with_voice_connector_group(
&self,
input: AssociatePhoneNumbersWithVoiceConnectorGroupRequest,
) -> Result<
AssociatePhoneNumbersWithVoiceConnectorGroupResponse,
RusotoError<AssociatePhoneNumbersWithVoiceConnectorGroupError>,
>;
async fn associate_signin_delegate_groups_with_account(
&self,
input: AssociateSigninDelegateGroupsWithAccountRequest,
) -> Result<
AssociateSigninDelegateGroupsWithAccountResponse,
RusotoError<AssociateSigninDelegateGroupsWithAccountError>,
>;
async fn batch_create_attendee(
&self,
input: BatchCreateAttendeeRequest,
) -> Result<BatchCreateAttendeeResponse, RusotoError<BatchCreateAttendeeError>>;
async fn batch_create_room_membership(
&self,
input: BatchCreateRoomMembershipRequest,
) -> Result<BatchCreateRoomMembershipResponse, RusotoError<BatchCreateRoomMembershipError>>;
async fn batch_delete_phone_number(
&self,
input: BatchDeletePhoneNumberRequest,
) -> Result<BatchDeletePhoneNumberResponse, RusotoError<BatchDeletePhoneNumberError>>;
async fn batch_suspend_user(
&self,
input: BatchSuspendUserRequest,
) -> Result<BatchSuspendUserResponse, RusotoError<BatchSuspendUserError>>;
async fn batch_unsuspend_user(
&self,
input: BatchUnsuspendUserRequest,
) -> Result<BatchUnsuspendUserResponse, RusotoError<BatchUnsuspendUserError>>;
async fn batch_update_phone_number(
&self,
input: BatchUpdatePhoneNumberRequest,
) -> Result<BatchUpdatePhoneNumberResponse, RusotoError<BatchUpdatePhoneNumberError>>;
async fn batch_update_user(
&self,
input: BatchUpdateUserRequest,
) -> Result<BatchUpdateUserResponse, RusotoError<BatchUpdateUserError>>;
async fn create_account(
&self,
input: CreateAccountRequest,
) -> Result<CreateAccountResponse, RusotoError<CreateAccountError>>;
async fn create_attendee(
&self,
input: CreateAttendeeRequest,
) -> Result<CreateAttendeeResponse, RusotoError<CreateAttendeeError>>;
async fn create_bot(
&self,
input: CreateBotRequest,
) -> Result<CreateBotResponse, RusotoError<CreateBotError>>;
async fn create_meeting(
&self,
input: CreateMeetingRequest,
) -> Result<CreateMeetingResponse, RusotoError<CreateMeetingError>>;
async fn create_meeting_with_attendees(
&self,
input: CreateMeetingWithAttendeesRequest,
) -> Result<CreateMeetingWithAttendeesResponse, RusotoError<CreateMeetingWithAttendeesError>>;
async fn create_phone_number_order(
&self,
input: CreatePhoneNumberOrderRequest,
) -> Result<CreatePhoneNumberOrderResponse, RusotoError<CreatePhoneNumberOrderError>>;
async fn create_proxy_session(
&self,
input: CreateProxySessionRequest,
) -> Result<CreateProxySessionResponse, RusotoError<CreateProxySessionError>>;
async fn create_room(
&self,
input: CreateRoomRequest,
) -> Result<CreateRoomResponse, RusotoError<CreateRoomError>>;
async fn create_room_membership(
&self,
input: CreateRoomMembershipRequest,
) -> Result<CreateRoomMembershipResponse, RusotoError<CreateRoomMembershipError>>;
async fn create_user(
&self,
input: CreateUserRequest,
) -> Result<CreateUserResponse, RusotoError<CreateUserError>>;
async fn create_voice_connector(
&self,
input: CreateVoiceConnectorRequest,
) -> Result<CreateVoiceConnectorResponse, RusotoError<CreateVoiceConnectorError>>;
async fn create_voice_connector_group(
&self,
input: CreateVoiceConnectorGroupRequest,
) -> Result<CreateVoiceConnectorGroupResponse, RusotoError<CreateVoiceConnectorGroupError>>;
async fn delete_account(
&self,
input: DeleteAccountRequest,
) -> Result<DeleteAccountResponse, RusotoError<DeleteAccountError>>;
async fn delete_attendee(
&self,
input: DeleteAttendeeRequest,
) -> Result<(), RusotoError<DeleteAttendeeError>>;
async fn delete_events_configuration(
&self,
input: DeleteEventsConfigurationRequest,
) -> Result<(), RusotoError<DeleteEventsConfigurationError>>;
async fn delete_meeting(
&self,
input: DeleteMeetingRequest,
) -> Result<(), RusotoError<DeleteMeetingError>>;
async fn delete_phone_number(
&self,
input: DeletePhoneNumberRequest,
) -> Result<(), RusotoError<DeletePhoneNumberError>>;
async fn delete_proxy_session(
&self,
input: DeleteProxySessionRequest,
) -> Result<(), RusotoError<DeleteProxySessionError>>;
async fn delete_room(
&self,
input: DeleteRoomRequest,
) -> Result<(), RusotoError<DeleteRoomError>>;
async fn delete_room_membership(
&self,
input: DeleteRoomMembershipRequest,
) -> Result<(), RusotoError<DeleteRoomMembershipError>>;
async fn delete_voice_connector(
&self,
input: DeleteVoiceConnectorRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorError>>;
async fn delete_voice_connector_emergency_calling_configuration(
&self,
input: DeleteVoiceConnectorEmergencyCallingConfigurationRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorEmergencyCallingConfigurationError>>;
async fn delete_voice_connector_group(
&self,
input: DeleteVoiceConnectorGroupRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorGroupError>>;
async fn delete_voice_connector_origination(
&self,
input: DeleteVoiceConnectorOriginationRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorOriginationError>>;
async fn delete_voice_connector_proxy(
&self,
input: DeleteVoiceConnectorProxyRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorProxyError>>;
async fn delete_voice_connector_streaming_configuration(
&self,
input: DeleteVoiceConnectorStreamingConfigurationRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorStreamingConfigurationError>>;
async fn delete_voice_connector_termination(
&self,
input: DeleteVoiceConnectorTerminationRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorTerminationError>>;
async fn delete_voice_connector_termination_credentials(
&self,
input: DeleteVoiceConnectorTerminationCredentialsRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorTerminationCredentialsError>>;
async fn disassociate_phone_number_from_user(
&self,
input: DisassociatePhoneNumberFromUserRequest,
) -> Result<
DisassociatePhoneNumberFromUserResponse,
RusotoError<DisassociatePhoneNumberFromUserError>,
>;
async fn disassociate_phone_numbers_from_voice_connector(
&self,
input: DisassociatePhoneNumbersFromVoiceConnectorRequest,
) -> Result<
DisassociatePhoneNumbersFromVoiceConnectorResponse,
RusotoError<DisassociatePhoneNumbersFromVoiceConnectorError>,
>;
async fn disassociate_phone_numbers_from_voice_connector_group(
&self,
input: DisassociatePhoneNumbersFromVoiceConnectorGroupRequest,
) -> Result<
DisassociatePhoneNumbersFromVoiceConnectorGroupResponse,
RusotoError<DisassociatePhoneNumbersFromVoiceConnectorGroupError>,
>;
async fn disassociate_signin_delegate_groups_from_account(
&self,
input: DisassociateSigninDelegateGroupsFromAccountRequest,
) -> Result<
DisassociateSigninDelegateGroupsFromAccountResponse,
RusotoError<DisassociateSigninDelegateGroupsFromAccountError>,
>;
async fn get_account(
&self,
input: GetAccountRequest,
) -> Result<GetAccountResponse, RusotoError<GetAccountError>>;
async fn get_account_settings(
&self,
input: GetAccountSettingsRequest,
) -> Result<GetAccountSettingsResponse, RusotoError<GetAccountSettingsError>>;
async fn get_attendee(
&self,
input: GetAttendeeRequest,
) -> Result<GetAttendeeResponse, RusotoError<GetAttendeeError>>;
async fn get_bot(
&self,
input: GetBotRequest,
) -> Result<GetBotResponse, RusotoError<GetBotError>>;
async fn get_events_configuration(
&self,
input: GetEventsConfigurationRequest,
) -> Result<GetEventsConfigurationResponse, RusotoError<GetEventsConfigurationError>>;
async fn get_global_settings(
&self,
) -> Result<GetGlobalSettingsResponse, RusotoError<GetGlobalSettingsError>>;
async fn get_meeting(
&self,
input: GetMeetingRequest,
) -> Result<GetMeetingResponse, RusotoError<GetMeetingError>>;
async fn get_phone_number(
&self,
input: GetPhoneNumberRequest,
) -> Result<GetPhoneNumberResponse, RusotoError<GetPhoneNumberError>>;
async fn get_phone_number_order(
&self,
input: GetPhoneNumberOrderRequest,
) -> Result<GetPhoneNumberOrderResponse, RusotoError<GetPhoneNumberOrderError>>;
async fn get_phone_number_settings(
&self,
) -> Result<GetPhoneNumberSettingsResponse, RusotoError<GetPhoneNumberSettingsError>>;
async fn get_proxy_session(
&self,
input: GetProxySessionRequest,
) -> Result<GetProxySessionResponse, RusotoError<GetProxySessionError>>;
async fn get_retention_settings(
&self,
input: GetRetentionSettingsRequest,
) -> Result<GetRetentionSettingsResponse, RusotoError<GetRetentionSettingsError>>;
async fn get_room(
&self,
input: GetRoomRequest,
) -> Result<GetRoomResponse, RusotoError<GetRoomError>>;
async fn get_user(
&self,
input: GetUserRequest,
) -> Result<GetUserResponse, RusotoError<GetUserError>>;
async fn get_user_settings(
&self,
input: GetUserSettingsRequest,
) -> Result<GetUserSettingsResponse, RusotoError<GetUserSettingsError>>;
async fn get_voice_connector(
&self,
input: GetVoiceConnectorRequest,
) -> Result<GetVoiceConnectorResponse, RusotoError<GetVoiceConnectorError>>;
async fn get_voice_connector_emergency_calling_configuration(
&self,
input: GetVoiceConnectorEmergencyCallingConfigurationRequest,
) -> Result<
GetVoiceConnectorEmergencyCallingConfigurationResponse,
RusotoError<GetVoiceConnectorEmergencyCallingConfigurationError>,
>;
async fn get_voice_connector_group(
&self,
input: GetVoiceConnectorGroupRequest,
) -> Result<GetVoiceConnectorGroupResponse, RusotoError<GetVoiceConnectorGroupError>>;
async fn get_voice_connector_logging_configuration(
&self,
input: GetVoiceConnectorLoggingConfigurationRequest,
) -> Result<
GetVoiceConnectorLoggingConfigurationResponse,
RusotoError<GetVoiceConnectorLoggingConfigurationError>,
>;
async fn get_voice_connector_origination(
&self,
input: GetVoiceConnectorOriginationRequest,
) -> Result<GetVoiceConnectorOriginationResponse, RusotoError<GetVoiceConnectorOriginationError>>;
async fn get_voice_connector_proxy(
&self,
input: GetVoiceConnectorProxyRequest,
) -> Result<GetVoiceConnectorProxyResponse, RusotoError<GetVoiceConnectorProxyError>>;
async fn get_voice_connector_streaming_configuration(
&self,
input: GetVoiceConnectorStreamingConfigurationRequest,
) -> Result<
GetVoiceConnectorStreamingConfigurationResponse,
RusotoError<GetVoiceConnectorStreamingConfigurationError>,
>;
async fn get_voice_connector_termination(
&self,
input: GetVoiceConnectorTerminationRequest,
) -> Result<GetVoiceConnectorTerminationResponse, RusotoError<GetVoiceConnectorTerminationError>>;
async fn get_voice_connector_termination_health(
&self,
input: GetVoiceConnectorTerminationHealthRequest,
) -> Result<
GetVoiceConnectorTerminationHealthResponse,
RusotoError<GetVoiceConnectorTerminationHealthError>,
>;
async fn invite_users(
&self,
input: InviteUsersRequest,
) -> Result<InviteUsersResponse, RusotoError<InviteUsersError>>;
async fn list_accounts(
&self,
input: ListAccountsRequest,
) -> Result<ListAccountsResponse, RusotoError<ListAccountsError>>;
async fn list_attendee_tags(
&self,
input: ListAttendeeTagsRequest,
) -> Result<ListAttendeeTagsResponse, RusotoError<ListAttendeeTagsError>>;
async fn list_attendees(
&self,
input: ListAttendeesRequest,
) -> Result<ListAttendeesResponse, RusotoError<ListAttendeesError>>;
async fn list_bots(
&self,
input: ListBotsRequest,
) -> Result<ListBotsResponse, RusotoError<ListBotsError>>;
async fn list_meeting_tags(
&self,
input: ListMeetingTagsRequest,
) -> Result<ListMeetingTagsResponse, RusotoError<ListMeetingTagsError>>;
async fn list_meetings(
&self,
input: ListMeetingsRequest,
) -> Result<ListMeetingsResponse, RusotoError<ListMeetingsError>>;
async fn list_phone_number_orders(
&self,
input: ListPhoneNumberOrdersRequest,
) -> Result<ListPhoneNumberOrdersResponse, RusotoError<ListPhoneNumberOrdersError>>;
async fn list_phone_numbers(
&self,
input: ListPhoneNumbersRequest,
) -> Result<ListPhoneNumbersResponse, RusotoError<ListPhoneNumbersError>>;
async fn list_proxy_sessions(
&self,
input: ListProxySessionsRequest,
) -> Result<ListProxySessionsResponse, RusotoError<ListProxySessionsError>>;
async fn list_room_memberships(
&self,
input: ListRoomMembershipsRequest,
) -> Result<ListRoomMembershipsResponse, RusotoError<ListRoomMembershipsError>>;
async fn list_rooms(
&self,
input: ListRoomsRequest,
) -> Result<ListRoomsResponse, RusotoError<ListRoomsError>>;
async fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
async fn list_users(
&self,
input: ListUsersRequest,
) -> Result<ListUsersResponse, RusotoError<ListUsersError>>;
async fn list_voice_connector_groups(
&self,
input: ListVoiceConnectorGroupsRequest,
) -> Result<ListVoiceConnectorGroupsResponse, RusotoError<ListVoiceConnectorGroupsError>>;
async fn list_voice_connector_termination_credentials(
&self,
input: ListVoiceConnectorTerminationCredentialsRequest,
) -> Result<
ListVoiceConnectorTerminationCredentialsResponse,
RusotoError<ListVoiceConnectorTerminationCredentialsError>,
>;
async fn list_voice_connectors(
&self,
input: ListVoiceConnectorsRequest,
) -> Result<ListVoiceConnectorsResponse, RusotoError<ListVoiceConnectorsError>>;
async fn logout_user(
&self,
input: LogoutUserRequest,
) -> Result<LogoutUserResponse, RusotoError<LogoutUserError>>;
async fn put_events_configuration(
&self,
input: PutEventsConfigurationRequest,
) -> Result<PutEventsConfigurationResponse, RusotoError<PutEventsConfigurationError>>;
async fn put_retention_settings(
&self,
input: PutRetentionSettingsRequest,
) -> Result<PutRetentionSettingsResponse, RusotoError<PutRetentionSettingsError>>;
async fn put_voice_connector_emergency_calling_configuration(
&self,
input: PutVoiceConnectorEmergencyCallingConfigurationRequest,
) -> Result<
PutVoiceConnectorEmergencyCallingConfigurationResponse,
RusotoError<PutVoiceConnectorEmergencyCallingConfigurationError>,
>;
async fn put_voice_connector_logging_configuration(
&self,
input: PutVoiceConnectorLoggingConfigurationRequest,
) -> Result<
PutVoiceConnectorLoggingConfigurationResponse,
RusotoError<PutVoiceConnectorLoggingConfigurationError>,
>;
async fn put_voice_connector_origination(
&self,
input: PutVoiceConnectorOriginationRequest,
) -> Result<PutVoiceConnectorOriginationResponse, RusotoError<PutVoiceConnectorOriginationError>>;
async fn put_voice_connector_proxy(
&self,
input: PutVoiceConnectorProxyRequest,
) -> Result<PutVoiceConnectorProxyResponse, RusotoError<PutVoiceConnectorProxyError>>;
async fn put_voice_connector_streaming_configuration(
&self,
input: PutVoiceConnectorStreamingConfigurationRequest,
) -> Result<
PutVoiceConnectorStreamingConfigurationResponse,
RusotoError<PutVoiceConnectorStreamingConfigurationError>,
>;
async fn put_voice_connector_termination(
&self,
input: PutVoiceConnectorTerminationRequest,
) -> Result<PutVoiceConnectorTerminationResponse, RusotoError<PutVoiceConnectorTerminationError>>;
async fn put_voice_connector_termination_credentials(
&self,
input: PutVoiceConnectorTerminationCredentialsRequest,
) -> Result<(), RusotoError<PutVoiceConnectorTerminationCredentialsError>>;
async fn redact_conversation_message(
&self,
input: RedactConversationMessageRequest,
) -> Result<RedactConversationMessageResponse, RusotoError<RedactConversationMessageError>>;
async fn redact_room_message(
&self,
input: RedactRoomMessageRequest,
) -> Result<RedactRoomMessageResponse, RusotoError<RedactRoomMessageError>>;
async fn regenerate_security_token(
&self,
input: RegenerateSecurityTokenRequest,
) -> Result<RegenerateSecurityTokenResponse, RusotoError<RegenerateSecurityTokenError>>;
async fn reset_personal_pin(
&self,
input: ResetPersonalPINRequest,
) -> Result<ResetPersonalPINResponse, RusotoError<ResetPersonalPINError>>;
async fn restore_phone_number(
&self,
input: RestorePhoneNumberRequest,
) -> Result<RestorePhoneNumberResponse, RusotoError<RestorePhoneNumberError>>;
async fn search_available_phone_numbers(
&self,
input: SearchAvailablePhoneNumbersRequest,
) -> Result<SearchAvailablePhoneNumbersResponse, RusotoError<SearchAvailablePhoneNumbersError>>;
async fn tag_attendee(
&self,
input: TagAttendeeRequest,
) -> Result<(), RusotoError<TagAttendeeError>>;
async fn tag_meeting(
&self,
input: TagMeetingRequest,
) -> Result<(), RusotoError<TagMeetingError>>;
async fn tag_resource(
&self,
input: TagResourceRequest,
) -> Result<(), RusotoError<TagResourceError>>;
async fn untag_attendee(
&self,
input: UntagAttendeeRequest,
) -> Result<(), RusotoError<UntagAttendeeError>>;
async fn untag_meeting(
&self,
input: UntagMeetingRequest,
) -> Result<(), RusotoError<UntagMeetingError>>;
async fn untag_resource(
&self,
input: UntagResourceRequest,
) -> Result<(), RusotoError<UntagResourceError>>;
async fn update_account(
&self,
input: UpdateAccountRequest,
) -> Result<UpdateAccountResponse, RusotoError<UpdateAccountError>>;
async fn update_account_settings(
&self,
input: UpdateAccountSettingsRequest,
) -> Result<UpdateAccountSettingsResponse, RusotoError<UpdateAccountSettingsError>>;
async fn update_bot(
&self,
input: UpdateBotRequest,
) -> Result<UpdateBotResponse, RusotoError<UpdateBotError>>;
async fn update_global_settings(
&self,
input: UpdateGlobalSettingsRequest,
) -> Result<(), RusotoError<UpdateGlobalSettingsError>>;
async fn update_phone_number(
&self,
input: UpdatePhoneNumberRequest,
) -> Result<UpdatePhoneNumberResponse, RusotoError<UpdatePhoneNumberError>>;
async fn update_phone_number_settings(
&self,
input: UpdatePhoneNumberSettingsRequest,
) -> Result<(), RusotoError<UpdatePhoneNumberSettingsError>>;
async fn update_proxy_session(
&self,
input: UpdateProxySessionRequest,
) -> Result<UpdateProxySessionResponse, RusotoError<UpdateProxySessionError>>;
async fn update_room(
&self,
input: UpdateRoomRequest,
) -> Result<UpdateRoomResponse, RusotoError<UpdateRoomError>>;
async fn update_room_membership(
&self,
input: UpdateRoomMembershipRequest,
) -> Result<UpdateRoomMembershipResponse, RusotoError<UpdateRoomMembershipError>>;
async fn update_user(
&self,
input: UpdateUserRequest,
) -> Result<UpdateUserResponse, RusotoError<UpdateUserError>>;
async fn update_user_settings(
&self,
input: UpdateUserSettingsRequest,
) -> Result<(), RusotoError<UpdateUserSettingsError>>;
async fn update_voice_connector(
&self,
input: UpdateVoiceConnectorRequest,
) -> Result<UpdateVoiceConnectorResponse, RusotoError<UpdateVoiceConnectorError>>;
async fn update_voice_connector_group(
&self,
input: UpdateVoiceConnectorGroupRequest,
) -> Result<UpdateVoiceConnectorGroupResponse, RusotoError<UpdateVoiceConnectorGroupError>>;
}
#[derive(Clone)]
pub struct ChimeClient {
client: Client,
region: region::Region,
}
impl ChimeClient {
pub fn new(region: region::Region) -> ChimeClient {
ChimeClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> ChimeClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
D: DispatchSignedRequest + Send + Sync + 'static,
{
ChimeClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
pub fn new_with_client(client: Client, region: region::Region) -> ChimeClient {
ChimeClient { client, region }
}
}
#[async_trait]
impl Chime for ChimeClient {
#[allow(unused_mut)]
async fn associate_phone_number_with_user(
&self,
input: AssociatePhoneNumberWithUserRequest,
) -> Result<AssociatePhoneNumberWithUserResponse, RusotoError<AssociatePhoneNumberWithUserError>>
{
let request_uri = format!(
"/accounts/{account_id}/users/{user_id}",
account_id = input.account_id,
user_id = input.user_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "associate-phone-number");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociatePhoneNumberWithUserResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(AssociatePhoneNumberWithUserError::from_response(response))
}
}
#[allow(unused_mut)]
async fn associate_phone_numbers_with_voice_connector(
&self,
input: AssociatePhoneNumbersWithVoiceConnectorRequest,
) -> Result<
AssociatePhoneNumbersWithVoiceConnectorResponse,
RusotoError<AssociatePhoneNumbersWithVoiceConnectorError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "associate-phone-numbers");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociatePhoneNumbersWithVoiceConnectorResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(AssociatePhoneNumbersWithVoiceConnectorError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn associate_phone_numbers_with_voice_connector_group(
&self,
input: AssociatePhoneNumbersWithVoiceConnectorGroupRequest,
) -> Result<
AssociatePhoneNumbersWithVoiceConnectorGroupResponse,
RusotoError<AssociatePhoneNumbersWithVoiceConnectorGroupError>,
> {
let request_uri = format!(
"/voice-connector-groups/{voice_connector_group_id}",
voice_connector_group_id = input.voice_connector_group_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "associate-phone-numbers");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociatePhoneNumbersWithVoiceConnectorGroupResponse, _>(
)?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(AssociatePhoneNumbersWithVoiceConnectorGroupError::from_response(response))
}
}
#[allow(unused_mut)]
async fn associate_signin_delegate_groups_with_account(
&self,
input: AssociateSigninDelegateGroupsWithAccountRequest,
) -> Result<
AssociateSigninDelegateGroupsWithAccountResponse,
RusotoError<AssociateSigninDelegateGroupsWithAccountError>,
> {
let request_uri = format!("/accounts/{account_id}", account_id = input.account_id);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "associate-signin-delegate-groups");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociateSigninDelegateGroupsWithAccountResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(AssociateSigninDelegateGroupsWithAccountError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_create_attendee(
&self,
input: BatchCreateAttendeeRequest,
) -> Result<BatchCreateAttendeeResponse, RusotoError<BatchCreateAttendeeError>> {
let request_uri = format!(
"/meetings/{meeting_id}/attendees",
meeting_id = input.meeting_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "batch-create");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchCreateAttendeeResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchCreateAttendeeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_create_room_membership(
&self,
input: BatchCreateRoomMembershipRequest,
) -> Result<BatchCreateRoomMembershipResponse, RusotoError<BatchCreateRoomMembershipError>>
{
let request_uri = format!(
"/accounts/{account_id}/rooms/{room_id}/memberships",
account_id = input.account_id,
room_id = input.room_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "batch-create");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchCreateRoomMembershipResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchCreateRoomMembershipError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_delete_phone_number(
&self,
input: BatchDeletePhoneNumberRequest,
) -> Result<BatchDeletePhoneNumberResponse, RusotoError<BatchDeletePhoneNumberError>> {
let request_uri = "/phone-numbers";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "batch-delete");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchDeletePhoneNumberResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchDeletePhoneNumberError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_suspend_user(
&self,
input: BatchSuspendUserRequest,
) -> Result<BatchSuspendUserResponse, RusotoError<BatchSuspendUserError>> {
let request_uri = format!(
"/accounts/{account_id}/users",
account_id = input.account_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "suspend");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchSuspendUserResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchSuspendUserError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_unsuspend_user(
&self,
input: BatchUnsuspendUserRequest,
) -> Result<BatchUnsuspendUserResponse, RusotoError<BatchUnsuspendUserError>> {
let request_uri = format!(
"/accounts/{account_id}/users",
account_id = input.account_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "unsuspend");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchUnsuspendUserResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchUnsuspendUserError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_update_phone_number(
&self,
input: BatchUpdatePhoneNumberRequest,
) -> Result<BatchUpdatePhoneNumberResponse, RusotoError<BatchUpdatePhoneNumberError>> {
let request_uri = "/phone-numbers";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "batch-update");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchUpdatePhoneNumberResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchUpdatePhoneNumberError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_update_user(
&self,
input: BatchUpdateUserRequest,
) -> Result<BatchUpdateUserResponse, RusotoError<BatchUpdateUserError>> {
let request_uri = format!(
"/accounts/{account_id}/users",
account_id = input.account_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchUpdateUserResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchUpdateUserError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_account(
&self,
input: CreateAccountRequest,
) -> Result<CreateAccountResponse, RusotoError<CreateAccountError>> {
let request_uri = "/accounts";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateAccountResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateAccountError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_attendee(
&self,
input: CreateAttendeeRequest,
) -> Result<CreateAttendeeResponse, RusotoError<CreateAttendeeError>> {
let request_uri = format!(
"/meetings/{meeting_id}/attendees",
meeting_id = input.meeting_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateAttendeeResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateAttendeeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_bot(
&self,
input: CreateBotRequest,
) -> Result<CreateBotResponse, RusotoError<CreateBotError>> {
let request_uri = format!("/accounts/{account_id}/bots", account_id = input.account_id);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateBotResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateBotError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_meeting(
&self,
input: CreateMeetingRequest,
) -> Result<CreateMeetingResponse, RusotoError<CreateMeetingError>> {
let request_uri = "/meetings";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateMeetingResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateMeetingError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_meeting_with_attendees(
&self,
input: CreateMeetingWithAttendeesRequest,
) -> Result<CreateMeetingWithAttendeesResponse, RusotoError<CreateMeetingWithAttendeesError>>
{
let request_uri = "/meetings";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "create-attendees");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateMeetingWithAttendeesResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateMeetingWithAttendeesError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_phone_number_order(
&self,
input: CreatePhoneNumberOrderRequest,
) -> Result<CreatePhoneNumberOrderResponse, RusotoError<CreatePhoneNumberOrderError>> {
let request_uri = "/phone-number-orders";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreatePhoneNumberOrderResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreatePhoneNumberOrderError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_proxy_session(
&self,
input: CreateProxySessionRequest,
) -> Result<CreateProxySessionResponse, RusotoError<CreateProxySessionError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/proxy-sessions",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateProxySessionResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateProxySessionError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_room(
&self,
input: CreateRoomRequest,
) -> Result<CreateRoomResponse, RusotoError<CreateRoomError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms",
account_id = input.account_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateRoomResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateRoomError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_room_membership(
&self,
input: CreateRoomMembershipRequest,
) -> Result<CreateRoomMembershipResponse, RusotoError<CreateRoomMembershipError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms/{room_id}/memberships",
account_id = input.account_id,
room_id = input.room_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateRoomMembershipResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateRoomMembershipError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_user(
&self,
input: CreateUserRequest,
) -> Result<CreateUserResponse, RusotoError<CreateUserError>> {
let request_uri = format!(
"/accounts/{account_id}/users",
account_id = input.account_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "create");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateUserResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateUserError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_voice_connector(
&self,
input: CreateVoiceConnectorRequest,
) -> Result<CreateVoiceConnectorResponse, RusotoError<CreateVoiceConnectorError>> {
let request_uri = "/voice-connectors";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateVoiceConnectorResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateVoiceConnectorError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_voice_connector_group(
&self,
input: CreateVoiceConnectorGroupRequest,
) -> Result<CreateVoiceConnectorGroupResponse, RusotoError<CreateVoiceConnectorGroupError>>
{
let request_uri = "/voice-connector-groups";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateVoiceConnectorGroupResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateVoiceConnectorGroupError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_account(
&self,
input: DeleteAccountRequest,
) -> Result<DeleteAccountResponse, RusotoError<DeleteAccountError>> {
let request_uri = format!("/accounts/{account_id}", account_id = input.account_id);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteAccountResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteAccountError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_attendee(
&self,
input: DeleteAttendeeRequest,
) -> Result<(), RusotoError<DeleteAttendeeError>> {
let request_uri = format!(
"/meetings/{meeting_id}/attendees/{attendee_id}",
attendee_id = input.attendee_id,
meeting_id = input.meeting_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteAttendeeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_events_configuration(
&self,
input: DeleteEventsConfigurationRequest,
) -> Result<(), RusotoError<DeleteEventsConfigurationError>> {
let request_uri = format!(
"/accounts/{account_id}/bots/{bot_id}/events-configuration",
account_id = input.account_id,
bot_id = input.bot_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteEventsConfigurationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_meeting(
&self,
input: DeleteMeetingRequest,
) -> Result<(), RusotoError<DeleteMeetingError>> {
let request_uri = format!("/meetings/{meeting_id}", meeting_id = input.meeting_id);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteMeetingError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_phone_number(
&self,
input: DeletePhoneNumberRequest,
) -> Result<(), RusotoError<DeletePhoneNumberError>> {
let request_uri = format!(
"/phone-numbers/{phone_number_id}",
phone_number_id = input.phone_number_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeletePhoneNumberError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_proxy_session(
&self,
input: DeleteProxySessionRequest,
) -> Result<(), RusotoError<DeleteProxySessionError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/proxy-sessions/{proxy_session_id}",
proxy_session_id = input.proxy_session_id,
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteProxySessionError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_room(
&self,
input: DeleteRoomRequest,
) -> Result<(), RusotoError<DeleteRoomError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms/{room_id}",
account_id = input.account_id,
room_id = input.room_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteRoomError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_room_membership(
&self,
input: DeleteRoomMembershipRequest,
) -> Result<(), RusotoError<DeleteRoomMembershipError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms/{room_id}/memberships/{member_id}",
account_id = input.account_id,
member_id = input.member_id,
room_id = input.room_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteRoomMembershipError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_voice_connector(
&self,
input: DeleteVoiceConnectorRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVoiceConnectorError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_voice_connector_emergency_calling_configuration(
&self,
input: DeleteVoiceConnectorEmergencyCallingConfigurationRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorEmergencyCallingConfigurationError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/emergency-calling-configuration",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVoiceConnectorEmergencyCallingConfigurationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_voice_connector_group(
&self,
input: DeleteVoiceConnectorGroupRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorGroupError>> {
let request_uri = format!(
"/voice-connector-groups/{voice_connector_group_id}",
voice_connector_group_id = input.voice_connector_group_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVoiceConnectorGroupError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_voice_connector_origination(
&self,
input: DeleteVoiceConnectorOriginationRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorOriginationError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/origination",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVoiceConnectorOriginationError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn delete_voice_connector_proxy(
&self,
input: DeleteVoiceConnectorProxyRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorProxyError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/programmable-numbers/proxy",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVoiceConnectorProxyError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_voice_connector_streaming_configuration(
&self,
input: DeleteVoiceConnectorStreamingConfigurationRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorStreamingConfigurationError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/streaming-configuration",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVoiceConnectorStreamingConfigurationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_voice_connector_termination(
&self,
input: DeleteVoiceConnectorTerminationRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorTerminationError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/termination",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("DELETE", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVoiceConnectorTerminationError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn delete_voice_connector_termination_credentials(
&self,
input: DeleteVoiceConnectorTerminationCredentialsRequest,
) -> Result<(), RusotoError<DeleteVoiceConnectorTerminationCredentialsError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/termination/credentials",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "delete");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVoiceConnectorTerminationCredentialsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn disassociate_phone_number_from_user(
&self,
input: DisassociatePhoneNumberFromUserRequest,
) -> Result<
DisassociatePhoneNumberFromUserResponse,
RusotoError<DisassociatePhoneNumberFromUserError>,
> {
let request_uri = format!(
"/accounts/{account_id}/users/{user_id}",
account_id = input.account_id,
user_id = input.user_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("operation", "disassociate-phone-number");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociatePhoneNumberFromUserResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DisassociatePhoneNumberFromUserError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn disassociate_phone_numbers_from_voice_connector(
&self,
input: DisassociatePhoneNumbersFromVoiceConnectorRequest,
) -> Result<
DisassociatePhoneNumbersFromVoiceConnectorResponse,
RusotoError<DisassociatePhoneNumbersFromVoiceConnectorError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "disassociate-phone-numbers");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociatePhoneNumbersFromVoiceConnectorResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DisassociatePhoneNumbersFromVoiceConnectorError::from_response(response))
}
}
#[allow(unused_mut)]
async fn disassociate_phone_numbers_from_voice_connector_group(
&self,
input: DisassociatePhoneNumbersFromVoiceConnectorGroupRequest,
) -> Result<
DisassociatePhoneNumbersFromVoiceConnectorGroupResponse,
RusotoError<DisassociatePhoneNumbersFromVoiceConnectorGroupError>,
> {
let request_uri = format!(
"/voice-connector-groups/{voice_connector_group_id}",
voice_connector_group_id = input.voice_connector_group_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "disassociate-phone-numbers");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociatePhoneNumbersFromVoiceConnectorGroupResponse, _>(
)?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DisassociatePhoneNumbersFromVoiceConnectorGroupError::from_response(response))
}
}
#[allow(unused_mut)]
async fn disassociate_signin_delegate_groups_from_account(
&self,
input: DisassociateSigninDelegateGroupsFromAccountRequest,
) -> Result<
DisassociateSigninDelegateGroupsFromAccountResponse,
RusotoError<DisassociateSigninDelegateGroupsFromAccountError>,
> {
let request_uri = format!("/accounts/{account_id}", account_id = input.account_id);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "disassociate-signin-delegate-groups");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociateSigninDelegateGroupsFromAccountResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DisassociateSigninDelegateGroupsFromAccountError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_account(
&self,
input: GetAccountRequest,
) -> Result<GetAccountResponse, RusotoError<GetAccountError>> {
let request_uri = format!("/accounts/{account_id}", account_id = input.account_id);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetAccountResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetAccountError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_account_settings(
&self,
input: GetAccountSettingsRequest,
) -> Result<GetAccountSettingsResponse, RusotoError<GetAccountSettingsError>> {
let request_uri = format!(
"/accounts/{account_id}/settings",
account_id = input.account_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetAccountSettingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetAccountSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_attendee(
&self,
input: GetAttendeeRequest,
) -> Result<GetAttendeeResponse, RusotoError<GetAttendeeError>> {
let request_uri = format!(
"/meetings/{meeting_id}/attendees/{attendee_id}",
attendee_id = input.attendee_id,
meeting_id = input.meeting_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetAttendeeResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetAttendeeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_bot(
&self,
input: GetBotRequest,
) -> Result<GetBotResponse, RusotoError<GetBotError>> {
let request_uri = format!(
"/accounts/{account_id}/bots/{bot_id}",
account_id = input.account_id,
bot_id = input.bot_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<GetBotResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetBotError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_events_configuration(
&self,
input: GetEventsConfigurationRequest,
) -> Result<GetEventsConfigurationResponse, RusotoError<GetEventsConfigurationError>> {
let request_uri = format!(
"/accounts/{account_id}/bots/{bot_id}/events-configuration",
account_id = input.account_id,
bot_id = input.bot_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetEventsConfigurationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetEventsConfigurationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_global_settings(
&self,
) -> Result<GetGlobalSettingsResponse, RusotoError<GetGlobalSettingsError>> {
let request_uri = "/settings";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetGlobalSettingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetGlobalSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_meeting(
&self,
input: GetMeetingRequest,
) -> Result<GetMeetingResponse, RusotoError<GetMeetingError>> {
let request_uri = format!("/meetings/{meeting_id}", meeting_id = input.meeting_id);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetMeetingResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetMeetingError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_phone_number(
&self,
input: GetPhoneNumberRequest,
) -> Result<GetPhoneNumberResponse, RusotoError<GetPhoneNumberError>> {
let request_uri = format!(
"/phone-numbers/{phone_number_id}",
phone_number_id = input.phone_number_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetPhoneNumberResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetPhoneNumberError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_phone_number_order(
&self,
input: GetPhoneNumberOrderRequest,
) -> Result<GetPhoneNumberOrderResponse, RusotoError<GetPhoneNumberOrderError>> {
let request_uri = format!(
"/phone-number-orders/{phone_number_order_id}",
phone_number_order_id = input.phone_number_order_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetPhoneNumberOrderResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetPhoneNumberOrderError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_phone_number_settings(
&self,
) -> Result<GetPhoneNumberSettingsResponse, RusotoError<GetPhoneNumberSettingsError>> {
let request_uri = "/settings/phone-number";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetPhoneNumberSettingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetPhoneNumberSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_proxy_session(
&self,
input: GetProxySessionRequest,
) -> Result<GetProxySessionResponse, RusotoError<GetProxySessionError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/proxy-sessions/{proxy_session_id}",
proxy_session_id = input.proxy_session_id,
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetProxySessionResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetProxySessionError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_retention_settings(
&self,
input: GetRetentionSettingsRequest,
) -> Result<GetRetentionSettingsResponse, RusotoError<GetRetentionSettingsError>> {
let request_uri = format!(
"/accounts/{account_id}/retention-settings",
account_id = input.account_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetRetentionSettingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetRetentionSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_room(
&self,
input: GetRoomRequest,
) -> Result<GetRoomResponse, RusotoError<GetRoomError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms/{room_id}",
account_id = input.account_id,
room_id = input.room_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<GetRoomResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetRoomError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_user(
&self,
input: GetUserRequest,
) -> Result<GetUserResponse, RusotoError<GetUserError>> {
let request_uri = format!(
"/accounts/{account_id}/users/{user_id}",
account_id = input.account_id,
user_id = input.user_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<GetUserResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetUserError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_user_settings(
&self,
input: GetUserSettingsRequest,
) -> Result<GetUserSettingsResponse, RusotoError<GetUserSettingsError>> {
let request_uri = format!(
"/accounts/{account_id}/users/{user_id}/settings",
account_id = input.account_id,
user_id = input.user_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetUserSettingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetUserSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_voice_connector(
&self,
input: GetVoiceConnectorRequest,
) -> Result<GetVoiceConnectorResponse, RusotoError<GetVoiceConnectorError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetVoiceConnectorResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVoiceConnectorError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_voice_connector_emergency_calling_configuration(
&self,
input: GetVoiceConnectorEmergencyCallingConfigurationRequest,
) -> Result<
GetVoiceConnectorEmergencyCallingConfigurationResponse,
RusotoError<GetVoiceConnectorEmergencyCallingConfigurationError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/emergency-calling-configuration",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetVoiceConnectorEmergencyCallingConfigurationResponse, _>(
)?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVoiceConnectorEmergencyCallingConfigurationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_voice_connector_group(
&self,
input: GetVoiceConnectorGroupRequest,
) -> Result<GetVoiceConnectorGroupResponse, RusotoError<GetVoiceConnectorGroupError>> {
let request_uri = format!(
"/voice-connector-groups/{voice_connector_group_id}",
voice_connector_group_id = input.voice_connector_group_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetVoiceConnectorGroupResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVoiceConnectorGroupError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_voice_connector_logging_configuration(
&self,
input: GetVoiceConnectorLoggingConfigurationRequest,
) -> Result<
GetVoiceConnectorLoggingConfigurationResponse,
RusotoError<GetVoiceConnectorLoggingConfigurationError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/logging-configuration",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetVoiceConnectorLoggingConfigurationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVoiceConnectorLoggingConfigurationError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn get_voice_connector_origination(
&self,
input: GetVoiceConnectorOriginationRequest,
) -> Result<GetVoiceConnectorOriginationResponse, RusotoError<GetVoiceConnectorOriginationError>>
{
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/origination",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetVoiceConnectorOriginationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVoiceConnectorOriginationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_voice_connector_proxy(
&self,
input: GetVoiceConnectorProxyRequest,
) -> Result<GetVoiceConnectorProxyResponse, RusotoError<GetVoiceConnectorProxyError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/programmable-numbers/proxy",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetVoiceConnectorProxyResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVoiceConnectorProxyError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_voice_connector_streaming_configuration(
&self,
input: GetVoiceConnectorStreamingConfigurationRequest,
) -> Result<
GetVoiceConnectorStreamingConfigurationResponse,
RusotoError<GetVoiceConnectorStreamingConfigurationError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/streaming-configuration",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetVoiceConnectorStreamingConfigurationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVoiceConnectorStreamingConfigurationError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn get_voice_connector_termination(
&self,
input: GetVoiceConnectorTerminationRequest,
) -> Result<GetVoiceConnectorTerminationResponse, RusotoError<GetVoiceConnectorTerminationError>>
{
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/termination",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetVoiceConnectorTerminationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVoiceConnectorTerminationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_voice_connector_termination_health(
&self,
input: GetVoiceConnectorTerminationHealthRequest,
) -> Result<
GetVoiceConnectorTerminationHealthResponse,
RusotoError<GetVoiceConnectorTerminationHealthError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/termination/health",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetVoiceConnectorTerminationHealthResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVoiceConnectorTerminationHealthError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn invite_users(
&self,
input: InviteUsersRequest,
) -> Result<InviteUsersResponse, RusotoError<InviteUsersError>> {
let request_uri = format!(
"/accounts/{account_id}/users",
account_id = input.account_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "add");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<InviteUsersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(InviteUsersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_accounts(
&self,
input: ListAccountsRequest,
) -> Result<ListAccountsResponse, RusotoError<ListAccountsError>> {
let request_uri = "/accounts";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.name {
params.put("name", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
if let Some(ref x) = input.user_email {
params.put("user-email", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListAccountsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListAccountsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_attendee_tags(
&self,
input: ListAttendeeTagsRequest,
) -> Result<ListAttendeeTagsResponse, RusotoError<ListAttendeeTagsError>> {
let request_uri = format!(
"/meetings/{meeting_id}/attendees/{attendee_id}/tags",
attendee_id = input.attendee_id,
meeting_id = input.meeting_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListAttendeeTagsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListAttendeeTagsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_attendees(
&self,
input: ListAttendeesRequest,
) -> Result<ListAttendeesResponse, RusotoError<ListAttendeesError>> {
let request_uri = format!(
"/meetings/{meeting_id}/attendees",
meeting_id = input.meeting_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListAttendeesResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListAttendeesError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_bots(
&self,
input: ListBotsRequest,
) -> Result<ListBotsResponse, RusotoError<ListBotsError>> {
let request_uri = format!("/accounts/{account_id}/bots", account_id = input.account_id);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListBotsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListBotsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_meeting_tags(
&self,
input: ListMeetingTagsRequest,
) -> Result<ListMeetingTagsResponse, RusotoError<ListMeetingTagsError>> {
let request_uri = format!("/meetings/{meeting_id}/tags", meeting_id = input.meeting_id);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListMeetingTagsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListMeetingTagsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_meetings(
&self,
input: ListMeetingsRequest,
) -> Result<ListMeetingsResponse, RusotoError<ListMeetingsError>> {
let request_uri = "/meetings";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListMeetingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListMeetingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_phone_number_orders(
&self,
input: ListPhoneNumberOrdersRequest,
) -> Result<ListPhoneNumberOrdersResponse, RusotoError<ListPhoneNumberOrdersError>> {
let request_uri = "/phone-number-orders";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPhoneNumberOrdersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListPhoneNumberOrdersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_phone_numbers(
&self,
input: ListPhoneNumbersRequest,
) -> Result<ListPhoneNumbersResponse, RusotoError<ListPhoneNumbersError>> {
let request_uri = "/phone-numbers";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.filter_name {
params.put("filter-name", x);
}
if let Some(ref x) = input.filter_value {
params.put("filter-value", x);
}
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
if let Some(ref x) = input.product_type {
params.put("product-type", x);
}
if let Some(ref x) = input.status {
params.put("status", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPhoneNumbersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListPhoneNumbersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_proxy_sessions(
&self,
input: ListProxySessionsRequest,
) -> Result<ListProxySessionsResponse, RusotoError<ListProxySessionsError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/proxy-sessions",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
if let Some(ref x) = input.status {
params.put("status", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListProxySessionsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListProxySessionsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_room_memberships(
&self,
input: ListRoomMembershipsRequest,
) -> Result<ListRoomMembershipsResponse, RusotoError<ListRoomMembershipsError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms/{room_id}/memberships",
account_id = input.account_id,
room_id = input.room_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListRoomMembershipsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListRoomMembershipsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_rooms(
&self,
input: ListRoomsRequest,
) -> Result<ListRoomsResponse, RusotoError<ListRoomsError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms",
account_id = input.account_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.member_id {
params.put("member-id", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListRoomsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListRoomsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
let request_uri = "/tags";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("arn", &input.resource_arn);
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListTagsForResourceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_users(
&self,
input: ListUsersRequest,
) -> Result<ListUsersResponse, RusotoError<ListUsersError>> {
let request_uri = format!(
"/accounts/{account_id}/users",
account_id = input.account_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
if let Some(ref x) = input.user_email {
params.put("user-email", x);
}
if let Some(ref x) = input.user_type {
params.put("user-type", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListUsersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListUsersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_voice_connector_groups(
&self,
input: ListVoiceConnectorGroupsRequest,
) -> Result<ListVoiceConnectorGroupsResponse, RusotoError<ListVoiceConnectorGroupsError>> {
let request_uri = "/voice-connector-groups";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListVoiceConnectorGroupsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListVoiceConnectorGroupsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_voice_connector_termination_credentials(
&self,
input: ListVoiceConnectorTerminationCredentialsRequest,
) -> Result<
ListVoiceConnectorTerminationCredentialsResponse,
RusotoError<ListVoiceConnectorTerminationCredentialsError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/termination/credentials",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListVoiceConnectorTerminationCredentialsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListVoiceConnectorTerminationCredentialsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_voice_connectors(
&self,
input: ListVoiceConnectorsRequest,
) -> Result<ListVoiceConnectorsResponse, RusotoError<ListVoiceConnectorsError>> {
let request_uri = "/voice-connectors";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListVoiceConnectorsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListVoiceConnectorsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn logout_user(
&self,
input: LogoutUserRequest,
) -> Result<LogoutUserResponse, RusotoError<LogoutUserError>> {
let request_uri = format!(
"/accounts/{account_id}/users/{user_id}",
account_id = input.account_id,
user_id = input.user_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("operation", "logout");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<LogoutUserResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(LogoutUserError::from_response(response))
}
}
#[allow(unused_mut)]
async fn put_events_configuration(
&self,
input: PutEventsConfigurationRequest,
) -> Result<PutEventsConfigurationResponse, RusotoError<PutEventsConfigurationError>> {
let request_uri = format!(
"/accounts/{account_id}/bots/{bot_id}/events-configuration",
account_id = input.account_id,
bot_id = input.bot_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutEventsConfigurationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutEventsConfigurationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn put_retention_settings(
&self,
input: PutRetentionSettingsRequest,
) -> Result<PutRetentionSettingsResponse, RusotoError<PutRetentionSettingsError>> {
let request_uri = format!(
"/accounts/{account_id}/retention-settings",
account_id = input.account_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutRetentionSettingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutRetentionSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn put_voice_connector_emergency_calling_configuration(
&self,
input: PutVoiceConnectorEmergencyCallingConfigurationRequest,
) -> Result<
PutVoiceConnectorEmergencyCallingConfigurationResponse,
RusotoError<PutVoiceConnectorEmergencyCallingConfigurationError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/emergency-calling-configuration",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutVoiceConnectorEmergencyCallingConfigurationResponse, _>(
)?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutVoiceConnectorEmergencyCallingConfigurationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn put_voice_connector_logging_configuration(
&self,
input: PutVoiceConnectorLoggingConfigurationRequest,
) -> Result<
PutVoiceConnectorLoggingConfigurationResponse,
RusotoError<PutVoiceConnectorLoggingConfigurationError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/logging-configuration",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutVoiceConnectorLoggingConfigurationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutVoiceConnectorLoggingConfigurationError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn put_voice_connector_origination(
&self,
input: PutVoiceConnectorOriginationRequest,
) -> Result<PutVoiceConnectorOriginationResponse, RusotoError<PutVoiceConnectorOriginationError>>
{
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/origination",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutVoiceConnectorOriginationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutVoiceConnectorOriginationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn put_voice_connector_proxy(
&self,
input: PutVoiceConnectorProxyRequest,
) -> Result<PutVoiceConnectorProxyResponse, RusotoError<PutVoiceConnectorProxyError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/programmable-numbers/proxy",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutVoiceConnectorProxyResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutVoiceConnectorProxyError::from_response(response))
}
}
#[allow(unused_mut)]
async fn put_voice_connector_streaming_configuration(
&self,
input: PutVoiceConnectorStreamingConfigurationRequest,
) -> Result<
PutVoiceConnectorStreamingConfigurationResponse,
RusotoError<PutVoiceConnectorStreamingConfigurationError>,
> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/streaming-configuration",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutVoiceConnectorStreamingConfigurationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutVoiceConnectorStreamingConfigurationError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn put_voice_connector_termination(
&self,
input: PutVoiceConnectorTerminationRequest,
) -> Result<PutVoiceConnectorTerminationResponse, RusotoError<PutVoiceConnectorTerminationError>>
{
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/termination",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutVoiceConnectorTerminationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutVoiceConnectorTerminationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn put_voice_connector_termination_credentials(
&self,
input: PutVoiceConnectorTerminationCredentialsRequest,
) -> Result<(), RusotoError<PutVoiceConnectorTerminationCredentialsError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/termination/credentials",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "put");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutVoiceConnectorTerminationCredentialsError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn redact_conversation_message(
&self,
input: RedactConversationMessageRequest,
) -> Result<RedactConversationMessageResponse, RusotoError<RedactConversationMessageError>>
{
let request_uri = format!(
"/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}",
account_id = input.account_id,
conversation_id = input.conversation_id,
message_id = input.message_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("operation", "redact");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RedactConversationMessageResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(RedactConversationMessageError::from_response(response))
}
}
#[allow(unused_mut)]
async fn redact_room_message(
&self,
input: RedactRoomMessageRequest,
) -> Result<RedactRoomMessageResponse, RusotoError<RedactRoomMessageError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms/{room_id}/messages/{message_id}",
account_id = input.account_id,
message_id = input.message_id,
room_id = input.room_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("operation", "redact");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RedactRoomMessageResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(RedactRoomMessageError::from_response(response))
}
}
#[allow(unused_mut)]
async fn regenerate_security_token(
&self,
input: RegenerateSecurityTokenRequest,
) -> Result<RegenerateSecurityTokenResponse, RusotoError<RegenerateSecurityTokenError>> {
let request_uri = format!(
"/accounts/{account_id}/bots/{bot_id}",
account_id = input.account_id,
bot_id = input.bot_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("operation", "regenerate-security-token");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RegenerateSecurityTokenResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(RegenerateSecurityTokenError::from_response(response))
}
}
#[allow(unused_mut)]
async fn reset_personal_pin(
&self,
input: ResetPersonalPINRequest,
) -> Result<ResetPersonalPINResponse, RusotoError<ResetPersonalPINError>> {
let request_uri = format!(
"/accounts/{account_id}/users/{user_id}",
account_id = input.account_id,
user_id = input.user_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("operation", "reset-personal-pin");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ResetPersonalPINResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ResetPersonalPINError::from_response(response))
}
}
#[allow(unused_mut)]
async fn restore_phone_number(
&self,
input: RestorePhoneNumberRequest,
) -> Result<RestorePhoneNumberResponse, RusotoError<RestorePhoneNumberError>> {
let request_uri = format!(
"/phone-numbers/{phone_number_id}",
phone_number_id = input.phone_number_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("operation", "restore");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RestorePhoneNumberResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(RestorePhoneNumberError::from_response(response))
}
}
#[allow(unused_mut)]
async fn search_available_phone_numbers(
&self,
input: SearchAvailablePhoneNumbersRequest,
) -> Result<SearchAvailablePhoneNumbersResponse, RusotoError<SearchAvailablePhoneNumbersError>>
{
let request_uri = "/search";
let mut request = SignedRequest::new("GET", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.area_code {
params.put("area-code", x);
}
if let Some(ref x) = input.city {
params.put("city", x);
}
if let Some(ref x) = input.country {
params.put("country", x);
}
if let Some(ref x) = input.max_results {
params.put("max-results", x);
}
if let Some(ref x) = input.next_token {
params.put("next-token", x);
}
if let Some(ref x) = input.state {
params.put("state", x);
}
if let Some(ref x) = input.toll_free_prefix {
params.put("toll-free-prefix", x);
}
params.put("type", "phone-numbers");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<SearchAvailablePhoneNumbersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(SearchAvailablePhoneNumbersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn tag_attendee(
&self,
input: TagAttendeeRequest,
) -> Result<(), RusotoError<TagAttendeeError>> {
let request_uri = format!(
"/meetings/{meeting_id}/attendees/{attendee_id}/tags",
attendee_id = input.attendee_id,
meeting_id = input.meeting_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "add");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(TagAttendeeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn tag_meeting(
&self,
input: TagMeetingRequest,
) -> Result<(), RusotoError<TagMeetingError>> {
let request_uri = format!("/meetings/{meeting_id}/tags", meeting_id = input.meeting_id);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "add");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(TagMeetingError::from_response(response))
}
}
#[allow(unused_mut)]
async fn tag_resource(
&self,
input: TagResourceRequest,
) -> Result<(), RusotoError<TagResourceError>> {
let request_uri = "/tags";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "tag-resource");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(TagResourceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn untag_attendee(
&self,
input: UntagAttendeeRequest,
) -> Result<(), RusotoError<UntagAttendeeError>> {
let request_uri = format!(
"/meetings/{meeting_id}/attendees/{attendee_id}/tags",
attendee_id = input.attendee_id,
meeting_id = input.meeting_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "delete");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UntagAttendeeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn untag_meeting(
&self,
input: UntagMeetingRequest,
) -> Result<(), RusotoError<UntagMeetingError>> {
let request_uri = format!("/meetings/{meeting_id}/tags", meeting_id = input.meeting_id);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "delete");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UntagMeetingError::from_response(response))
}
}
#[allow(unused_mut)]
async fn untag_resource(
&self,
input: UntagResourceRequest,
) -> Result<(), RusotoError<UntagResourceError>> {
let request_uri = "/tags";
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("operation", "untag-resource");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UntagResourceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_account(
&self,
input: UpdateAccountRequest,
) -> Result<UpdateAccountResponse, RusotoError<UpdateAccountError>> {
let request_uri = format!("/accounts/{account_id}", account_id = input.account_id);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateAccountResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateAccountError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_account_settings(
&self,
input: UpdateAccountSettingsRequest,
) -> Result<UpdateAccountSettingsResponse, RusotoError<UpdateAccountSettingsError>> {
let request_uri = format!(
"/accounts/{account_id}/settings",
account_id = input.account_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateAccountSettingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateAccountSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_bot(
&self,
input: UpdateBotRequest,
) -> Result<UpdateBotResponse, RusotoError<UpdateBotError>> {
let request_uri = format!(
"/accounts/{account_id}/bots/{bot_id}",
account_id = input.account_id,
bot_id = input.bot_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateBotResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateBotError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_global_settings(
&self,
input: UpdateGlobalSettingsRequest,
) -> Result<(), RusotoError<UpdateGlobalSettingsError>> {
let request_uri = "/settings";
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateGlobalSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_phone_number(
&self,
input: UpdatePhoneNumberRequest,
) -> Result<UpdatePhoneNumberResponse, RusotoError<UpdatePhoneNumberError>> {
let request_uri = format!(
"/phone-numbers/{phone_number_id}",
phone_number_id = input.phone_number_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdatePhoneNumberResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdatePhoneNumberError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_phone_number_settings(
&self,
input: UpdatePhoneNumberSettingsRequest,
) -> Result<(), RusotoError<UpdatePhoneNumberSettingsError>> {
let request_uri = "/settings/phone-number";
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdatePhoneNumberSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_proxy_session(
&self,
input: UpdateProxySessionRequest,
) -> Result<UpdateProxySessionResponse, RusotoError<UpdateProxySessionError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}/proxy-sessions/{proxy_session_id}",
proxy_session_id = input.proxy_session_id,
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateProxySessionResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateProxySessionError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_room(
&self,
input: UpdateRoomRequest,
) -> Result<UpdateRoomResponse, RusotoError<UpdateRoomError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms/{room_id}",
account_id = input.account_id,
room_id = input.room_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateRoomResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateRoomError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_room_membership(
&self,
input: UpdateRoomMembershipRequest,
) -> Result<UpdateRoomMembershipResponse, RusotoError<UpdateRoomMembershipError>> {
let request_uri = format!(
"/accounts/{account_id}/rooms/{room_id}/memberships/{member_id}",
account_id = input.account_id,
member_id = input.member_id,
room_id = input.room_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateRoomMembershipResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateRoomMembershipError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_user(
&self,
input: UpdateUserRequest,
) -> Result<UpdateUserResponse, RusotoError<UpdateUserError>> {
let request_uri = format!(
"/accounts/{account_id}/users/{user_id}",
account_id = input.account_id,
user_id = input.user_id
);
let mut request = SignedRequest::new("POST", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateUserResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateUserError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_user_settings(
&self,
input: UpdateUserSettingsRequest,
) -> Result<(), RusotoError<UpdateUserSettingsError>> {
let request_uri = format!(
"/accounts/{account_id}/users/{user_id}/settings",
account_id = input.account_id,
user_id = input.user_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateUserSettingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_voice_connector(
&self,
input: UpdateVoiceConnectorRequest,
) -> Result<UpdateVoiceConnectorResponse, RusotoError<UpdateVoiceConnectorError>> {
let request_uri = format!(
"/voice-connectors/{voice_connector_id}",
voice_connector_id = input.voice_connector_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateVoiceConnectorResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateVoiceConnectorError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_voice_connector_group(
&self,
input: UpdateVoiceConnectorGroupRequest,
) -> Result<UpdateVoiceConnectorGroupResponse, RusotoError<UpdateVoiceConnectorGroupError>>
{
let request_uri = format!(
"/voice-connector-groups/{voice_connector_group_id}",
voice_connector_group_id = input.voice_connector_group_id
);
let mut request = SignedRequest::new("PUT", "chime", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateVoiceConnectorGroupResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateVoiceConnectorGroupError::from_response(response))
}
}
}