use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::signature::SignedRequest;
use serde_json;
use serde_json::from_slice;
use serde_json::Value as SerdeJsonValue;
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddressBook {
#[serde(rename = "AddressBookArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_book_arn: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddressBookData {
#[serde(rename = "AddressBookArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_book_arn: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ApproveSkillRequest {
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ApproveSkillResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateContactWithAddressBookRequest {
#[serde(rename = "AddressBookArn")]
pub address_book_arn: String,
#[serde(rename = "ContactArn")]
pub contact_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateContactWithAddressBookResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateDeviceWithRoomRequest {
#[serde(rename = "DeviceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_arn: Option<String>,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateDeviceWithRoomResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateSkillGroupWithRoomRequest {
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateSkillGroupWithRoomResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateSkillWithSkillGroupRequest {
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateSkillWithSkillGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateSkillWithUsersRequest {
#[serde(rename = "OrganizationArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub organization_arn: Option<String>,
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateSkillWithUsersResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BusinessReport {
#[serde(rename = "DeliveryTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delivery_time: Option<f64>,
#[serde(rename = "DownloadUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub download_url: Option<String>,
#[serde(rename = "FailureCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_code: Option<String>,
#[serde(rename = "S3Location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_location: Option<BusinessReportS3Location>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BusinessReportContentRange {
#[serde(rename = "Interval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub interval: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BusinessReportRecurrence {
#[serde(rename = "StartDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_date: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BusinessReportS3Location {
#[serde(rename = "BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket_name: Option<String>,
#[serde(rename = "Path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BusinessReportSchedule {
#[serde(rename = "ContentRange")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_range: Option<BusinessReportContentRange>,
#[serde(rename = "Format")]
#[serde(skip_serializing_if = "Option::is_none")]
pub format: Option<String>,
#[serde(rename = "LastBusinessReport")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_business_report: Option<BusinessReport>,
#[serde(rename = "Recurrence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recurrence: Option<BusinessReportRecurrence>,
#[serde(rename = "S3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_bucket_name: Option<String>,
#[serde(rename = "S3KeyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_key_prefix: Option<String>,
#[serde(rename = "ScheduleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_arn: Option<String>,
#[serde(rename = "ScheduleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Category {
#[serde(rename = "CategoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub category_id: Option<i64>,
#[serde(rename = "CategoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub category_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ConferencePreference {
#[serde(rename = "DefaultConferenceProviderArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_conference_provider_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConferenceProvider {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "IPDialIn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_dial_in: Option<IPDialIn>,
#[serde(rename = "MeetingSetting")]
#[serde(skip_serializing_if = "Option::is_none")]
pub meeting_setting: Option<MeetingSetting>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "PSTNDialIn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pstn_dial_in: Option<PSTNDialIn>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Contact {
#[serde(rename = "ContactArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub contact_arn: Option<String>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FirstName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
#[serde(rename = "LastName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ContactData {
#[serde(rename = "ContactArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub contact_arn: Option<String>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FirstName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
#[serde(rename = "LastName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateAddressBookRequest {
#[serde(rename = "ClientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateAddressBookResponse {
#[serde(rename = "AddressBookArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_book_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateBusinessReportScheduleRequest {
#[serde(rename = "ClientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "ContentRange")]
pub content_range: BusinessReportContentRange,
#[serde(rename = "Format")]
pub format: String,
#[serde(rename = "Recurrence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recurrence: Option<BusinessReportRecurrence>,
#[serde(rename = "S3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_bucket_name: Option<String>,
#[serde(rename = "S3KeyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_key_prefix: Option<String>,
#[serde(rename = "ScheduleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateBusinessReportScheduleResponse {
#[serde(rename = "ScheduleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateConferenceProviderRequest {
#[serde(rename = "ClientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "ConferenceProviderName")]
pub conference_provider_name: String,
#[serde(rename = "ConferenceProviderType")]
pub conference_provider_type: String,
#[serde(rename = "IPDialIn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_dial_in: Option<IPDialIn>,
#[serde(rename = "MeetingSetting")]
pub meeting_setting: MeetingSetting,
#[serde(rename = "PSTNDialIn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pstn_dial_in: Option<PSTNDialIn>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateConferenceProviderResponse {
#[serde(rename = "ConferenceProviderArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub conference_provider_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateContactRequest {
#[serde(rename = "ClientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FirstName")]
pub first_name: String,
#[serde(rename = "LastName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateContactResponse {
#[serde(rename = "ContactArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub contact_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateProfileRequest {
#[serde(rename = "Address")]
pub address: String,
#[serde(rename = "ClientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "DistanceUnit")]
pub distance_unit: String,
#[serde(rename = "MaxVolumeLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_volume_limit: Option<i64>,
#[serde(rename = "PSTNEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pstn_enabled: Option<bool>,
#[serde(rename = "ProfileName")]
pub profile_name: String,
#[serde(rename = "SetupModeDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_mode_disabled: Option<bool>,
#[serde(rename = "TemperatureUnit")]
pub temperature_unit: String,
#[serde(rename = "Timezone")]
pub timezone: String,
#[serde(rename = "WakeWord")]
pub wake_word: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateProfileResponse {
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateRoomRequest {
#[serde(rename = "ClientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
#[serde(rename = "ProviderCalendarId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_calendar_id: Option<String>,
#[serde(rename = "RoomName")]
pub room_name: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateRoomResponse {
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSkillGroupRequest {
#[serde(rename = "ClientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "SkillGroupName")]
pub skill_group_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSkillGroupResponse {
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateUserRequest {
#[serde(rename = "ClientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "Email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "FirstName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
#[serde(rename = "LastName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "UserId")]
pub user_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateUserResponse {
#[serde(rename = "UserArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteAddressBookRequest {
#[serde(rename = "AddressBookArn")]
pub address_book_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteAddressBookResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteBusinessReportScheduleRequest {
#[serde(rename = "ScheduleArn")]
pub schedule_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteBusinessReportScheduleResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteConferenceProviderRequest {
#[serde(rename = "ConferenceProviderArn")]
pub conference_provider_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteConferenceProviderResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteContactRequest {
#[serde(rename = "ContactArn")]
pub contact_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteContactResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDeviceRequest {
#[serde(rename = "DeviceArn")]
pub device_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDeviceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteProfileRequest {
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteProfileResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteRoomRequest {
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteRoomResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteRoomSkillParameterRequest {
#[serde(rename = "ParameterKey")]
pub parameter_key: String,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteRoomSkillParameterResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteSkillAuthorizationRequest {
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteSkillAuthorizationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteSkillGroupRequest {
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteSkillGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUserRequest {
#[serde(rename = "EnrollmentId")]
pub enrollment_id: String,
#[serde(rename = "UserArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteUserResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeveloperInfo {
#[serde(rename = "DeveloperName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub developer_name: Option<String>,
#[serde(rename = "Email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "PrivacyPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub privacy_policy: Option<String>,
#[serde(rename = "Url")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Device {
#[serde(rename = "DeviceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_arn: Option<String>,
#[serde(rename = "DeviceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_name: Option<String>,
#[serde(rename = "DeviceSerialNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_serial_number: Option<String>,
#[serde(rename = "DeviceStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_status: Option<String>,
#[serde(rename = "DeviceStatusInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_status_info: Option<DeviceStatusInfo>,
#[serde(rename = "DeviceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_type: Option<String>,
#[serde(rename = "MacAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mac_address: Option<String>,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "SoftwareVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub software_version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeviceData {
#[serde(rename = "DeviceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_arn: Option<String>,
#[serde(rename = "DeviceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_name: Option<String>,
#[serde(rename = "DeviceSerialNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_serial_number: Option<String>,
#[serde(rename = "DeviceStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_status: Option<String>,
#[serde(rename = "DeviceStatusInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_status_info: Option<DeviceStatusInfo>,
#[serde(rename = "DeviceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_type: Option<String>,
#[serde(rename = "MacAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mac_address: Option<String>,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "RoomName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_name: Option<String>,
#[serde(rename = "SoftwareVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub software_version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeviceEvent {
#[serde(rename = "Timestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp: Option<f64>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeviceStatusDetail {
#[serde(rename = "Code")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeviceStatusInfo {
#[serde(rename = "ConnectionStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_status: Option<String>,
#[serde(rename = "DeviceStatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_status_details: Option<Vec<DeviceStatusDetail>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateContactFromAddressBookRequest {
#[serde(rename = "AddressBookArn")]
pub address_book_arn: String,
#[serde(rename = "ContactArn")]
pub contact_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateContactFromAddressBookResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateDeviceFromRoomRequest {
#[serde(rename = "DeviceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateDeviceFromRoomResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateSkillFromSkillGroupRequest {
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateSkillFromSkillGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateSkillFromUsersRequest {
#[serde(rename = "OrganizationArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub organization_arn: Option<String>,
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateSkillFromUsersResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateSkillGroupFromRoomRequest {
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateSkillGroupFromRoomResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct Filter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ForgetSmartHomeAppliancesRequest {
#[serde(rename = "RoomArn")]
pub room_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ForgetSmartHomeAppliancesResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetAddressBookRequest {
#[serde(rename = "AddressBookArn")]
pub address_book_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetAddressBookResponse {
#[serde(rename = "AddressBook")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_book: Option<AddressBook>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetConferencePreferenceRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetConferencePreferenceResponse {
#[serde(rename = "Preference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub preference: Option<ConferencePreference>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetConferenceProviderRequest {
#[serde(rename = "ConferenceProviderArn")]
pub conference_provider_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetConferenceProviderResponse {
#[serde(rename = "ConferenceProvider")]
#[serde(skip_serializing_if = "Option::is_none")]
pub conference_provider: Option<ConferenceProvider>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetContactRequest {
#[serde(rename = "ContactArn")]
pub contact_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetContactResponse {
#[serde(rename = "Contact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub contact: Option<Contact>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDeviceRequest {
#[serde(rename = "DeviceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDeviceResponse {
#[serde(rename = "Device")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device: Option<Device>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetProfileRequest {
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetProfileResponse {
#[serde(rename = "Profile")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile: Option<Profile>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetRoomRequest {
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetRoomResponse {
#[serde(rename = "Room")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room: Option<Room>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetRoomSkillParameterRequest {
#[serde(rename = "ParameterKey")]
pub parameter_key: String,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetRoomSkillParameterResponse {
#[serde(rename = "RoomSkillParameter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_skill_parameter: Option<RoomSkillParameter>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetSkillGroupRequest {
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetSkillGroupResponse {
#[serde(rename = "SkillGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group: Option<SkillGroup>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct IPDialIn {
#[serde(rename = "CommsProtocol")]
pub comms_protocol: String,
#[serde(rename = "Endpoint")]
pub endpoint: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListBusinessReportSchedulesRequest {
#[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(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListBusinessReportSchedulesResponse {
#[serde(rename = "BusinessReportSchedules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub business_report_schedules: Option<Vec<BusinessReportSchedule>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListConferenceProvidersRequest {
#[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(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListConferenceProvidersResponse {
#[serde(rename = "ConferenceProviders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub conference_providers: Option<Vec<ConferenceProvider>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDeviceEventsRequest {
#[serde(rename = "DeviceArn")]
pub device_arn: String,
#[serde(rename = "EventType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_type: 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>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDeviceEventsResponse {
#[serde(rename = "DeviceEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_events: Option<Vec<DeviceEvent>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListSkillsRequest {
#[serde(rename = "EnablementType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enablement_type: 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 = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
#[serde(rename = "SkillType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListSkillsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SkillSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_summaries: Option<Vec<SkillSummary>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListSkillsStoreCategoriesRequest {
#[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(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListSkillsStoreCategoriesResponse {
#[serde(rename = "CategoryList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub category_list: Option<Vec<Category>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListSkillsStoreSkillsByCategoryRequest {
#[serde(rename = "CategoryId")]
pub category_id: i64,
#[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(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListSkillsStoreSkillsByCategoryResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SkillsStoreSkills")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skills_store_skills: Option<Vec<SkillsStoreSkill>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListSmartHomeAppliancesRequest {
#[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 = "RoomArn")]
pub room_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListSmartHomeAppliancesResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SmartHomeAppliances")]
#[serde(skip_serializing_if = "Option::is_none")]
pub smart_home_appliances: Option<Vec<SmartHomeAppliance>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsRequest {
#[serde(rename = "Arn")]
pub arn: 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(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MeetingSetting {
#[serde(rename = "RequirePin")]
pub require_pin: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PSTNDialIn {
#[serde(rename = "CountryCode")]
pub country_code: String,
#[serde(rename = "OneClickIdDelay")]
pub one_click_id_delay: String,
#[serde(rename = "OneClickPinDelay")]
pub one_click_pin_delay: String,
#[serde(rename = "PhoneNumber")]
pub phone_number: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Profile {
#[serde(rename = "Address")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address: Option<String>,
#[serde(rename = "AddressBookArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_book_arn: Option<String>,
#[serde(rename = "DistanceUnit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub distance_unit: Option<String>,
#[serde(rename = "IsDefault")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default: Option<bool>,
#[serde(rename = "MaxVolumeLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_volume_limit: Option<i64>,
#[serde(rename = "PSTNEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pstn_enabled: Option<bool>,
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
#[serde(rename = "ProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_name: Option<String>,
#[serde(rename = "SetupModeDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_mode_disabled: Option<bool>,
#[serde(rename = "TemperatureUnit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub temperature_unit: Option<String>,
#[serde(rename = "Timezone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
#[serde(rename = "WakeWord")]
#[serde(skip_serializing_if = "Option::is_none")]
pub wake_word: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ProfileData {
#[serde(rename = "Address")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address: Option<String>,
#[serde(rename = "DistanceUnit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub distance_unit: Option<String>,
#[serde(rename = "IsDefault")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default: Option<bool>,
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
#[serde(rename = "ProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_name: Option<String>,
#[serde(rename = "TemperatureUnit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub temperature_unit: Option<String>,
#[serde(rename = "Timezone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
#[serde(rename = "WakeWord")]
#[serde(skip_serializing_if = "Option::is_none")]
pub wake_word: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutConferencePreferenceRequest {
#[serde(rename = "ConferencePreference")]
pub conference_preference: ConferencePreference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutConferencePreferenceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutRoomSkillParameterRequest {
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "RoomSkillParameter")]
pub room_skill_parameter: RoomSkillParameter,
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutRoomSkillParameterResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutSkillAuthorizationRequest {
#[serde(rename = "AuthorizationResult")]
pub authorization_result: ::std::collections::HashMap<String, String>,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutSkillAuthorizationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterAVSDeviceRequest {
#[serde(rename = "AmazonId")]
pub amazon_id: String,
#[serde(rename = "ClientId")]
pub client_id: String,
#[serde(rename = "DeviceSerialNumber")]
pub device_serial_number: String,
#[serde(rename = "ProductId")]
pub product_id: String,
#[serde(rename = "UserCode")]
pub user_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterAVSDeviceResponse {
#[serde(rename = "DeviceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RejectSkillRequest {
#[serde(rename = "SkillId")]
pub skill_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RejectSkillResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ResolveRoomRequest {
#[serde(rename = "SkillId")]
pub skill_id: String,
#[serde(rename = "UserId")]
pub user_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResolveRoomResponse {
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "RoomName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_name: Option<String>,
#[serde(rename = "RoomSkillParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_skill_parameters: Option<Vec<RoomSkillParameter>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RevokeInvitationRequest {
#[serde(rename = "EnrollmentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enrollment_id: Option<String>,
#[serde(rename = "UserArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RevokeInvitationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Room {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
#[serde(rename = "ProviderCalendarId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_calendar_id: Option<String>,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "RoomName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RoomData {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
#[serde(rename = "ProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_name: Option<String>,
#[serde(rename = "ProviderCalendarId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_calendar_id: Option<String>,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "RoomName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RoomSkillParameter {
#[serde(rename = "ParameterKey")]
pub parameter_key: String,
#[serde(rename = "ParameterValue")]
pub parameter_value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SearchAddressBooksRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<Filter>>,
#[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 = "SortCriteria")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_criteria: Option<Vec<Sort>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SearchAddressBooksResponse {
#[serde(rename = "AddressBooks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_books: Option<Vec<AddressBookData>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SearchContactsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<Filter>>,
#[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 = "SortCriteria")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_criteria: Option<Vec<Sort>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SearchContactsResponse {
#[serde(rename = "Contacts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub contacts: Option<Vec<ContactData>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SearchDevicesRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<Filter>>,
#[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 = "SortCriteria")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_criteria: Option<Vec<Sort>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SearchDevicesResponse {
#[serde(rename = "Devices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub devices: Option<Vec<DeviceData>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SearchProfilesRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<Filter>>,
#[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 = "SortCriteria")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_criteria: Option<Vec<Sort>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SearchProfilesResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Profiles")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profiles: Option<Vec<ProfileData>>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SearchRoomsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<Filter>>,
#[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 = "SortCriteria")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_criteria: Option<Vec<Sort>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SearchRoomsResponse {
#[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<RoomData>>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SearchSkillGroupsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<Filter>>,
#[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 = "SortCriteria")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_criteria: Option<Vec<Sort>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SearchSkillGroupsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SkillGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_groups: Option<Vec<SkillGroupData>>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SearchUsersRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<Filter>>,
#[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 = "SortCriteria")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_criteria: Option<Vec<Sort>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SearchUsersResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
#[serde(rename = "Users")]
#[serde(skip_serializing_if = "Option::is_none")]
pub users: Option<Vec<UserData>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SendInvitationRequest {
#[serde(rename = "UserArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SendInvitationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SkillDetails {
#[serde(rename = "BulletPoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bullet_points: Option<Vec<String>>,
#[serde(rename = "DeveloperInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub developer_info: Option<DeveloperInfo>,
#[serde(rename = "EndUserLicenseAgreement")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_user_license_agreement: Option<String>,
#[serde(rename = "GenericKeywords")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generic_keywords: Option<Vec<String>>,
#[serde(rename = "InvocationPhrase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invocation_phrase: Option<String>,
#[serde(rename = "NewInThisVersionBulletPoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub new_in_this_version_bullet_points: Option<Vec<String>>,
#[serde(rename = "ProductDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_description: Option<String>,
#[serde(rename = "ReleaseDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release_date: Option<String>,
#[serde(rename = "Reviews")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reviews: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "SkillTypes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_types: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SkillGroup {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
#[serde(rename = "SkillGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SkillGroupData {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
#[serde(rename = "SkillGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SkillSummary {
#[serde(rename = "EnablementType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enablement_type: Option<String>,
#[serde(rename = "SkillId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_id: Option<String>,
#[serde(rename = "SkillName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_name: Option<String>,
#[serde(rename = "SkillType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_type: Option<String>,
#[serde(rename = "SupportsLinking")]
#[serde(skip_serializing_if = "Option::is_none")]
pub supports_linking: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SkillsStoreSkill {
#[serde(rename = "IconUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub icon_url: Option<String>,
#[serde(rename = "SampleUtterances")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sample_utterances: Option<Vec<String>>,
#[serde(rename = "ShortDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub short_description: Option<String>,
#[serde(rename = "SkillDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_details: Option<SkillDetails>,
#[serde(rename = "SkillId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_id: Option<String>,
#[serde(rename = "SkillName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_name: Option<String>,
#[serde(rename = "SupportsLinking")]
#[serde(skip_serializing_if = "Option::is_none")]
pub supports_linking: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SmartHomeAppliance {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "FriendlyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub friendly_name: Option<String>,
#[serde(rename = "ManufacturerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub manufacturer_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct Sort {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartDeviceSyncRequest {
#[serde(rename = "DeviceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_arn: Option<String>,
#[serde(rename = "Features")]
pub features: Vec<String>,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartDeviceSyncResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartSmartHomeApplianceDiscoveryRequest {
#[serde(rename = "RoomArn")]
pub room_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartSmartHomeApplianceDiscoveryResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TagResourceRequest {
#[serde(rename = "Arn")]
pub arn: String,
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UntagResourceRequest {
#[serde(rename = "Arn")]
pub arn: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UntagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateAddressBookRequest {
#[serde(rename = "AddressBookArn")]
pub address_book_arn: String,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateAddressBookResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateBusinessReportScheduleRequest {
#[serde(rename = "Format")]
#[serde(skip_serializing_if = "Option::is_none")]
pub format: Option<String>,
#[serde(rename = "Recurrence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recurrence: Option<BusinessReportRecurrence>,
#[serde(rename = "S3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_bucket_name: Option<String>,
#[serde(rename = "S3KeyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_key_prefix: Option<String>,
#[serde(rename = "ScheduleArn")]
pub schedule_arn: String,
#[serde(rename = "ScheduleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateBusinessReportScheduleResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateConferenceProviderRequest {
#[serde(rename = "ConferenceProviderArn")]
pub conference_provider_arn: String,
#[serde(rename = "ConferenceProviderType")]
pub conference_provider_type: String,
#[serde(rename = "IPDialIn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_dial_in: Option<IPDialIn>,
#[serde(rename = "MeetingSetting")]
pub meeting_setting: MeetingSetting,
#[serde(rename = "PSTNDialIn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pstn_dial_in: Option<PSTNDialIn>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateConferenceProviderResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateContactRequest {
#[serde(rename = "ContactArn")]
pub contact_arn: String,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FirstName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
#[serde(rename = "LastName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateContactResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDeviceRequest {
#[serde(rename = "DeviceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_arn: Option<String>,
#[serde(rename = "DeviceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDeviceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateProfileRequest {
#[serde(rename = "Address")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address: Option<String>,
#[serde(rename = "DistanceUnit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub distance_unit: Option<String>,
#[serde(rename = "IsDefault")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default: Option<bool>,
#[serde(rename = "MaxVolumeLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_volume_limit: Option<i64>,
#[serde(rename = "PSTNEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pstn_enabled: Option<bool>,
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
#[serde(rename = "ProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_name: Option<String>,
#[serde(rename = "SetupModeDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_mode_disabled: Option<bool>,
#[serde(rename = "TemperatureUnit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub temperature_unit: Option<String>,
#[serde(rename = "Timezone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
#[serde(rename = "WakeWord")]
#[serde(skip_serializing_if = "Option::is_none")]
pub wake_word: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateProfileResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateRoomRequest {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "ProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_arn: Option<String>,
#[serde(rename = "ProviderCalendarId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_calendar_id: Option<String>,
#[serde(rename = "RoomArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_arn: Option<String>,
#[serde(rename = "RoomName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub room_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateRoomResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateSkillGroupRequest {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "SkillGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_arn: Option<String>,
#[serde(rename = "SkillGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub skill_group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateSkillGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserData {
#[serde(rename = "Email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "EnrollmentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enrollment_id: Option<String>,
#[serde(rename = "EnrollmentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enrollment_status: Option<String>,
#[serde(rename = "FirstName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
#[serde(rename = "LastName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "UserArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_arn: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum ApproveSkillError {
ConcurrentModification(String),
LimitExceeded(String),
NotFound(String),
}
impl ApproveSkillError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ApproveSkillError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(ApproveSkillError::ConcurrentModification(
String::from(error_message),
))
}
"LimitExceededException" => {
return RusotoError::Service(ApproveSkillError::LimitExceeded(String::from(
error_message,
)))
}
"NotFoundException" => {
return RusotoError::Service(ApproveSkillError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ApproveSkillError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ApproveSkillError {
fn description(&self) -> &str {
match *self {
ApproveSkillError::ConcurrentModification(ref cause) => cause,
ApproveSkillError::LimitExceeded(ref cause) => cause,
ApproveSkillError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateContactWithAddressBookError {
LimitExceeded(String),
}
impl AssociateContactWithAddressBookError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateContactWithAddressBookError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"LimitExceededException" => {
return RusotoError::Service(
AssociateContactWithAddressBookError::LimitExceeded(String::from(
error_message,
)),
)
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateContactWithAddressBookError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateContactWithAddressBookError {
fn description(&self) -> &str {
match *self {
AssociateContactWithAddressBookError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateDeviceWithRoomError {
ConcurrentModification(String),
DeviceNotRegistered(String),
LimitExceeded(String),
}
impl AssociateDeviceWithRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateDeviceWithRoomError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
AssociateDeviceWithRoomError::ConcurrentModification(String::from(
error_message,
)),
)
}
"DeviceNotRegisteredException" => {
return RusotoError::Service(AssociateDeviceWithRoomError::DeviceNotRegistered(
String::from(error_message),
))
}
"LimitExceededException" => {
return RusotoError::Service(AssociateDeviceWithRoomError::LimitExceeded(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateDeviceWithRoomError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateDeviceWithRoomError {
fn description(&self) -> &str {
match *self {
AssociateDeviceWithRoomError::ConcurrentModification(ref cause) => cause,
AssociateDeviceWithRoomError::DeviceNotRegistered(ref cause) => cause,
AssociateDeviceWithRoomError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateSkillGroupWithRoomError {
ConcurrentModification(String),
}
impl AssociateSkillGroupWithRoomError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateSkillGroupWithRoomError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
AssociateSkillGroupWithRoomError::ConcurrentModification(String::from(
error_message,
)),
)
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateSkillGroupWithRoomError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateSkillGroupWithRoomError {
fn description(&self) -> &str {
match *self {
AssociateSkillGroupWithRoomError::ConcurrentModification(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateSkillWithSkillGroupError {
ConcurrentModification(String),
NotFound(String),
SkillNotLinked(String),
}
impl AssociateSkillWithSkillGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateSkillWithSkillGroupError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
AssociateSkillWithSkillGroupError::ConcurrentModification(String::from(
error_message,
)),
)
}
"NotFoundException" => {
return RusotoError::Service(AssociateSkillWithSkillGroupError::NotFound(
String::from(error_message),
))
}
"SkillNotLinkedException" => {
return RusotoError::Service(AssociateSkillWithSkillGroupError::SkillNotLinked(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateSkillWithSkillGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateSkillWithSkillGroupError {
fn description(&self) -> &str {
match *self {
AssociateSkillWithSkillGroupError::ConcurrentModification(ref cause) => cause,
AssociateSkillWithSkillGroupError::NotFound(ref cause) => cause,
AssociateSkillWithSkillGroupError::SkillNotLinked(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateSkillWithUsersError {
ConcurrentModification(String),
}
impl AssociateSkillWithUsersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateSkillWithUsersError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
AssociateSkillWithUsersError::ConcurrentModification(String::from(
error_message,
)),
)
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateSkillWithUsersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateSkillWithUsersError {
fn description(&self) -> &str {
match *self {
AssociateSkillWithUsersError::ConcurrentModification(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateAddressBookError {
AlreadyExists(String),
LimitExceeded(String),
}
impl CreateAddressBookError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAddressBookError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AlreadyExistsException" => {
return RusotoError::Service(CreateAddressBookError::AlreadyExists(
String::from(error_message),
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateAddressBookError::LimitExceeded(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateAddressBookError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAddressBookError {
fn description(&self) -> &str {
match *self {
CreateAddressBookError::AlreadyExists(ref cause) => cause,
CreateAddressBookError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateBusinessReportScheduleError {
AlreadyExists(String),
}
impl CreateBusinessReportScheduleError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateBusinessReportScheduleError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AlreadyExistsException" => {
return RusotoError::Service(CreateBusinessReportScheduleError::AlreadyExists(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateBusinessReportScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateBusinessReportScheduleError {
fn description(&self) -> &str {
match *self {
CreateBusinessReportScheduleError::AlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConferenceProviderError {
AlreadyExists(String),
}
impl CreateConferenceProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateConferenceProviderError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AlreadyExistsException" => {
return RusotoError::Service(CreateConferenceProviderError::AlreadyExists(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateConferenceProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateConferenceProviderError {
fn description(&self) -> &str {
match *self {
CreateConferenceProviderError::AlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateContactError {
AlreadyExists(String),
LimitExceeded(String),
}
impl CreateContactError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateContactError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AlreadyExistsException" => {
return RusotoError::Service(CreateContactError::AlreadyExists(String::from(
error_message,
)))
}
"LimitExceededException" => {
return RusotoError::Service(CreateContactError::LimitExceeded(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateContactError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateContactError {
fn description(&self) -> &str {
match *self {
CreateContactError::AlreadyExists(ref cause) => cause,
CreateContactError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateProfileError {
AlreadyExists(String),
ConcurrentModification(String),
LimitExceeded(String),
}
impl CreateProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateProfileError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AlreadyExistsException" => {
return RusotoError::Service(CreateProfileError::AlreadyExists(String::from(
error_message,
)))
}
"ConcurrentModificationException" => {
return RusotoError::Service(CreateProfileError::ConcurrentModification(
String::from(error_message),
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateProfileError::LimitExceeded(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateProfileError {
fn description(&self) -> &str {
match *self {
CreateProfileError::AlreadyExists(ref cause) => cause,
CreateProfileError::ConcurrentModification(ref cause) => cause,
CreateProfileError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateRoomError {
AlreadyExists(String),
LimitExceeded(String),
}
impl CreateRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRoomError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AlreadyExistsException" => {
return RusotoError::Service(CreateRoomError::AlreadyExists(String::from(
error_message,
)))
}
"LimitExceededException" => {
return RusotoError::Service(CreateRoomError::LimitExceeded(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateRoomError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateRoomError {
fn description(&self) -> &str {
match *self {
CreateRoomError::AlreadyExists(ref cause) => cause,
CreateRoomError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSkillGroupError {
AlreadyExists(String),
ConcurrentModification(String),
LimitExceeded(String),
}
impl CreateSkillGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSkillGroupError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AlreadyExistsException" => {
return RusotoError::Service(CreateSkillGroupError::AlreadyExists(
String::from(error_message),
))
}
"ConcurrentModificationException" => {
return RusotoError::Service(CreateSkillGroupError::ConcurrentModification(
String::from(error_message),
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateSkillGroupError::LimitExceeded(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSkillGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSkillGroupError {
fn description(&self) -> &str {
match *self {
CreateSkillGroupError::AlreadyExists(ref cause) => cause,
CreateSkillGroupError::ConcurrentModification(ref cause) => cause,
CreateSkillGroupError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateUserError {
ConcurrentModification(String),
LimitExceeded(String),
ResourceInUse(String),
}
impl CreateUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(CreateUserError::ConcurrentModification(
String::from(error_message),
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateUserError::LimitExceeded(String::from(
error_message,
)))
}
"ResourceInUseException" => {
return RusotoError::Service(CreateUserError::ResourceInUse(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUserError {
fn description(&self) -> &str {
match *self {
CreateUserError::ConcurrentModification(ref cause) => cause,
CreateUserError::LimitExceeded(ref cause) => cause,
CreateUserError::ResourceInUse(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAddressBookError {
ConcurrentModification(String),
NotFound(String),
}
impl DeleteAddressBookError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAddressBookError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteAddressBookError::ConcurrentModification(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteAddressBookError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteAddressBookError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAddressBookError {
fn description(&self) -> &str {
match *self {
DeleteAddressBookError::ConcurrentModification(ref cause) => cause,
DeleteAddressBookError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteBusinessReportScheduleError {
ConcurrentModification(String),
NotFound(String),
}
impl DeleteBusinessReportScheduleError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteBusinessReportScheduleError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
DeleteBusinessReportScheduleError::ConcurrentModification(String::from(
error_message,
)),
)
}
"NotFoundException" => {
return RusotoError::Service(DeleteBusinessReportScheduleError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteBusinessReportScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteBusinessReportScheduleError {
fn description(&self) -> &str {
match *self {
DeleteBusinessReportScheduleError::ConcurrentModification(ref cause) => cause,
DeleteBusinessReportScheduleError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteConferenceProviderError {
NotFound(String),
}
impl DeleteConferenceProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteConferenceProviderError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(DeleteConferenceProviderError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteConferenceProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteConferenceProviderError {
fn description(&self) -> &str {
match *self {
DeleteConferenceProviderError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteContactError {
ConcurrentModification(String),
NotFound(String),
}
impl DeleteContactError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteContactError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteContactError::ConcurrentModification(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteContactError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteContactError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteContactError {
fn description(&self) -> &str {
match *self {
DeleteContactError::ConcurrentModification(ref cause) => cause,
DeleteContactError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDeviceError {
ConcurrentModification(String),
InvalidCertificateAuthority(String),
NotFound(String),
}
impl DeleteDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDeviceError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteDeviceError::ConcurrentModification(
String::from(error_message),
))
}
"InvalidCertificateAuthorityException" => {
return RusotoError::Service(DeleteDeviceError::InvalidCertificateAuthority(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteDeviceError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDeviceError {
fn description(&self) -> &str {
match *self {
DeleteDeviceError::ConcurrentModification(ref cause) => cause,
DeleteDeviceError::InvalidCertificateAuthority(ref cause) => cause,
DeleteDeviceError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteProfileError {
ConcurrentModification(String),
NotFound(String),
}
impl DeleteProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteProfileError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteProfileError::ConcurrentModification(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteProfileError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteProfileError {
fn description(&self) -> &str {
match *self {
DeleteProfileError::ConcurrentModification(ref cause) => cause,
DeleteProfileError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRoomError {
ConcurrentModification(String),
NotFound(String),
}
impl DeleteRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRoomError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteRoomError::ConcurrentModification(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteRoomError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteRoomError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRoomError {
fn description(&self) -> &str {
match *self {
DeleteRoomError::ConcurrentModification(ref cause) => cause,
DeleteRoomError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRoomSkillParameterError {
ConcurrentModification(String),
}
impl DeleteRoomSkillParameterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRoomSkillParameterError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
DeleteRoomSkillParameterError::ConcurrentModification(String::from(
error_message,
)),
)
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteRoomSkillParameterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRoomSkillParameterError {
fn description(&self) -> &str {
match *self {
DeleteRoomSkillParameterError::ConcurrentModification(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSkillAuthorizationError {
ConcurrentModification(String),
NotFound(String),
}
impl DeleteSkillAuthorizationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSkillAuthorizationError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
DeleteSkillAuthorizationError::ConcurrentModification(String::from(
error_message,
)),
)
}
"NotFoundException" => {
return RusotoError::Service(DeleteSkillAuthorizationError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteSkillAuthorizationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSkillAuthorizationError {
fn description(&self) -> &str {
match *self {
DeleteSkillAuthorizationError::ConcurrentModification(ref cause) => cause,
DeleteSkillAuthorizationError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSkillGroupError {
ConcurrentModification(String),
NotFound(String),
}
impl DeleteSkillGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSkillGroupError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteSkillGroupError::ConcurrentModification(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteSkillGroupError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteSkillGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSkillGroupError {
fn description(&self) -> &str {
match *self {
DeleteSkillGroupError::ConcurrentModification(ref cause) => cause,
DeleteSkillGroupError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserError {
ConcurrentModification(String),
NotFound(String),
}
impl DeleteUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteUserError::ConcurrentModification(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteUserError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUserError {
fn description(&self) -> &str {
match *self {
DeleteUserError::ConcurrentModification(ref cause) => cause,
DeleteUserError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateContactFromAddressBookError {}
impl DisassociateContactFromAddressBookError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateContactFromAddressBookError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateContactFromAddressBookError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateContactFromAddressBookError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateDeviceFromRoomError {
ConcurrentModification(String),
DeviceNotRegistered(String),
}
impl DisassociateDeviceFromRoomError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateDeviceFromRoomError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
DisassociateDeviceFromRoomError::ConcurrentModification(String::from(
error_message,
)),
)
}
"DeviceNotRegisteredException" => {
return RusotoError::Service(
DisassociateDeviceFromRoomError::DeviceNotRegistered(String::from(
error_message,
)),
)
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateDeviceFromRoomError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateDeviceFromRoomError {
fn description(&self) -> &str {
match *self {
DisassociateDeviceFromRoomError::ConcurrentModification(ref cause) => cause,
DisassociateDeviceFromRoomError::DeviceNotRegistered(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateSkillFromSkillGroupError {
ConcurrentModification(String),
NotFound(String),
}
impl DisassociateSkillFromSkillGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateSkillFromSkillGroupError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
DisassociateSkillFromSkillGroupError::ConcurrentModification(String::from(
error_message,
)),
)
}
"NotFoundException" => {
return RusotoError::Service(DisassociateSkillFromSkillGroupError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateSkillFromSkillGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateSkillFromSkillGroupError {
fn description(&self) -> &str {
match *self {
DisassociateSkillFromSkillGroupError::ConcurrentModification(ref cause) => cause,
DisassociateSkillFromSkillGroupError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateSkillFromUsersError {
ConcurrentModification(String),
}
impl DisassociateSkillFromUsersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateSkillFromUsersError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
DisassociateSkillFromUsersError::ConcurrentModification(String::from(
error_message,
)),
)
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateSkillFromUsersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateSkillFromUsersError {
fn description(&self) -> &str {
match *self {
DisassociateSkillFromUsersError::ConcurrentModification(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateSkillGroupFromRoomError {
ConcurrentModification(String),
}
impl DisassociateSkillGroupFromRoomError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateSkillGroupFromRoomError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
DisassociateSkillGroupFromRoomError::ConcurrentModification(String::from(
error_message,
)),
)
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateSkillGroupFromRoomError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateSkillGroupFromRoomError {
fn description(&self) -> &str {
match *self {
DisassociateSkillGroupFromRoomError::ConcurrentModification(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ForgetSmartHomeAppliancesError {
NotFound(String),
}
impl ForgetSmartHomeAppliancesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ForgetSmartHomeAppliancesError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(ForgetSmartHomeAppliancesError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ForgetSmartHomeAppliancesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ForgetSmartHomeAppliancesError {
fn description(&self) -> &str {
match *self {
ForgetSmartHomeAppliancesError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAddressBookError {
NotFound(String),
}
impl GetAddressBookError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAddressBookError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(GetAddressBookError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetAddressBookError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAddressBookError {
fn description(&self) -> &str {
match *self {
GetAddressBookError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetConferencePreferenceError {
NotFound(String),
}
impl GetConferencePreferenceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetConferencePreferenceError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(GetConferencePreferenceError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetConferencePreferenceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetConferencePreferenceError {
fn description(&self) -> &str {
match *self {
GetConferencePreferenceError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetConferenceProviderError {
NotFound(String),
}
impl GetConferenceProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetConferenceProviderError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(GetConferenceProviderError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetConferenceProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetConferenceProviderError {
fn description(&self) -> &str {
match *self {
GetConferenceProviderError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetContactError {
NotFound(String),
}
impl GetContactError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetContactError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(GetContactError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetContactError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetContactError {
fn description(&self) -> &str {
match *self {
GetContactError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDeviceError {
NotFound(String),
}
impl GetDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDeviceError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(GetDeviceError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDeviceError {
fn description(&self) -> &str {
match *self {
GetDeviceError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetProfileError {
NotFound(String),
}
impl GetProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetProfileError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(GetProfileError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetProfileError {
fn description(&self) -> &str {
match *self {
GetProfileError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRoomError {
NotFound(String),
}
impl GetRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRoomError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(GetRoomError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRoomError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRoomError {
fn description(&self) -> &str {
match *self {
GetRoomError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRoomSkillParameterError {
NotFound(String),
}
impl GetRoomSkillParameterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRoomSkillParameterError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(GetRoomSkillParameterError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRoomSkillParameterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRoomSkillParameterError {
fn description(&self) -> &str {
match *self {
GetRoomSkillParameterError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSkillGroupError {
NotFound(String),
}
impl GetSkillGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSkillGroupError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(GetSkillGroupError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSkillGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSkillGroupError {
fn description(&self) -> &str {
match *self {
GetSkillGroupError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListBusinessReportSchedulesError {}
impl ListBusinessReportSchedulesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListBusinessReportSchedulesError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListBusinessReportSchedulesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListBusinessReportSchedulesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListConferenceProvidersError {}
impl ListConferenceProvidersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListConferenceProvidersError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListConferenceProvidersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListConferenceProvidersError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDeviceEventsError {
NotFound(String),
}
impl ListDeviceEventsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDeviceEventsError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(ListDeviceEventsError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDeviceEventsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDeviceEventsError {
fn description(&self) -> &str {
match *self {
ListDeviceEventsError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSkillsError {}
impl ListSkillsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSkillsError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListSkillsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSkillsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSkillsStoreCategoriesError {}
impl ListSkillsStoreCategoriesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSkillsStoreCategoriesError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListSkillsStoreCategoriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSkillsStoreCategoriesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSkillsStoreSkillsByCategoryError {}
impl ListSkillsStoreSkillsByCategoryError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListSkillsStoreSkillsByCategoryError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListSkillsStoreSkillsByCategoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSkillsStoreSkillsByCategoryError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSmartHomeAppliancesError {
NotFound(String),
}
impl ListSmartHomeAppliancesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSmartHomeAppliancesError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(ListSmartHomeAppliancesError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListSmartHomeAppliancesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSmartHomeAppliancesError {
fn description(&self) -> &str {
match *self {
ListSmartHomeAppliancesError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsError {
NotFound(String),
}
impl ListTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(ListTagsError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsError {
fn description(&self) -> &str {
match *self {
ListTagsError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutConferencePreferenceError {
NotFound(String),
}
impl PutConferencePreferenceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutConferencePreferenceError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(PutConferencePreferenceError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutConferencePreferenceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutConferencePreferenceError {
fn description(&self) -> &str {
match *self {
PutConferencePreferenceError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutRoomSkillParameterError {
ConcurrentModification(String),
}
impl PutRoomSkillParameterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutRoomSkillParameterError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
PutRoomSkillParameterError::ConcurrentModification(String::from(
error_message,
)),
)
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutRoomSkillParameterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutRoomSkillParameterError {
fn description(&self) -> &str {
match *self {
PutRoomSkillParameterError::ConcurrentModification(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutSkillAuthorizationError {
ConcurrentModification(String),
Unauthorized(String),
}
impl PutSkillAuthorizationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutSkillAuthorizationError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
PutSkillAuthorizationError::ConcurrentModification(String::from(
error_message,
)),
)
}
"UnauthorizedException" => {
return RusotoError::Service(PutSkillAuthorizationError::Unauthorized(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutSkillAuthorizationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutSkillAuthorizationError {
fn description(&self) -> &str {
match *self {
PutSkillAuthorizationError::ConcurrentModification(ref cause) => cause,
PutSkillAuthorizationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterAVSDeviceError {
ConcurrentModification(String),
InvalidDevice(String),
LimitExceeded(String),
}
impl RegisterAVSDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterAVSDeviceError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(RegisterAVSDeviceError::ConcurrentModification(
String::from(error_message),
))
}
"InvalidDeviceException" => {
return RusotoError::Service(RegisterAVSDeviceError::InvalidDevice(
String::from(error_message),
))
}
"LimitExceededException" => {
return RusotoError::Service(RegisterAVSDeviceError::LimitExceeded(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RegisterAVSDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterAVSDeviceError {
fn description(&self) -> &str {
match *self {
RegisterAVSDeviceError::ConcurrentModification(ref cause) => cause,
RegisterAVSDeviceError::InvalidDevice(ref cause) => cause,
RegisterAVSDeviceError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RejectSkillError {
ConcurrentModification(String),
NotFound(String),
}
impl RejectSkillError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RejectSkillError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(RejectSkillError::ConcurrentModification(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(RejectSkillError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RejectSkillError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RejectSkillError {
fn description(&self) -> &str {
match *self {
RejectSkillError::ConcurrentModification(ref cause) => cause,
RejectSkillError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResolveRoomError {
NotFound(String),
}
impl ResolveRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResolveRoomError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(ResolveRoomError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ResolveRoomError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResolveRoomError {
fn description(&self) -> &str {
match *self {
ResolveRoomError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RevokeInvitationError {
ConcurrentModification(String),
NotFound(String),
}
impl RevokeInvitationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RevokeInvitationError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(RevokeInvitationError::ConcurrentModification(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(RevokeInvitationError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RevokeInvitationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RevokeInvitationError {
fn description(&self) -> &str {
match *self {
RevokeInvitationError::ConcurrentModification(ref cause) => cause,
RevokeInvitationError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SearchAddressBooksError {}
impl SearchAddressBooksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SearchAddressBooksError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SearchAddressBooksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SearchAddressBooksError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SearchContactsError {}
impl SearchContactsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SearchContactsError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SearchContactsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SearchContactsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SearchDevicesError {}
impl SearchDevicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SearchDevicesError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SearchDevicesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SearchDevicesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SearchProfilesError {}
impl SearchProfilesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SearchProfilesError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SearchProfilesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SearchProfilesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SearchRoomsError {}
impl SearchRoomsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SearchRoomsError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SearchRoomsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SearchRoomsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SearchSkillGroupsError {}
impl SearchSkillGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SearchSkillGroupsError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SearchSkillGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SearchSkillGroupsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SearchUsersError {}
impl SearchUsersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SearchUsersError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SearchUsersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SearchUsersError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SendInvitationError {
ConcurrentModification(String),
InvalidUserStatus(String),
NotFound(String),
}
impl SendInvitationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendInvitationError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(SendInvitationError::ConcurrentModification(
String::from(error_message),
))
}
"InvalidUserStatusException" => {
return RusotoError::Service(SendInvitationError::InvalidUserStatus(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(SendInvitationError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SendInvitationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SendInvitationError {
fn description(&self) -> &str {
match *self {
SendInvitationError::ConcurrentModification(ref cause) => cause,
SendInvitationError::InvalidUserStatus(ref cause) => cause,
SendInvitationError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartDeviceSyncError {
DeviceNotRegistered(String),
}
impl StartDeviceSyncError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartDeviceSyncError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DeviceNotRegisteredException" => {
return RusotoError::Service(StartDeviceSyncError::DeviceNotRegistered(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartDeviceSyncError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartDeviceSyncError {
fn description(&self) -> &str {
match *self {
StartDeviceSyncError::DeviceNotRegistered(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartSmartHomeApplianceDiscoveryError {
NotFound(String),
}
impl StartSmartHomeApplianceDiscoveryError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<StartSmartHomeApplianceDiscoveryError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(StartSmartHomeApplianceDiscoveryError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartSmartHomeApplianceDiscoveryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartSmartHomeApplianceDiscoveryError {
fn description(&self) -> &str {
match *self {
StartSmartHomeApplianceDiscoveryError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
NotFound(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(TagResourceError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagResourceError {
fn description(&self) -> &str {
match *self {
TagResourceError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
NotFound(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(UntagResourceError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagResourceError {
fn description(&self) -> &str {
match *self {
UntagResourceError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAddressBookError {
ConcurrentModification(String),
NameInUse(String),
NotFound(String),
}
impl UpdateAddressBookError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAddressBookError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(UpdateAddressBookError::ConcurrentModification(
String::from(error_message),
))
}
"NameInUseException" => {
return RusotoError::Service(UpdateAddressBookError::NameInUse(String::from(
error_message,
)))
}
"NotFoundException" => {
return RusotoError::Service(UpdateAddressBookError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateAddressBookError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAddressBookError {
fn description(&self) -> &str {
match *self {
UpdateAddressBookError::ConcurrentModification(ref cause) => cause,
UpdateAddressBookError::NameInUse(ref cause) => cause,
UpdateAddressBookError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateBusinessReportScheduleError {
ConcurrentModification(String),
NotFound(String),
}
impl UpdateBusinessReportScheduleError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateBusinessReportScheduleError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(
UpdateBusinessReportScheduleError::ConcurrentModification(String::from(
error_message,
)),
)
}
"NotFoundException" => {
return RusotoError::Service(UpdateBusinessReportScheduleError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateBusinessReportScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateBusinessReportScheduleError {
fn description(&self) -> &str {
match *self {
UpdateBusinessReportScheduleError::ConcurrentModification(ref cause) => cause,
UpdateBusinessReportScheduleError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConferenceProviderError {
NotFound(String),
}
impl UpdateConferenceProviderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateConferenceProviderError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NotFoundException" => {
return RusotoError::Service(UpdateConferenceProviderError::NotFound(
String::from(error_message),
))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateConferenceProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateConferenceProviderError {
fn description(&self) -> &str {
match *self {
UpdateConferenceProviderError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateContactError {
ConcurrentModification(String),
NotFound(String),
}
impl UpdateContactError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateContactError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(UpdateContactError::ConcurrentModification(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(UpdateContactError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateContactError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateContactError {
fn description(&self) -> &str {
match *self {
UpdateContactError::ConcurrentModification(ref cause) => cause,
UpdateContactError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDeviceError {
ConcurrentModification(String),
DeviceNotRegistered(String),
NotFound(String),
}
impl UpdateDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDeviceError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(UpdateDeviceError::ConcurrentModification(
String::from(error_message),
))
}
"DeviceNotRegisteredException" => {
return RusotoError::Service(UpdateDeviceError::DeviceNotRegistered(
String::from(error_message),
))
}
"NotFoundException" => {
return RusotoError::Service(UpdateDeviceError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDeviceError {
fn description(&self) -> &str {
match *self {
UpdateDeviceError::ConcurrentModification(ref cause) => cause,
UpdateDeviceError::DeviceNotRegistered(ref cause) => cause,
UpdateDeviceError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateProfileError {
ConcurrentModification(String),
NameInUse(String),
NotFound(String),
}
impl UpdateProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateProfileError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(UpdateProfileError::ConcurrentModification(
String::from(error_message),
))
}
"NameInUseException" => {
return RusotoError::Service(UpdateProfileError::NameInUse(String::from(
error_message,
)))
}
"NotFoundException" => {
return RusotoError::Service(UpdateProfileError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateProfileError {
fn description(&self) -> &str {
match *self {
UpdateProfileError::ConcurrentModification(ref cause) => cause,
UpdateProfileError::NameInUse(ref cause) => cause,
UpdateProfileError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRoomError {
NameInUse(String),
NotFound(String),
}
impl UpdateRoomError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRoomError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"NameInUseException" => {
return RusotoError::Service(UpdateRoomError::NameInUse(String::from(
error_message,
)))
}
"NotFoundException" => {
return RusotoError::Service(UpdateRoomError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRoomError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRoomError {
fn description(&self) -> &str {
match *self {
UpdateRoomError::NameInUse(ref cause) => cause,
UpdateRoomError::NotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSkillGroupError {
ConcurrentModification(String),
NameInUse(String),
NotFound(String),
}
impl UpdateSkillGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSkillGroupError> {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ConcurrentModificationException" => {
return RusotoError::Service(UpdateSkillGroupError::ConcurrentModification(
String::from(error_message),
))
}
"NameInUseException" => {
return RusotoError::Service(UpdateSkillGroupError::NameInUse(String::from(
error_message,
)))
}
"NotFoundException" => {
return RusotoError::Service(UpdateSkillGroupError::NotFound(String::from(
error_message,
)))
}
"ValidationException" => return RusotoError::Validation(error_message.to_string()),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateSkillGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSkillGroupError {
fn description(&self) -> &str {
match *self {
UpdateSkillGroupError::ConcurrentModification(ref cause) => cause,
UpdateSkillGroupError::NameInUse(ref cause) => cause,
UpdateSkillGroupError::NotFound(ref cause) => cause,
}
}
}
pub trait AlexaForBusiness {
fn approve_skill(
&self,
input: ApproveSkillRequest,
) -> RusotoFuture<ApproveSkillResponse, ApproveSkillError>;
fn associate_contact_with_address_book(
&self,
input: AssociateContactWithAddressBookRequest,
) -> RusotoFuture<AssociateContactWithAddressBookResponse, AssociateContactWithAddressBookError>;
fn associate_device_with_room(
&self,
input: AssociateDeviceWithRoomRequest,
) -> RusotoFuture<AssociateDeviceWithRoomResponse, AssociateDeviceWithRoomError>;
fn associate_skill_group_with_room(
&self,
input: AssociateSkillGroupWithRoomRequest,
) -> RusotoFuture<AssociateSkillGroupWithRoomResponse, AssociateSkillGroupWithRoomError>;
fn associate_skill_with_skill_group(
&self,
input: AssociateSkillWithSkillGroupRequest,
) -> RusotoFuture<AssociateSkillWithSkillGroupResponse, AssociateSkillWithSkillGroupError>;
fn associate_skill_with_users(
&self,
input: AssociateSkillWithUsersRequest,
) -> RusotoFuture<AssociateSkillWithUsersResponse, AssociateSkillWithUsersError>;
fn create_address_book(
&self,
input: CreateAddressBookRequest,
) -> RusotoFuture<CreateAddressBookResponse, CreateAddressBookError>;
fn create_business_report_schedule(
&self,
input: CreateBusinessReportScheduleRequest,
) -> RusotoFuture<CreateBusinessReportScheduleResponse, CreateBusinessReportScheduleError>;
fn create_conference_provider(
&self,
input: CreateConferenceProviderRequest,
) -> RusotoFuture<CreateConferenceProviderResponse, CreateConferenceProviderError>;
fn create_contact(
&self,
input: CreateContactRequest,
) -> RusotoFuture<CreateContactResponse, CreateContactError>;
fn create_profile(
&self,
input: CreateProfileRequest,
) -> RusotoFuture<CreateProfileResponse, CreateProfileError>;
fn create_room(
&self,
input: CreateRoomRequest,
) -> RusotoFuture<CreateRoomResponse, CreateRoomError>;
fn create_skill_group(
&self,
input: CreateSkillGroupRequest,
) -> RusotoFuture<CreateSkillGroupResponse, CreateSkillGroupError>;
fn create_user(
&self,
input: CreateUserRequest,
) -> RusotoFuture<CreateUserResponse, CreateUserError>;
fn delete_address_book(
&self,
input: DeleteAddressBookRequest,
) -> RusotoFuture<DeleteAddressBookResponse, DeleteAddressBookError>;
fn delete_business_report_schedule(
&self,
input: DeleteBusinessReportScheduleRequest,
) -> RusotoFuture<DeleteBusinessReportScheduleResponse, DeleteBusinessReportScheduleError>;
fn delete_conference_provider(
&self,
input: DeleteConferenceProviderRequest,
) -> RusotoFuture<DeleteConferenceProviderResponse, DeleteConferenceProviderError>;
fn delete_contact(
&self,
input: DeleteContactRequest,
) -> RusotoFuture<DeleteContactResponse, DeleteContactError>;
fn delete_device(
&self,
input: DeleteDeviceRequest,
) -> RusotoFuture<DeleteDeviceResponse, DeleteDeviceError>;
fn delete_profile(
&self,
input: DeleteProfileRequest,
) -> RusotoFuture<DeleteProfileResponse, DeleteProfileError>;
fn delete_room(
&self,
input: DeleteRoomRequest,
) -> RusotoFuture<DeleteRoomResponse, DeleteRoomError>;
fn delete_room_skill_parameter(
&self,
input: DeleteRoomSkillParameterRequest,
) -> RusotoFuture<DeleteRoomSkillParameterResponse, DeleteRoomSkillParameterError>;
fn delete_skill_authorization(
&self,
input: DeleteSkillAuthorizationRequest,
) -> RusotoFuture<DeleteSkillAuthorizationResponse, DeleteSkillAuthorizationError>;
fn delete_skill_group(
&self,
input: DeleteSkillGroupRequest,
) -> RusotoFuture<DeleteSkillGroupResponse, DeleteSkillGroupError>;
fn delete_user(
&self,
input: DeleteUserRequest,
) -> RusotoFuture<DeleteUserResponse, DeleteUserError>;
fn disassociate_contact_from_address_book(
&self,
input: DisassociateContactFromAddressBookRequest,
) -> RusotoFuture<
DisassociateContactFromAddressBookResponse,
DisassociateContactFromAddressBookError,
>;
fn disassociate_device_from_room(
&self,
input: DisassociateDeviceFromRoomRequest,
) -> RusotoFuture<DisassociateDeviceFromRoomResponse, DisassociateDeviceFromRoomError>;
fn disassociate_skill_from_skill_group(
&self,
input: DisassociateSkillFromSkillGroupRequest,
) -> RusotoFuture<DisassociateSkillFromSkillGroupResponse, DisassociateSkillFromSkillGroupError>;
fn disassociate_skill_from_users(
&self,
input: DisassociateSkillFromUsersRequest,
) -> RusotoFuture<DisassociateSkillFromUsersResponse, DisassociateSkillFromUsersError>;
fn disassociate_skill_group_from_room(
&self,
input: DisassociateSkillGroupFromRoomRequest,
) -> RusotoFuture<DisassociateSkillGroupFromRoomResponse, DisassociateSkillGroupFromRoomError>;
fn forget_smart_home_appliances(
&self,
input: ForgetSmartHomeAppliancesRequest,
) -> RusotoFuture<ForgetSmartHomeAppliancesResponse, ForgetSmartHomeAppliancesError>;
fn get_address_book(
&self,
input: GetAddressBookRequest,
) -> RusotoFuture<GetAddressBookResponse, GetAddressBookError>;
fn get_conference_preference(
&self,
) -> RusotoFuture<GetConferencePreferenceResponse, GetConferencePreferenceError>;
fn get_conference_provider(
&self,
input: GetConferenceProviderRequest,
) -> RusotoFuture<GetConferenceProviderResponse, GetConferenceProviderError>;
fn get_contact(
&self,
input: GetContactRequest,
) -> RusotoFuture<GetContactResponse, GetContactError>;
fn get_device(
&self,
input: GetDeviceRequest,
) -> RusotoFuture<GetDeviceResponse, GetDeviceError>;
fn get_profile(
&self,
input: GetProfileRequest,
) -> RusotoFuture<GetProfileResponse, GetProfileError>;
fn get_room(&self, input: GetRoomRequest) -> RusotoFuture<GetRoomResponse, GetRoomError>;
fn get_room_skill_parameter(
&self,
input: GetRoomSkillParameterRequest,
) -> RusotoFuture<GetRoomSkillParameterResponse, GetRoomSkillParameterError>;
fn get_skill_group(
&self,
input: GetSkillGroupRequest,
) -> RusotoFuture<GetSkillGroupResponse, GetSkillGroupError>;
fn list_business_report_schedules(
&self,
input: ListBusinessReportSchedulesRequest,
) -> RusotoFuture<ListBusinessReportSchedulesResponse, ListBusinessReportSchedulesError>;
fn list_conference_providers(
&self,
input: ListConferenceProvidersRequest,
) -> RusotoFuture<ListConferenceProvidersResponse, ListConferenceProvidersError>;
fn list_device_events(
&self,
input: ListDeviceEventsRequest,
) -> RusotoFuture<ListDeviceEventsResponse, ListDeviceEventsError>;
fn list_skills(
&self,
input: ListSkillsRequest,
) -> RusotoFuture<ListSkillsResponse, ListSkillsError>;
fn list_skills_store_categories(
&self,
input: ListSkillsStoreCategoriesRequest,
) -> RusotoFuture<ListSkillsStoreCategoriesResponse, ListSkillsStoreCategoriesError>;
fn list_skills_store_skills_by_category(
&self,
input: ListSkillsStoreSkillsByCategoryRequest,
) -> RusotoFuture<ListSkillsStoreSkillsByCategoryResponse, ListSkillsStoreSkillsByCategoryError>;
fn list_smart_home_appliances(
&self,
input: ListSmartHomeAppliancesRequest,
) -> RusotoFuture<ListSmartHomeAppliancesResponse, ListSmartHomeAppliancesError>;
fn list_tags(&self, input: ListTagsRequest) -> RusotoFuture<ListTagsResponse, ListTagsError>;
fn put_conference_preference(
&self,
input: PutConferencePreferenceRequest,
) -> RusotoFuture<PutConferencePreferenceResponse, PutConferencePreferenceError>;
fn put_room_skill_parameter(
&self,
input: PutRoomSkillParameterRequest,
) -> RusotoFuture<PutRoomSkillParameterResponse, PutRoomSkillParameterError>;
fn put_skill_authorization(
&self,
input: PutSkillAuthorizationRequest,
) -> RusotoFuture<PutSkillAuthorizationResponse, PutSkillAuthorizationError>;
fn register_avs_device(
&self,
input: RegisterAVSDeviceRequest,
) -> RusotoFuture<RegisterAVSDeviceResponse, RegisterAVSDeviceError>;
fn reject_skill(
&self,
input: RejectSkillRequest,
) -> RusotoFuture<RejectSkillResponse, RejectSkillError>;
fn resolve_room(
&self,
input: ResolveRoomRequest,
) -> RusotoFuture<ResolveRoomResponse, ResolveRoomError>;
fn revoke_invitation(
&self,
input: RevokeInvitationRequest,
) -> RusotoFuture<RevokeInvitationResponse, RevokeInvitationError>;
fn search_address_books(
&self,
input: SearchAddressBooksRequest,
) -> RusotoFuture<SearchAddressBooksResponse, SearchAddressBooksError>;
fn search_contacts(
&self,
input: SearchContactsRequest,
) -> RusotoFuture<SearchContactsResponse, SearchContactsError>;
fn search_devices(
&self,
input: SearchDevicesRequest,
) -> RusotoFuture<SearchDevicesResponse, SearchDevicesError>;
fn search_profiles(
&self,
input: SearchProfilesRequest,
) -> RusotoFuture<SearchProfilesResponse, SearchProfilesError>;
fn search_rooms(
&self,
input: SearchRoomsRequest,
) -> RusotoFuture<SearchRoomsResponse, SearchRoomsError>;
fn search_skill_groups(
&self,
input: SearchSkillGroupsRequest,
) -> RusotoFuture<SearchSkillGroupsResponse, SearchSkillGroupsError>;
fn search_users(
&self,
input: SearchUsersRequest,
) -> RusotoFuture<SearchUsersResponse, SearchUsersError>;
fn send_invitation(
&self,
input: SendInvitationRequest,
) -> RusotoFuture<SendInvitationResponse, SendInvitationError>;
fn start_device_sync(
&self,
input: StartDeviceSyncRequest,
) -> RusotoFuture<StartDeviceSyncResponse, StartDeviceSyncError>;
fn start_smart_home_appliance_discovery(
&self,
input: StartSmartHomeApplianceDiscoveryRequest,
) -> RusotoFuture<StartSmartHomeApplianceDiscoveryResponse, StartSmartHomeApplianceDiscoveryError>;
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError>;
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError>;
fn update_address_book(
&self,
input: UpdateAddressBookRequest,
) -> RusotoFuture<UpdateAddressBookResponse, UpdateAddressBookError>;
fn update_business_report_schedule(
&self,
input: UpdateBusinessReportScheduleRequest,
) -> RusotoFuture<UpdateBusinessReportScheduleResponse, UpdateBusinessReportScheduleError>;
fn update_conference_provider(
&self,
input: UpdateConferenceProviderRequest,
) -> RusotoFuture<UpdateConferenceProviderResponse, UpdateConferenceProviderError>;
fn update_contact(
&self,
input: UpdateContactRequest,
) -> RusotoFuture<UpdateContactResponse, UpdateContactError>;
fn update_device(
&self,
input: UpdateDeviceRequest,
) -> RusotoFuture<UpdateDeviceResponse, UpdateDeviceError>;
fn update_profile(
&self,
input: UpdateProfileRequest,
) -> RusotoFuture<UpdateProfileResponse, UpdateProfileError>;
fn update_room(
&self,
input: UpdateRoomRequest,
) -> RusotoFuture<UpdateRoomResponse, UpdateRoomError>;
fn update_skill_group(
&self,
input: UpdateSkillGroupRequest,
) -> RusotoFuture<UpdateSkillGroupResponse, UpdateSkillGroupError>;
}
#[derive(Clone)]
pub struct AlexaForBusinessClient {
client: Client,
region: region::Region,
}
impl AlexaForBusinessClient {
pub fn new(region: region::Region) -> AlexaForBusinessClient {
AlexaForBusinessClient {
client: Client::shared(),
region: region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> AlexaForBusinessClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
AlexaForBusinessClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region: region,
}
}
}
impl AlexaForBusiness for AlexaForBusinessClient {
fn approve_skill(
&self,
input: ApproveSkillRequest,
) -> RusotoFuture<ApproveSkillResponse, ApproveSkillError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.ApproveSkill");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ApproveSkillResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ApproveSkillError::from_response(response))),
)
}
})
}
fn associate_contact_with_address_book(
&self,
input: AssociateContactWithAddressBookRequest,
) -> RusotoFuture<AssociateContactWithAddressBookResponse, AssociateContactWithAddressBookError>
{
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.AssociateContactWithAddressBook",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<AssociateContactWithAddressBookResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateContactWithAddressBookError::from_response(
response,
))
}))
}
})
}
fn associate_device_with_room(
&self,
input: AssociateDeviceWithRoomRequest,
) -> RusotoFuture<AssociateDeviceWithRoomResponse, AssociateDeviceWithRoomError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.AssociateDeviceWithRoom");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<AssociateDeviceWithRoomResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateDeviceWithRoomError::from_response(response))
}))
}
})
}
fn associate_skill_group_with_room(
&self,
input: AssociateSkillGroupWithRoomRequest,
) -> RusotoFuture<AssociateSkillGroupWithRoomResponse, AssociateSkillGroupWithRoomError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.AssociateSkillGroupWithRoom",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<AssociateSkillGroupWithRoomResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateSkillGroupWithRoomError::from_response(response))
}))
}
})
}
fn associate_skill_with_skill_group(
&self,
input: AssociateSkillWithSkillGroupRequest,
) -> RusotoFuture<AssociateSkillWithSkillGroupResponse, AssociateSkillWithSkillGroupError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.AssociateSkillWithSkillGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<AssociateSkillWithSkillGroupResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateSkillWithSkillGroupError::from_response(response))
}))
}
})
}
fn associate_skill_with_users(
&self,
input: AssociateSkillWithUsersRequest,
) -> RusotoFuture<AssociateSkillWithUsersResponse, AssociateSkillWithUsersError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.AssociateSkillWithUsers");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<AssociateSkillWithUsersResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateSkillWithUsersError::from_response(response))
}))
}
})
}
fn create_address_book(
&self,
input: CreateAddressBookRequest,
) -> RusotoFuture<CreateAddressBookResponse, CreateAddressBookError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.CreateAddressBook");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateAddressBookResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateAddressBookError::from_response(response))),
)
}
})
}
fn create_business_report_schedule(
&self,
input: CreateBusinessReportScheduleRequest,
) -> RusotoFuture<CreateBusinessReportScheduleResponse, CreateBusinessReportScheduleError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.CreateBusinessReportSchedule",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateBusinessReportScheduleResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateBusinessReportScheduleError::from_response(response))
}))
}
})
}
fn create_conference_provider(
&self,
input: CreateConferenceProviderRequest,
) -> RusotoFuture<CreateConferenceProviderResponse, CreateConferenceProviderError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.CreateConferenceProvider");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateConferenceProviderResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateConferenceProviderError::from_response(response))
}))
}
})
}
fn create_contact(
&self,
input: CreateContactRequest,
) -> RusotoFuture<CreateContactResponse, CreateContactError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.CreateContact");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateContactResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateContactError::from_response(response))),
)
}
})
}
fn create_profile(
&self,
input: CreateProfileRequest,
) -> RusotoFuture<CreateProfileResponse, CreateProfileError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.CreateProfile");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateProfileResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateProfileError::from_response(response))),
)
}
})
}
fn create_room(
&self,
input: CreateRoomRequest,
) -> RusotoFuture<CreateRoomResponse, CreateRoomError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.CreateRoom");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateRoomResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateRoomError::from_response(response))),
)
}
})
}
fn create_skill_group(
&self,
input: CreateSkillGroupRequest,
) -> RusotoFuture<CreateSkillGroupResponse, CreateSkillGroupError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.CreateSkillGroup");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateSkillGroupResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateSkillGroupError::from_response(response))),
)
}
})
}
fn create_user(
&self,
input: CreateUserRequest,
) -> RusotoFuture<CreateUserResponse, CreateUserError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.CreateUser");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateUserResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateUserError::from_response(response))),
)
}
})
}
fn delete_address_book(
&self,
input: DeleteAddressBookRequest,
) -> RusotoFuture<DeleteAddressBookResponse, DeleteAddressBookError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteAddressBook");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteAddressBookResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteAddressBookError::from_response(response))),
)
}
})
}
fn delete_business_report_schedule(
&self,
input: DeleteBusinessReportScheduleRequest,
) -> RusotoFuture<DeleteBusinessReportScheduleResponse, DeleteBusinessReportScheduleError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.DeleteBusinessReportSchedule",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteBusinessReportScheduleResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteBusinessReportScheduleError::from_response(response))
}))
}
})
}
fn delete_conference_provider(
&self,
input: DeleteConferenceProviderRequest,
) -> RusotoFuture<DeleteConferenceProviderResponse, DeleteConferenceProviderError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteConferenceProvider");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteConferenceProviderResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteConferenceProviderError::from_response(response))
}))
}
})
}
fn delete_contact(
&self,
input: DeleteContactRequest,
) -> RusotoFuture<DeleteContactResponse, DeleteContactError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteContact");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteContactResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteContactError::from_response(response))),
)
}
})
}
fn delete_device(
&self,
input: DeleteDeviceRequest,
) -> RusotoFuture<DeleteDeviceResponse, DeleteDeviceError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteDevice");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteDeviceResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteDeviceError::from_response(response))),
)
}
})
}
fn delete_profile(
&self,
input: DeleteProfileRequest,
) -> RusotoFuture<DeleteProfileResponse, DeleteProfileError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteProfile");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteProfileResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteProfileError::from_response(response))),
)
}
})
}
fn delete_room(
&self,
input: DeleteRoomRequest,
) -> RusotoFuture<DeleteRoomResponse, DeleteRoomError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteRoom");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteRoomResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteRoomError::from_response(response))),
)
}
})
}
fn delete_room_skill_parameter(
&self,
input: DeleteRoomSkillParameterRequest,
) -> RusotoFuture<DeleteRoomSkillParameterResponse, DeleteRoomSkillParameterError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteRoomSkillParameter");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteRoomSkillParameterResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteRoomSkillParameterError::from_response(response))
}))
}
})
}
fn delete_skill_authorization(
&self,
input: DeleteSkillAuthorizationRequest,
) -> RusotoFuture<DeleteSkillAuthorizationResponse, DeleteSkillAuthorizationError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteSkillAuthorization");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteSkillAuthorizationResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteSkillAuthorizationError::from_response(response))
}))
}
})
}
fn delete_skill_group(
&self,
input: DeleteSkillGroupRequest,
) -> RusotoFuture<DeleteSkillGroupResponse, DeleteSkillGroupError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteSkillGroup");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteSkillGroupResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteSkillGroupError::from_response(response))),
)
}
})
}
fn delete_user(
&self,
input: DeleteUserRequest,
) -> RusotoFuture<DeleteUserResponse, DeleteUserError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.DeleteUser");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteUserResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteUserError::from_response(response))),
)
}
})
}
fn disassociate_contact_from_address_book(
&self,
input: DisassociateContactFromAddressBookRequest,
) -> RusotoFuture<
DisassociateContactFromAddressBookResponse,
DisassociateContactFromAddressBookError,
> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.DisassociateContactFromAddressBook",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DisassociateContactFromAddressBookResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateContactFromAddressBookError::from_response(
response,
))
}))
}
})
}
fn disassociate_device_from_room(
&self,
input: DisassociateDeviceFromRoomRequest,
) -> RusotoFuture<DisassociateDeviceFromRoomResponse, DisassociateDeviceFromRoomError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.DisassociateDeviceFromRoom",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DisassociateDeviceFromRoomResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateDeviceFromRoomError::from_response(response))
}))
}
})
}
fn disassociate_skill_from_skill_group(
&self,
input: DisassociateSkillFromSkillGroupRequest,
) -> RusotoFuture<DisassociateSkillFromSkillGroupResponse, DisassociateSkillFromSkillGroupError>
{
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.DisassociateSkillFromSkillGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DisassociateSkillFromSkillGroupResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateSkillFromSkillGroupError::from_response(
response,
))
}))
}
})
}
fn disassociate_skill_from_users(
&self,
input: DisassociateSkillFromUsersRequest,
) -> RusotoFuture<DisassociateSkillFromUsersResponse, DisassociateSkillFromUsersError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.DisassociateSkillFromUsers",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DisassociateSkillFromUsersResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateSkillFromUsersError::from_response(response))
}))
}
})
}
fn disassociate_skill_group_from_room(
&self,
input: DisassociateSkillGroupFromRoomRequest,
) -> RusotoFuture<DisassociateSkillGroupFromRoomResponse, DisassociateSkillGroupFromRoomError>
{
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.DisassociateSkillGroupFromRoom",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DisassociateSkillGroupFromRoomResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateSkillGroupFromRoomError::from_response(response))
}))
}
})
}
fn forget_smart_home_appliances(
&self,
input: ForgetSmartHomeAppliancesRequest,
) -> RusotoFuture<ForgetSmartHomeAppliancesResponse, ForgetSmartHomeAppliancesError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.ForgetSmartHomeAppliances");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ForgetSmartHomeAppliancesResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ForgetSmartHomeAppliancesError::from_response(response))
}))
}
})
}
fn get_address_book(
&self,
input: GetAddressBookRequest,
) -> RusotoFuture<GetAddressBookResponse, GetAddressBookError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.GetAddressBook");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetAddressBookResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetAddressBookError::from_response(response))),
)
}
})
}
fn get_conference_preference(
&self,
) -> RusotoFuture<GetConferencePreferenceResponse, GetConferencePreferenceError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.GetConferencePreference");
request.set_payload(Some(b"{}".to_vec()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetConferencePreferenceResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetConferencePreferenceError::from_response(response))
}))
}
})
}
fn get_conference_provider(
&self,
input: GetConferenceProviderRequest,
) -> RusotoFuture<GetConferenceProviderResponse, GetConferenceProviderError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.GetConferenceProvider");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetConferenceProviderResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetConferenceProviderError::from_response(response))
}),
)
}
})
}
fn get_contact(
&self,
input: GetContactRequest,
) -> RusotoFuture<GetContactResponse, GetContactError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.GetContact");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetContactResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetContactError::from_response(response))),
)
}
})
}
fn get_device(
&self,
input: GetDeviceRequest,
) -> RusotoFuture<GetDeviceResponse, GetDeviceError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.GetDevice");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetDeviceResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDeviceError::from_response(response))),
)
}
})
}
fn get_profile(
&self,
input: GetProfileRequest,
) -> RusotoFuture<GetProfileResponse, GetProfileError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.GetProfile");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetProfileResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetProfileError::from_response(response))),
)
}
})
}
fn get_room(&self, input: GetRoomRequest) -> RusotoFuture<GetRoomResponse, GetRoomError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.GetRoom");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetRoomResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetRoomError::from_response(response))),
)
}
})
}
fn get_room_skill_parameter(
&self,
input: GetRoomSkillParameterRequest,
) -> RusotoFuture<GetRoomSkillParameterResponse, GetRoomSkillParameterError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.GetRoomSkillParameter");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetRoomSkillParameterResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetRoomSkillParameterError::from_response(response))
}),
)
}
})
}
fn get_skill_group(
&self,
input: GetSkillGroupRequest,
) -> RusotoFuture<GetSkillGroupResponse, GetSkillGroupError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.GetSkillGroup");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetSkillGroupResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSkillGroupError::from_response(response))),
)
}
})
}
fn list_business_report_schedules(
&self,
input: ListBusinessReportSchedulesRequest,
) -> RusotoFuture<ListBusinessReportSchedulesResponse, ListBusinessReportSchedulesError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.ListBusinessReportSchedules",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListBusinessReportSchedulesResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListBusinessReportSchedulesError::from_response(response))
}))
}
})
}
fn list_conference_providers(
&self,
input: ListConferenceProvidersRequest,
) -> RusotoFuture<ListConferenceProvidersResponse, ListConferenceProvidersError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.ListConferenceProviders");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListConferenceProvidersResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListConferenceProvidersError::from_response(response))
}))
}
})
}
fn list_device_events(
&self,
input: ListDeviceEventsRequest,
) -> RusotoFuture<ListDeviceEventsResponse, ListDeviceEventsError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.ListDeviceEvents");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListDeviceEventsResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDeviceEventsError::from_response(response))),
)
}
})
}
fn list_skills(
&self,
input: ListSkillsRequest,
) -> RusotoFuture<ListSkillsResponse, ListSkillsError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.ListSkills");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListSkillsResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListSkillsError::from_response(response))),
)
}
})
}
fn list_skills_store_categories(
&self,
input: ListSkillsStoreCategoriesRequest,
) -> RusotoFuture<ListSkillsStoreCategoriesResponse, ListSkillsStoreCategoriesError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.ListSkillsStoreCategories");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListSkillsStoreCategoriesResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListSkillsStoreCategoriesError::from_response(response))
}))
}
})
}
fn list_skills_store_skills_by_category(
&self,
input: ListSkillsStoreSkillsByCategoryRequest,
) -> RusotoFuture<ListSkillsStoreSkillsByCategoryResponse, ListSkillsStoreSkillsByCategoryError>
{
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.ListSkillsStoreSkillsByCategory",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListSkillsStoreSkillsByCategoryResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListSkillsStoreSkillsByCategoryError::from_response(
response,
))
}))
}
})
}
fn list_smart_home_appliances(
&self,
input: ListSmartHomeAppliancesRequest,
) -> RusotoFuture<ListSmartHomeAppliancesResponse, ListSmartHomeAppliancesError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.ListSmartHomeAppliances");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListSmartHomeAppliancesResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListSmartHomeAppliancesError::from_response(response))
}))
}
})
}
fn list_tags(&self, input: ListTagsRequest) -> RusotoFuture<ListTagsResponse, ListTagsError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.ListTags");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListTagsResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListTagsError::from_response(response))),
)
}
})
}
fn put_conference_preference(
&self,
input: PutConferencePreferenceRequest,
) -> RusotoFuture<PutConferencePreferenceResponse, PutConferencePreferenceError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.PutConferencePreference");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<PutConferencePreferenceResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(PutConferencePreferenceError::from_response(response))
}))
}
})
}
fn put_room_skill_parameter(
&self,
input: PutRoomSkillParameterRequest,
) -> RusotoFuture<PutRoomSkillParameterResponse, PutRoomSkillParameterError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.PutRoomSkillParameter");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<PutRoomSkillParameterResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(PutRoomSkillParameterError::from_response(response))
}),
)
}
})
}
fn put_skill_authorization(
&self,
input: PutSkillAuthorizationRequest,
) -> RusotoFuture<PutSkillAuthorizationResponse, PutSkillAuthorizationError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.PutSkillAuthorization");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<PutSkillAuthorizationResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(PutSkillAuthorizationError::from_response(response))
}),
)
}
})
}
fn register_avs_device(
&self,
input: RegisterAVSDeviceRequest,
) -> RusotoFuture<RegisterAVSDeviceResponse, RegisterAVSDeviceError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.RegisterAVSDevice");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<RegisterAVSDeviceResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RegisterAVSDeviceError::from_response(response))),
)
}
})
}
fn reject_skill(
&self,
input: RejectSkillRequest,
) -> RusotoFuture<RejectSkillResponse, RejectSkillError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.RejectSkill");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<RejectSkillResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RejectSkillError::from_response(response))),
)
}
})
}
fn resolve_room(
&self,
input: ResolveRoomRequest,
) -> RusotoFuture<ResolveRoomResponse, ResolveRoomError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.ResolveRoom");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ResolveRoomResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ResolveRoomError::from_response(response))),
)
}
})
}
fn revoke_invitation(
&self,
input: RevokeInvitationRequest,
) -> RusotoFuture<RevokeInvitationResponse, RevokeInvitationError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.RevokeInvitation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<RevokeInvitationResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RevokeInvitationError::from_response(response))),
)
}
})
}
fn search_address_books(
&self,
input: SearchAddressBooksRequest,
) -> RusotoFuture<SearchAddressBooksResponse, SearchAddressBooksError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.SearchAddressBooks");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SearchAddressBooksResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SearchAddressBooksError::from_response(response))),
)
}
})
}
fn search_contacts(
&self,
input: SearchContactsRequest,
) -> RusotoFuture<SearchContactsResponse, SearchContactsError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.SearchContacts");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SearchContactsResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SearchContactsError::from_response(response))),
)
}
})
}
fn search_devices(
&self,
input: SearchDevicesRequest,
) -> RusotoFuture<SearchDevicesResponse, SearchDevicesError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.SearchDevices");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SearchDevicesResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SearchDevicesError::from_response(response))),
)
}
})
}
fn search_profiles(
&self,
input: SearchProfilesRequest,
) -> RusotoFuture<SearchProfilesResponse, SearchProfilesError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.SearchProfiles");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SearchProfilesResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SearchProfilesError::from_response(response))),
)
}
})
}
fn search_rooms(
&self,
input: SearchRoomsRequest,
) -> RusotoFuture<SearchRoomsResponse, SearchRoomsError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.SearchRooms");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SearchRoomsResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SearchRoomsError::from_response(response))),
)
}
})
}
fn search_skill_groups(
&self,
input: SearchSkillGroupsRequest,
) -> RusotoFuture<SearchSkillGroupsResponse, SearchSkillGroupsError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.SearchSkillGroups");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SearchSkillGroupsResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SearchSkillGroupsError::from_response(response))),
)
}
})
}
fn search_users(
&self,
input: SearchUsersRequest,
) -> RusotoFuture<SearchUsersResponse, SearchUsersError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.SearchUsers");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SearchUsersResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SearchUsersError::from_response(response))),
)
}
})
}
fn send_invitation(
&self,
input: SendInvitationRequest,
) -> RusotoFuture<SendInvitationResponse, SendInvitationError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.SendInvitation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SendInvitationResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SendInvitationError::from_response(response))),
)
}
})
}
fn start_device_sync(
&self,
input: StartDeviceSyncRequest,
) -> RusotoFuture<StartDeviceSyncResponse, StartDeviceSyncError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.StartDeviceSync");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<StartDeviceSyncResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartDeviceSyncError::from_response(response))),
)
}
})
}
fn start_smart_home_appliance_discovery(
&self,
input: StartSmartHomeApplianceDiscoveryRequest,
) -> RusotoFuture<StartSmartHomeApplianceDiscoveryResponse, StartSmartHomeApplianceDiscoveryError>
{
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.StartSmartHomeApplianceDiscovery",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<StartSmartHomeApplianceDiscoveryResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(StartSmartHomeApplianceDiscoveryError::from_response(
response,
))
}))
}
})
}
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.TagResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<TagResourceResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TagResourceError::from_response(response))),
)
}
})
}
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.UntagResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UntagResourceResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UntagResourceError::from_response(response))),
)
}
})
}
fn update_address_book(
&self,
input: UpdateAddressBookRequest,
) -> RusotoFuture<UpdateAddressBookResponse, UpdateAddressBookError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.UpdateAddressBook");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateAddressBookResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateAddressBookError::from_response(response))),
)
}
})
}
fn update_business_report_schedule(
&self,
input: UpdateBusinessReportScheduleRequest,
) -> RusotoFuture<UpdateBusinessReportScheduleResponse, UpdateBusinessReportScheduleError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AlexaForBusiness.UpdateBusinessReportSchedule",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateBusinessReportScheduleResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateBusinessReportScheduleError::from_response(response))
}))
}
})
}
fn update_conference_provider(
&self,
input: UpdateConferenceProviderRequest,
) -> RusotoFuture<UpdateConferenceProviderResponse, UpdateConferenceProviderError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.UpdateConferenceProvider");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateConferenceProviderResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateConferenceProviderError::from_response(response))
}))
}
})
}
fn update_contact(
&self,
input: UpdateContactRequest,
) -> RusotoFuture<UpdateContactResponse, UpdateContactError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.UpdateContact");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateContactResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateContactError::from_response(response))),
)
}
})
}
fn update_device(
&self,
input: UpdateDeviceRequest,
) -> RusotoFuture<UpdateDeviceResponse, UpdateDeviceError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.UpdateDevice");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateDeviceResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateDeviceError::from_response(response))),
)
}
})
}
fn update_profile(
&self,
input: UpdateProfileRequest,
) -> RusotoFuture<UpdateProfileResponse, UpdateProfileError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.UpdateProfile");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateProfileResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateProfileError::from_response(response))),
)
}
})
}
fn update_room(
&self,
input: UpdateRoomRequest,
) -> RusotoFuture<UpdateRoomResponse, UpdateRoomError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.UpdateRoom");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateRoomResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateRoomError::from_response(response))),
)
}
})
}
fn update_skill_group(
&self,
input: UpdateSkillGroupRequest,
) -> RusotoFuture<UpdateSkillGroupResponse, UpdateSkillGroupError> {
let mut request = SignedRequest::new("POST", "a4b", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AlexaForBusiness.UpdateSkillGroup");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateSkillGroupResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateSkillGroupError::from_response(response))),
)
}
})
}
}
#[cfg(test)]
mod protocol_tests {}