use std::error::Error;
use std::fmt;
use std::io;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoFuture};
use rusoto_core::credential::{CredentialsError, ProvideAwsCredentials};
use rusoto_core::request::HttpDispatchError;
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::signature::SignedRequest;
use serde_json;
use serde_json::from_slice;
use serde_json::Value as SerdeJsonValue;
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AacSettings {
#[serde(rename = "Bitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bitrate: Option<f64>,
#[serde(rename = "CodingMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coding_mode: Option<String>,
#[serde(rename = "InputType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_type: Option<String>,
#[serde(rename = "Profile")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile: Option<String>,
#[serde(rename = "RateControlMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rate_control_mode: Option<String>,
#[serde(rename = "RawFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub raw_format: Option<String>,
#[serde(rename = "SampleRate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sample_rate: Option<f64>,
#[serde(rename = "Spec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub spec: Option<String>,
#[serde(rename = "VbrQuality")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vbr_quality: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Ac3Settings {
#[serde(rename = "Bitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bitrate: Option<f64>,
#[serde(rename = "BitstreamMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bitstream_mode: Option<String>,
#[serde(rename = "CodingMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coding_mode: Option<String>,
#[serde(rename = "Dialnorm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dialnorm: Option<i64>,
#[serde(rename = "DrcProfile")]
#[serde(skip_serializing_if = "Option::is_none")]
pub drc_profile: Option<String>,
#[serde(rename = "LfeFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lfe_filter: Option<String>,
#[serde(rename = "MetadataControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata_control: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AccessDenied {
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ArchiveContainerSettings {
#[serde(rename = "M2tsSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub m_2ts_settings: Option<M2tsSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ArchiveGroupSettings {
#[serde(rename = "Destination")]
pub destination: OutputLocationRef,
#[serde(rename = "RolloverInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rollover_interval: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ArchiveOutputSettings {
#[serde(rename = "ContainerSettings")]
pub container_settings: ArchiveContainerSettings,
#[serde(rename = "Extension")]
#[serde(skip_serializing_if = "Option::is_none")]
pub extension: Option<String>,
#[serde(rename = "NameModifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name_modifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AribDestinationSettings {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AribSourceSettings {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AudioChannelMapping {
#[serde(rename = "InputChannelLevels")]
pub input_channel_levels: Vec<InputChannelLevel>,
#[serde(rename = "OutputChannel")]
pub output_channel: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AudioCodecSettings {
#[serde(rename = "AacSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aac_settings: Option<AacSettings>,
#[serde(rename = "Ac3Settings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ac_3_settings: Option<Ac3Settings>,
#[serde(rename = "Eac3Settings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub eac_3_settings: Option<Eac3Settings>,
#[serde(rename = "Mp2Settings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mp_2_settings: Option<Mp2Settings>,
#[serde(rename = "PassThroughSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pass_through_settings: Option<PassThroughSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AudioDescription {
#[serde(rename = "AudioNormalizationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_normalization_settings: Option<AudioNormalizationSettings>,
#[serde(rename = "AudioSelectorName")]
pub audio_selector_name: String,
#[serde(rename = "AudioType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_type: Option<String>,
#[serde(rename = "AudioTypeControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_type_control: Option<String>,
#[serde(rename = "CodecSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub codec_settings: Option<AudioCodecSettings>,
#[serde(rename = "LanguageCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub language_code: Option<String>,
#[serde(rename = "LanguageCodeControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub language_code_control: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RemixSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remix_settings: Option<RemixSettings>,
#[serde(rename = "StreamName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AudioLanguageSelection {
#[serde(rename = "LanguageCode")]
pub language_code: String,
#[serde(rename = "LanguageSelectionPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub language_selection_policy: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AudioNormalizationSettings {
#[serde(rename = "Algorithm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub algorithm: Option<String>,
#[serde(rename = "AlgorithmControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub algorithm_control: Option<String>,
#[serde(rename = "TargetLkfs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_lkfs: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AudioOnlyHlsSettings {
#[serde(rename = "AudioGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_group_id: Option<String>,
#[serde(rename = "AudioOnlyImage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_only_image: Option<InputLocation>,
#[serde(rename = "AudioTrackType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_track_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AudioPidSelection {
#[serde(rename = "Pid")]
pub pid: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AudioSelector {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SelectorSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selector_settings: Option<AudioSelectorSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AudioSelectorSettings {
#[serde(rename = "AudioLanguageSelection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_language_selection: Option<AudioLanguageSelection>,
#[serde(rename = "AudioPidSelection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_pid_selection: Option<AudioPidSelection>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AvailBlanking {
#[serde(rename = "AvailBlankingImage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub avail_blanking_image: Option<InputLocation>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AvailConfiguration {
#[serde(rename = "AvailSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub avail_settings: Option<AvailSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AvailSettings {
#[serde(rename = "Scte35SpliceInsert")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_35_splice_insert: Option<Scte35SpliceInsert>,
#[serde(rename = "Scte35TimeSignalApos")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_35_time_signal_apos: Option<Scte35TimeSignalApos>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchScheduleActionCreateRequest {
#[serde(rename = "ScheduleActions")]
pub schedule_actions: Vec<ScheduleAction>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchScheduleActionCreateResult {
#[serde(rename = "ScheduleActions")]
pub schedule_actions: Vec<ScheduleAction>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchScheduleActionDeleteRequest {
#[serde(rename = "ActionNames")]
pub action_names: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchScheduleActionDeleteResult {
#[serde(rename = "ScheduleActions")]
pub schedule_actions: Vec<ScheduleAction>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchUpdateScheduleRequest {
#[serde(rename = "ChannelId")]
pub channel_id: String,
#[serde(rename = "Creates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creates: Option<BatchScheduleActionCreateRequest>,
#[serde(rename = "Deletes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletes: Option<BatchScheduleActionDeleteRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchUpdateScheduleResponse {
#[serde(rename = "Creates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creates: Option<BatchScheduleActionCreateResult>,
#[serde(rename = "Deletes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletes: Option<BatchScheduleActionDeleteResult>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BatchUpdateScheduleResult {
pub creates: Option<BatchScheduleActionCreateResult>,
pub deletes: Option<BatchScheduleActionDeleteResult>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BlackoutSlate {
#[serde(rename = "BlackoutSlateImage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub blackout_slate_image: Option<InputLocation>,
#[serde(rename = "NetworkEndBlackout")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_end_blackout: Option<String>,
#[serde(rename = "NetworkEndBlackoutImage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_end_blackout_image: Option<InputLocation>,
#[serde(rename = "NetworkId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_id: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BurnInDestinationSettings {
#[serde(rename = "Alignment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alignment: Option<String>,
#[serde(rename = "BackgroundColor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub background_color: Option<String>,
#[serde(rename = "BackgroundOpacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub background_opacity: Option<i64>,
#[serde(rename = "Font")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font: Option<InputLocation>,
#[serde(rename = "FontColor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font_color: Option<String>,
#[serde(rename = "FontOpacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font_opacity: Option<i64>,
#[serde(rename = "FontResolution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font_resolution: Option<i64>,
#[serde(rename = "FontSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font_size: Option<String>,
#[serde(rename = "OutlineColor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outline_color: Option<String>,
#[serde(rename = "OutlineSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outline_size: Option<i64>,
#[serde(rename = "ShadowColor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shadow_color: Option<String>,
#[serde(rename = "ShadowOpacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shadow_opacity: Option<i64>,
#[serde(rename = "ShadowXOffset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shadow_x_offset: Option<i64>,
#[serde(rename = "ShadowYOffset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shadow_y_offset: Option<i64>,
#[serde(rename = "TeletextGridControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub teletext_grid_control: Option<String>,
#[serde(rename = "XPosition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub x_position: Option<i64>,
#[serde(rename = "YPosition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub y_position: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CaptionDescription {
#[serde(rename = "CaptionSelectorName")]
pub caption_selector_name: String,
#[serde(rename = "DestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_settings: Option<CaptionDestinationSettings>,
#[serde(rename = "LanguageCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub language_code: Option<String>,
#[serde(rename = "LanguageDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub language_description: Option<String>,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CaptionDestinationSettings {
#[serde(rename = "AribDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arib_destination_settings: Option<AribDestinationSettings>,
#[serde(rename = "BurnInDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub burn_in_destination_settings: Option<BurnInDestinationSettings>,
#[serde(rename = "DvbSubDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dvb_sub_destination_settings: Option<DvbSubDestinationSettings>,
#[serde(rename = "EmbeddedDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub embedded_destination_settings: Option<EmbeddedDestinationSettings>,
#[serde(rename = "EmbeddedPlusScte20DestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub embedded_plus_scte_20_destination_settings: Option<EmbeddedPlusScte20DestinationSettings>,
#[serde(rename = "RtmpCaptionInfoDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rtmp_caption_info_destination_settings: Option<RtmpCaptionInfoDestinationSettings>,
#[serde(rename = "Scte20PlusEmbeddedDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_20_plus_embedded_destination_settings: Option<Scte20PlusEmbeddedDestinationSettings>,
#[serde(rename = "Scte27DestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_27_destination_settings: Option<Scte27DestinationSettings>,
#[serde(rename = "SmpteTtDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub smpte_tt_destination_settings: Option<SmpteTtDestinationSettings>,
#[serde(rename = "TeletextDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub teletext_destination_settings: Option<TeletextDestinationSettings>,
#[serde(rename = "TtmlDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ttml_destination_settings: Option<TtmlDestinationSettings>,
#[serde(rename = "WebvttDestinationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub webvtt_destination_settings: Option<WebvttDestinationSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CaptionLanguageMapping {
#[serde(rename = "CaptionChannel")]
pub caption_channel: i64,
#[serde(rename = "LanguageCode")]
pub language_code: String,
#[serde(rename = "LanguageDescription")]
pub language_description: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CaptionSelector {
#[serde(rename = "LanguageCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub language_code: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SelectorSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selector_settings: Option<CaptionSelectorSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CaptionSelectorSettings {
#[serde(rename = "AribSourceSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arib_source_settings: Option<AribSourceSettings>,
#[serde(rename = "DvbSubSourceSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dvb_sub_source_settings: Option<DvbSubSourceSettings>,
#[serde(rename = "EmbeddedSourceSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub embedded_source_settings: Option<EmbeddedSourceSettings>,
#[serde(rename = "Scte20SourceSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_20_source_settings: Option<Scte20SourceSettings>,
#[serde(rename = "Scte27SourceSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_27_source_settings: Option<Scte27SourceSettings>,
#[serde(rename = "TeletextSourceSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub teletext_source_settings: Option<TeletextSourceSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Channel {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<OutputDestination>>,
#[serde(rename = "EgressEndpoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub egress_endpoints: Option<Vec<ChannelEgressEndpoint>>,
#[serde(rename = "EncoderSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoder_settings: Option<EncoderSettings>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "InputAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_attachments: Option<Vec<InputAttachment>>,
#[serde(rename = "InputSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_specification: Option<InputSpecification>,
#[serde(rename = "LogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "PipelinesRunningCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipelines_running_count: Option<i64>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ChannelConfigurationValidationError {
pub message: Option<String>,
pub validation_errors: Option<Vec<ValidationError>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ChannelEgressEndpoint {
#[serde(rename = "SourceIp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_ip: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ChannelSummary {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<OutputDestination>>,
#[serde(rename = "EgressEndpoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub egress_endpoints: Option<Vec<ChannelEgressEndpoint>>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "InputAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_attachments: Option<Vec<InputAttachment>>,
#[serde(rename = "InputSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_specification: Option<InputSpecification>,
#[serde(rename = "LogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "PipelinesRunningCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipelines_running_count: Option<i64>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateChannel {
pub destinations: Option<Vec<OutputDestination>>,
pub encoder_settings: Option<EncoderSettings>,
pub input_attachments: Option<Vec<InputAttachment>>,
pub input_specification: Option<InputSpecification>,
pub log_level: Option<String>,
pub name: Option<String>,
pub request_id: Option<String>,
pub role_arn: Option<String>,
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateChannelRequest {
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<OutputDestination>>,
#[serde(rename = "EncoderSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoder_settings: Option<EncoderSettings>,
#[serde(rename = "InputAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_attachments: Option<Vec<InputAttachment>>,
#[serde(rename = "InputSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_specification: Option<InputSpecification>,
#[serde(rename = "LogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RequestId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_id: Option<String>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateChannelResponse {
#[serde(rename = "Channel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel: Option<Channel>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateChannelResultModel {
pub channel: Option<Channel>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateInput {
pub destinations: Option<Vec<InputDestinationRequest>>,
pub input_security_groups: Option<Vec<String>>,
pub media_connect_flows: Option<Vec<MediaConnectFlowRequest>>,
pub name: Option<String>,
pub request_id: Option<String>,
pub role_arn: Option<String>,
pub sources: Option<Vec<InputSourceRequest>>,
pub tags: Option<::std::collections::HashMap<String, String>>,
pub type_: Option<String>,
pub vpc: Option<InputVpcRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateInputRequest {
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<InputDestinationRequest>>,
#[serde(rename = "InputSecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_security_groups: Option<Vec<String>>,
#[serde(rename = "MediaConnectFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub media_connect_flows: Option<Vec<MediaConnectFlowRequest>>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RequestId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_id: Option<String>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "Sources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<InputSourceRequest>>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "Vpc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc: Option<InputVpcRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateInputResponse {
#[serde(rename = "Input")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input: Option<Input>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateInputResultModel {
pub input: Option<Input>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateInputSecurityGroupRequest {
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "WhitelistRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub whitelist_rules: Option<Vec<InputWhitelistRuleCidr>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateInputSecurityGroupResponse {
#[serde(rename = "SecurityGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group: Option<InputSecurityGroup>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateInputSecurityGroupResultModel {
pub security_group: Option<InputSecurityGroup>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateTagsRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteChannelRequest {
#[serde(rename = "ChannelId")]
pub channel_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteChannelResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<OutputDestination>>,
#[serde(rename = "EgressEndpoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub egress_endpoints: Option<Vec<ChannelEgressEndpoint>>,
#[serde(rename = "EncoderSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoder_settings: Option<EncoderSettings>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "InputAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_attachments: Option<Vec<InputAttachment>>,
#[serde(rename = "InputSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_specification: Option<InputSpecification>,
#[serde(rename = "LogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "PipelinesRunningCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipelines_running_count: Option<i64>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteInputRequest {
#[serde(rename = "InputId")]
pub input_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteInputResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteInputSecurityGroupRequest {
#[serde(rename = "InputSecurityGroupId")]
pub input_security_group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteInputSecurityGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteReservationRequest {
#[serde(rename = "ReservationId")]
pub reservation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteReservationResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Count")]
#[serde(skip_serializing_if = "Option::is_none")]
pub count: Option<i64>,
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option<String>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "DurationUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_units: Option<String>,
#[serde(rename = "End")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end: Option<String>,
#[serde(rename = "FixedPrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fixed_price: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OfferingDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_description: Option<String>,
#[serde(rename = "OfferingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_id: Option<String>,
#[serde(rename = "OfferingType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_type: Option<String>,
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "ReservationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservation_id: Option<String>,
#[serde(rename = "ResourceSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_specification: Option<ReservationResourceSpecification>,
#[serde(rename = "Start")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "UsagePrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub usage_price: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteTagsRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeChannelRequest {
#[serde(rename = "ChannelId")]
pub channel_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeChannelResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<OutputDestination>>,
#[serde(rename = "EgressEndpoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub egress_endpoints: Option<Vec<ChannelEgressEndpoint>>,
#[serde(rename = "EncoderSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoder_settings: Option<EncoderSettings>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "InputAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_attachments: Option<Vec<InputAttachment>>,
#[serde(rename = "InputSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_specification: Option<InputSpecification>,
#[serde(rename = "LogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "PipelinesRunningCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipelines_running_count: Option<i64>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInputRequest {
#[serde(rename = "InputId")]
pub input_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeInputResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "AttachedChannels")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attached_channels: Option<Vec<String>>,
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<InputDestination>>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "MediaConnectFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub media_connect_flows: Option<Vec<MediaConnectFlow>>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "SecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_groups: Option<Vec<String>>,
#[serde(rename = "Sources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<InputSource>>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInputSecurityGroupRequest {
#[serde(rename = "InputSecurityGroupId")]
pub input_security_group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeInputSecurityGroupResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Inputs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inputs: Option<Vec<String>>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "WhitelistRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub whitelist_rules: Option<Vec<InputWhitelistRule>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeOfferingRequest {
#[serde(rename = "OfferingId")]
pub offering_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeOfferingResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option<String>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "DurationUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_units: Option<String>,
#[serde(rename = "FixedPrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fixed_price: Option<f64>,
#[serde(rename = "OfferingDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_description: Option<String>,
#[serde(rename = "OfferingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_id: Option<String>,
#[serde(rename = "OfferingType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_type: Option<String>,
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "ResourceSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_specification: Option<ReservationResourceSpecification>,
#[serde(rename = "UsagePrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub usage_price: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeReservationRequest {
#[serde(rename = "ReservationId")]
pub reservation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeReservationResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Count")]
#[serde(skip_serializing_if = "Option::is_none")]
pub count: Option<i64>,
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option<String>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "DurationUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_units: Option<String>,
#[serde(rename = "End")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end: Option<String>,
#[serde(rename = "FixedPrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fixed_price: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OfferingDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_description: Option<String>,
#[serde(rename = "OfferingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_id: Option<String>,
#[serde(rename = "OfferingType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_type: Option<String>,
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "ReservationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservation_id: Option<String>,
#[serde(rename = "ResourceSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_specification: Option<ReservationResourceSpecification>,
#[serde(rename = "Start")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "UsagePrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub usage_price: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeScheduleRequest {
#[serde(rename = "ChannelId")]
pub channel_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeScheduleResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ScheduleActions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_actions: Option<Vec<ScheduleAction>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DvbNitSettings {
#[serde(rename = "NetworkId")]
pub network_id: i64,
#[serde(rename = "NetworkName")]
pub network_name: String,
#[serde(rename = "RepInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rep_interval: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DvbSdtSettings {
#[serde(rename = "OutputSdt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_sdt: Option<String>,
#[serde(rename = "RepInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rep_interval: Option<i64>,
#[serde(rename = "ServiceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_name: Option<String>,
#[serde(rename = "ServiceProviderName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_provider_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DvbSubDestinationSettings {
#[serde(rename = "Alignment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alignment: Option<String>,
#[serde(rename = "BackgroundColor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub background_color: Option<String>,
#[serde(rename = "BackgroundOpacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub background_opacity: Option<i64>,
#[serde(rename = "Font")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font: Option<InputLocation>,
#[serde(rename = "FontColor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font_color: Option<String>,
#[serde(rename = "FontOpacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font_opacity: Option<i64>,
#[serde(rename = "FontResolution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font_resolution: Option<i64>,
#[serde(rename = "FontSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub font_size: Option<String>,
#[serde(rename = "OutlineColor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outline_color: Option<String>,
#[serde(rename = "OutlineSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outline_size: Option<i64>,
#[serde(rename = "ShadowColor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shadow_color: Option<String>,
#[serde(rename = "ShadowOpacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shadow_opacity: Option<i64>,
#[serde(rename = "ShadowXOffset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shadow_x_offset: Option<i64>,
#[serde(rename = "ShadowYOffset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shadow_y_offset: Option<i64>,
#[serde(rename = "TeletextGridControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub teletext_grid_control: Option<String>,
#[serde(rename = "XPosition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub x_position: Option<i64>,
#[serde(rename = "YPosition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub y_position: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DvbSubSourceSettings {
#[serde(rename = "Pid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pid: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DvbTdtSettings {
#[serde(rename = "RepInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rep_interval: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Eac3Settings {
#[serde(rename = "AttenuationControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attenuation_control: Option<String>,
#[serde(rename = "Bitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bitrate: Option<f64>,
#[serde(rename = "BitstreamMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bitstream_mode: Option<String>,
#[serde(rename = "CodingMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coding_mode: Option<String>,
#[serde(rename = "DcFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dc_filter: Option<String>,
#[serde(rename = "Dialnorm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dialnorm: Option<i64>,
#[serde(rename = "DrcLine")]
#[serde(skip_serializing_if = "Option::is_none")]
pub drc_line: Option<String>,
#[serde(rename = "DrcRf")]
#[serde(skip_serializing_if = "Option::is_none")]
pub drc_rf: Option<String>,
#[serde(rename = "LfeControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lfe_control: Option<String>,
#[serde(rename = "LfeFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lfe_filter: Option<String>,
#[serde(rename = "LoRoCenterMixLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lo_ro_center_mix_level: Option<f64>,
#[serde(rename = "LoRoSurroundMixLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lo_ro_surround_mix_level: Option<f64>,
#[serde(rename = "LtRtCenterMixLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lt_rt_center_mix_level: Option<f64>,
#[serde(rename = "LtRtSurroundMixLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lt_rt_surround_mix_level: Option<f64>,
#[serde(rename = "MetadataControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata_control: Option<String>,
#[serde(rename = "PassthroughControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub passthrough_control: Option<String>,
#[serde(rename = "PhaseControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phase_control: Option<String>,
#[serde(rename = "StereoDownmix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stereo_downmix: Option<String>,
#[serde(rename = "SurroundExMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub surround_ex_mode: Option<String>,
#[serde(rename = "SurroundMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub surround_mode: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EmbeddedDestinationSettings {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EmbeddedPlusScte20DestinationSettings {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EmbeddedSourceSettings {
#[serde(rename = "Convert608To708")]
#[serde(skip_serializing_if = "Option::is_none")]
pub convert_608_to_708: Option<String>,
#[serde(rename = "Scte20Detection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_20_detection: Option<String>,
#[serde(rename = "Source608ChannelNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_608_channel_number: Option<i64>,
#[serde(rename = "Source608TrackNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_608_track_number: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Empty {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EncoderSettings {
#[serde(rename = "AudioDescriptions")]
pub audio_descriptions: Vec<AudioDescription>,
#[serde(rename = "AvailBlanking")]
#[serde(skip_serializing_if = "Option::is_none")]
pub avail_blanking: Option<AvailBlanking>,
#[serde(rename = "AvailConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub avail_configuration: Option<AvailConfiguration>,
#[serde(rename = "BlackoutSlate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub blackout_slate: Option<BlackoutSlate>,
#[serde(rename = "CaptionDescriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub caption_descriptions: Option<Vec<CaptionDescription>>,
#[serde(rename = "GlobalConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub global_configuration: Option<GlobalConfiguration>,
#[serde(rename = "OutputGroups")]
pub output_groups: Vec<OutputGroup>,
#[serde(rename = "TimecodeConfig")]
pub timecode_config: TimecodeConfig,
#[serde(rename = "VideoDescriptions")]
pub video_descriptions: Vec<VideoDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FecOutputSettings {
#[serde(rename = "ColumnDepth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub column_depth: Option<i64>,
#[serde(rename = "IncludeFec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub include_fec: Option<String>,
#[serde(rename = "RowLength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub row_length: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FixedModeScheduleActionStartSettings {
#[serde(rename = "Time")]
pub time: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FollowModeScheduleActionStartSettings {
#[serde(rename = "FollowPoint")]
pub follow_point: String,
#[serde(rename = "ReferenceActionName")]
pub reference_action_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameCaptureGroupSettings {
#[serde(rename = "Destination")]
pub destination: OutputLocationRef,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameCaptureOutputSettings {
#[serde(rename = "NameModifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name_modifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameCaptureSettings {
#[serde(rename = "CaptureInterval")]
pub capture_interval: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GlobalConfiguration {
#[serde(rename = "InitialAudioGain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initial_audio_gain: Option<i64>,
#[serde(rename = "InputEndAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_end_action: Option<String>,
#[serde(rename = "InputLossBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_loss_behavior: Option<InputLossBehavior>,
#[serde(rename = "OutputTimingSource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_timing_source: Option<String>,
#[serde(rename = "SupportLowFramerateInputs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub support_low_framerate_inputs: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct H264Settings {
#[serde(rename = "AdaptiveQuantization")]
#[serde(skip_serializing_if = "Option::is_none")]
pub adaptive_quantization: Option<String>,
#[serde(rename = "AfdSignaling")]
#[serde(skip_serializing_if = "Option::is_none")]
pub afd_signaling: Option<String>,
#[serde(rename = "Bitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bitrate: Option<i64>,
#[serde(rename = "BufFillPct")]
#[serde(skip_serializing_if = "Option::is_none")]
pub buf_fill_pct: Option<i64>,
#[serde(rename = "BufSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub buf_size: Option<i64>,
#[serde(rename = "ColorMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub color_metadata: Option<String>,
#[serde(rename = "EntropyEncoding")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entropy_encoding: Option<String>,
#[serde(rename = "FixedAfd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fixed_afd: Option<String>,
#[serde(rename = "FlickerAq")]
#[serde(skip_serializing_if = "Option::is_none")]
pub flicker_aq: Option<String>,
#[serde(rename = "FramerateControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub framerate_control: Option<String>,
#[serde(rename = "FramerateDenominator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub framerate_denominator: Option<i64>,
#[serde(rename = "FramerateNumerator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub framerate_numerator: Option<i64>,
#[serde(rename = "GopBReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gop_b_reference: Option<String>,
#[serde(rename = "GopClosedCadence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gop_closed_cadence: Option<i64>,
#[serde(rename = "GopNumBFrames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gop_num_b_frames: Option<i64>,
#[serde(rename = "GopSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gop_size: Option<f64>,
#[serde(rename = "GopSizeUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gop_size_units: Option<String>,
#[serde(rename = "Level")]
#[serde(skip_serializing_if = "Option::is_none")]
pub level: Option<String>,
#[serde(rename = "LookAheadRateControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub look_ahead_rate_control: Option<String>,
#[serde(rename = "MaxBitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_bitrate: Option<i64>,
#[serde(rename = "MinIInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub min_i_interval: Option<i64>,
#[serde(rename = "NumRefFrames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub num_ref_frames: Option<i64>,
#[serde(rename = "ParControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub par_control: Option<String>,
#[serde(rename = "ParDenominator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub par_denominator: Option<i64>,
#[serde(rename = "ParNumerator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub par_numerator: Option<i64>,
#[serde(rename = "Profile")]
#[serde(skip_serializing_if = "Option::is_none")]
pub profile: Option<String>,
#[serde(rename = "QvbrQualityLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub qvbr_quality_level: Option<i64>,
#[serde(rename = "RateControlMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rate_control_mode: Option<String>,
#[serde(rename = "ScanType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scan_type: Option<String>,
#[serde(rename = "SceneChangeDetect")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scene_change_detect: Option<String>,
#[serde(rename = "Slices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub slices: Option<i64>,
#[serde(rename = "Softness")]
#[serde(skip_serializing_if = "Option::is_none")]
pub softness: Option<i64>,
#[serde(rename = "SpatialAq")]
#[serde(skip_serializing_if = "Option::is_none")]
pub spatial_aq: Option<String>,
#[serde(rename = "SubgopLength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subgop_length: Option<String>,
#[serde(rename = "Syntax")]
#[serde(skip_serializing_if = "Option::is_none")]
pub syntax: Option<String>,
#[serde(rename = "TemporalAq")]
#[serde(skip_serializing_if = "Option::is_none")]
pub temporal_aq: Option<String>,
#[serde(rename = "TimecodeInsertion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timecode_insertion: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsAkamaiSettings {
#[serde(rename = "ConnectionRetryInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_retry_interval: Option<i64>,
#[serde(rename = "FilecacheDuration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filecache_duration: Option<i64>,
#[serde(rename = "HttpTransferMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_transfer_mode: Option<String>,
#[serde(rename = "NumRetries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub num_retries: Option<i64>,
#[serde(rename = "RestartDelay")]
#[serde(skip_serializing_if = "Option::is_none")]
pub restart_delay: Option<i64>,
#[serde(rename = "Salt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub salt: Option<String>,
#[serde(rename = "Token")]
#[serde(skip_serializing_if = "Option::is_none")]
pub token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsBasicPutSettings {
#[serde(rename = "ConnectionRetryInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_retry_interval: Option<i64>,
#[serde(rename = "FilecacheDuration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filecache_duration: Option<i64>,
#[serde(rename = "NumRetries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub num_retries: Option<i64>,
#[serde(rename = "RestartDelay")]
#[serde(skip_serializing_if = "Option::is_none")]
pub restart_delay: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsCdnSettings {
#[serde(rename = "HlsAkamaiSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hls_akamai_settings: Option<HlsAkamaiSettings>,
#[serde(rename = "HlsBasicPutSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hls_basic_put_settings: Option<HlsBasicPutSettings>,
#[serde(rename = "HlsMediaStoreSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hls_media_store_settings: Option<HlsMediaStoreSettings>,
#[serde(rename = "HlsWebdavSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hls_webdav_settings: Option<HlsWebdavSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsGroupSettings {
#[serde(rename = "AdMarkers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ad_markers: Option<Vec<String>>,
#[serde(rename = "BaseUrlContent")]
#[serde(skip_serializing_if = "Option::is_none")]
pub base_url_content: Option<String>,
#[serde(rename = "BaseUrlManifest")]
#[serde(skip_serializing_if = "Option::is_none")]
pub base_url_manifest: Option<String>,
#[serde(rename = "CaptionLanguageMappings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub caption_language_mappings: Option<Vec<CaptionLanguageMapping>>,
#[serde(rename = "CaptionLanguageSetting")]
#[serde(skip_serializing_if = "Option::is_none")]
pub caption_language_setting: Option<String>,
#[serde(rename = "ClientCache")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_cache: Option<String>,
#[serde(rename = "CodecSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub codec_specification: Option<String>,
#[serde(rename = "ConstantIv")]
#[serde(skip_serializing_if = "Option::is_none")]
pub constant_iv: Option<String>,
#[serde(rename = "Destination")]
pub destination: OutputLocationRef,
#[serde(rename = "DirectoryStructure")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_structure: Option<String>,
#[serde(rename = "EncryptionType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_type: Option<String>,
#[serde(rename = "HlsCdnSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hls_cdn_settings: Option<HlsCdnSettings>,
#[serde(rename = "IFrameOnlyPlaylists")]
#[serde(skip_serializing_if = "Option::is_none")]
pub i_frame_only_playlists: Option<String>,
#[serde(rename = "IndexNSegments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_n_segments: Option<i64>,
#[serde(rename = "InputLossAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_loss_action: Option<String>,
#[serde(rename = "IvInManifest")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iv_in_manifest: Option<String>,
#[serde(rename = "IvSource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iv_source: Option<String>,
#[serde(rename = "KeepSegments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub keep_segments: Option<i64>,
#[serde(rename = "KeyFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_format: Option<String>,
#[serde(rename = "KeyFormatVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_format_versions: Option<String>,
#[serde(rename = "KeyProviderSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_provider_settings: Option<KeyProviderSettings>,
#[serde(rename = "ManifestCompression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub manifest_compression: Option<String>,
#[serde(rename = "ManifestDurationFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub manifest_duration_format: Option<String>,
#[serde(rename = "MinSegmentLength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub min_segment_length: Option<i64>,
#[serde(rename = "Mode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
#[serde(rename = "OutputSelection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_selection: Option<String>,
#[serde(rename = "ProgramDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub program_date_time: Option<String>,
#[serde(rename = "ProgramDateTimePeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub program_date_time_period: Option<i64>,
#[serde(rename = "RedundantManifest")]
#[serde(skip_serializing_if = "Option::is_none")]
pub redundant_manifest: Option<String>,
#[serde(rename = "SegmentLength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segment_length: Option<i64>,
#[serde(rename = "SegmentationMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segmentation_mode: Option<String>,
#[serde(rename = "SegmentsPerSubdirectory")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segments_per_subdirectory: Option<i64>,
#[serde(rename = "StreamInfResolution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_inf_resolution: Option<String>,
#[serde(rename = "TimedMetadataId3Frame")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timed_metadata_id_3_frame: Option<String>,
#[serde(rename = "TimedMetadataId3Period")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timed_metadata_id_3_period: Option<i64>,
#[serde(rename = "TimestampDeltaMilliseconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp_delta_milliseconds: Option<i64>,
#[serde(rename = "TsFileMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ts_file_mode: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsInputSettings {
#[serde(rename = "Bandwidth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bandwidth: Option<i64>,
#[serde(rename = "BufferSegments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub buffer_segments: Option<i64>,
#[serde(rename = "Retries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retries: Option<i64>,
#[serde(rename = "RetryInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retry_interval: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsMediaStoreSettings {
#[serde(rename = "ConnectionRetryInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_retry_interval: Option<i64>,
#[serde(rename = "FilecacheDuration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filecache_duration: Option<i64>,
#[serde(rename = "MediaStoreStorageClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub media_store_storage_class: Option<String>,
#[serde(rename = "NumRetries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub num_retries: Option<i64>,
#[serde(rename = "RestartDelay")]
#[serde(skip_serializing_if = "Option::is_none")]
pub restart_delay: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsOutputSettings {
#[serde(rename = "HlsSettings")]
pub hls_settings: HlsSettings,
#[serde(rename = "NameModifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name_modifier: Option<String>,
#[serde(rename = "SegmentModifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segment_modifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsSettings {
#[serde(rename = "AudioOnlyHlsSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_only_hls_settings: Option<AudioOnlyHlsSettings>,
#[serde(rename = "StandardHlsSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_hls_settings: Option<StandardHlsSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsTimedMetadataScheduleActionSettings {
#[serde(rename = "Id3")]
pub id_3: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HlsWebdavSettings {
#[serde(rename = "ConnectionRetryInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_retry_interval: Option<i64>,
#[serde(rename = "FilecacheDuration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filecache_duration: Option<i64>,
#[serde(rename = "HttpTransferMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_transfer_mode: Option<String>,
#[serde(rename = "NumRetries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub num_retries: Option<i64>,
#[serde(rename = "RestartDelay")]
#[serde(skip_serializing_if = "Option::is_none")]
pub restart_delay: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Input {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "AttachedChannels")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attached_channels: Option<Vec<String>>,
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<InputDestination>>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "MediaConnectFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub media_connect_flows: Option<Vec<MediaConnectFlow>>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "SecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_groups: Option<Vec<String>>,
#[serde(rename = "Sources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<InputSource>>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InputAttachment {
#[serde(rename = "InputAttachmentName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_attachment_name: Option<String>,
#[serde(rename = "InputId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_id: Option<String>,
#[serde(rename = "InputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_settings: Option<InputSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InputChannelLevel {
#[serde(rename = "Gain")]
pub gain: i64,
#[serde(rename = "InputChannel")]
pub input_channel: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InputDestination {
#[serde(rename = "Ip")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip: Option<String>,
#[serde(rename = "Port")]
#[serde(skip_serializing_if = "Option::is_none")]
pub port: Option<String>,
#[serde(rename = "Url")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(rename = "Vpc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc: Option<InputDestinationVpc>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InputDestinationRequest {
#[serde(rename = "StreamName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InputDestinationVpc {
#[serde(rename = "AvailabilityZone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone: Option<String>,
#[serde(rename = "NetworkInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InputLocation {
#[serde(rename = "PasswordParam")]
#[serde(skip_serializing_if = "Option::is_none")]
pub password_param: Option<String>,
#[serde(rename = "Uri")]
pub uri: String,
#[serde(rename = "Username")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InputLossBehavior {
#[serde(rename = "BlackFrameMsec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub black_frame_msec: Option<i64>,
#[serde(rename = "InputLossImageColor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_loss_image_color: Option<String>,
#[serde(rename = "InputLossImageSlate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_loss_image_slate: Option<InputLocation>,
#[serde(rename = "InputLossImageType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_loss_image_type: Option<String>,
#[serde(rename = "RepeatFrameMsec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repeat_frame_msec: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InputSecurityGroup {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Inputs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inputs: Option<Vec<String>>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "WhitelistRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub whitelist_rules: Option<Vec<InputWhitelistRule>>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct InputSecurityGroupWhitelistRequest {
pub tags: Option<::std::collections::HashMap<String, String>>,
pub whitelist_rules: Option<Vec<InputWhitelistRuleCidr>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InputSettings {
#[serde(rename = "AudioSelectors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_selectors: Option<Vec<AudioSelector>>,
#[serde(rename = "CaptionSelectors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub caption_selectors: Option<Vec<CaptionSelector>>,
#[serde(rename = "DeblockFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deblock_filter: Option<String>,
#[serde(rename = "DenoiseFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub denoise_filter: Option<String>,
#[serde(rename = "FilterStrength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_strength: Option<i64>,
#[serde(rename = "InputFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_filter: Option<String>,
#[serde(rename = "NetworkInputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_input_settings: Option<NetworkInputSettings>,
#[serde(rename = "SourceEndBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_end_behavior: Option<String>,
#[serde(rename = "VideoSelector")]
#[serde(skip_serializing_if = "Option::is_none")]
pub video_selector: Option<VideoSelector>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InputSource {
#[serde(rename = "PasswordParam")]
#[serde(skip_serializing_if = "Option::is_none")]
pub password_param: Option<String>,
#[serde(rename = "Url")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(rename = "Username")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InputSourceRequest {
#[serde(rename = "PasswordParam")]
#[serde(skip_serializing_if = "Option::is_none")]
pub password_param: Option<String>,
#[serde(rename = "Url")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(rename = "Username")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InputSpecification {
#[serde(rename = "Codec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub codec: Option<String>,
#[serde(rename = "MaximumBitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_bitrate: Option<String>,
#[serde(rename = "Resolution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resolution: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InputSwitchScheduleActionSettings {
#[serde(rename = "InputAttachmentNameReference")]
pub input_attachment_name_reference: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InputVpcRequest {
#[serde(rename = "SecurityGroupIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_ids: Option<Vec<String>>,
#[serde(rename = "SubnetIds")]
pub subnet_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InputWhitelistRule {
#[serde(rename = "Cidr")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InputWhitelistRuleCidr {
#[serde(rename = "Cidr")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct InternalServiceError {
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct InvalidRequest {
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct KeyProviderSettings {
#[serde(rename = "StaticKeySettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub static_key_settings: Option<StaticKeySettings>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LimitExceeded {
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListChannelsRequest {
#[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 ListChannelsResponse {
#[serde(rename = "Channels")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channels: Option<Vec<ChannelSummary>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListChannelsResultModel {
pub channels: Option<Vec<ChannelSummary>>,
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListInputSecurityGroupsRequest {
#[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 ListInputSecurityGroupsResponse {
#[serde(rename = "InputSecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_security_groups: Option<Vec<InputSecurityGroup>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListInputSecurityGroupsResultModel {
pub input_security_groups: Option<Vec<InputSecurityGroup>>,
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListInputsRequest {
#[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 ListInputsResponse {
#[serde(rename = "Inputs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inputs: Option<Vec<Input>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListInputsResultModel {
pub inputs: Option<Vec<Input>>,
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListOfferingsRequest {
#[serde(rename = "ChannelConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_configuration: Option<String>,
#[serde(rename = "Codec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub codec: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "MaximumBitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_bitrate: Option<String>,
#[serde(rename = "MaximumFramerate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_framerate: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Resolution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resolution: Option<String>,
#[serde(rename = "ResourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
#[serde(rename = "SpecialFeature")]
#[serde(skip_serializing_if = "Option::is_none")]
pub special_feature: Option<String>,
#[serde(rename = "VideoQuality")]
#[serde(skip_serializing_if = "Option::is_none")]
pub video_quality: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListOfferingsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Offerings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offerings: Option<Vec<Offering>>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListOfferingsResultModel {
pub next_token: Option<String>,
pub offerings: Option<Vec<Offering>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListReservationsRequest {
#[serde(rename = "Codec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub codec: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "MaximumBitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_bitrate: Option<String>,
#[serde(rename = "MaximumFramerate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_framerate: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Resolution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resolution: Option<String>,
#[serde(rename = "ResourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
#[serde(rename = "SpecialFeature")]
#[serde(skip_serializing_if = "Option::is_none")]
pub special_feature: Option<String>,
#[serde(rename = "VideoQuality")]
#[serde(skip_serializing_if = "Option::is_none")]
pub video_quality: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListReservationsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Reservations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservations: Option<Vec<Reservation>>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListReservationsResultModel {
pub next_token: Option<String>,
pub reservations: Option<Vec<Reservation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceResponse {
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct M2tsSettings {
#[serde(rename = "AbsentInputAudioBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub absent_input_audio_behavior: Option<String>,
#[serde(rename = "Arib")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arib: Option<String>,
#[serde(rename = "AribCaptionsPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arib_captions_pid: Option<String>,
#[serde(rename = "AribCaptionsPidControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arib_captions_pid_control: Option<String>,
#[serde(rename = "AudioBufferModel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_buffer_model: Option<String>,
#[serde(rename = "AudioFramesPerPes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_frames_per_pes: Option<i64>,
#[serde(rename = "AudioPids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_pids: Option<String>,
#[serde(rename = "AudioStreamType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_stream_type: Option<String>,
#[serde(rename = "Bitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bitrate: Option<i64>,
#[serde(rename = "BufferModel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub buffer_model: Option<String>,
#[serde(rename = "CcDescriptor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cc_descriptor: Option<String>,
#[serde(rename = "DvbNitSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dvb_nit_settings: Option<DvbNitSettings>,
#[serde(rename = "DvbSdtSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dvb_sdt_settings: Option<DvbSdtSettings>,
#[serde(rename = "DvbSubPids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dvb_sub_pids: Option<String>,
#[serde(rename = "DvbTdtSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dvb_tdt_settings: Option<DvbTdtSettings>,
#[serde(rename = "DvbTeletextPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dvb_teletext_pid: Option<String>,
#[serde(rename = "Ebif")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ebif: Option<String>,
#[serde(rename = "EbpAudioInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ebp_audio_interval: Option<String>,
#[serde(rename = "EbpLookaheadMs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ebp_lookahead_ms: Option<i64>,
#[serde(rename = "EbpPlacement")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ebp_placement: Option<String>,
#[serde(rename = "EcmPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ecm_pid: Option<String>,
#[serde(rename = "EsRateInPes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub es_rate_in_pes: Option<String>,
#[serde(rename = "EtvPlatformPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub etv_platform_pid: Option<String>,
#[serde(rename = "EtvSignalPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub etv_signal_pid: Option<String>,
#[serde(rename = "FragmentTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fragment_time: Option<f64>,
#[serde(rename = "Klv")]
#[serde(skip_serializing_if = "Option::is_none")]
pub klv: Option<String>,
#[serde(rename = "KlvDataPids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub klv_data_pids: Option<String>,
#[serde(rename = "NullPacketBitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub null_packet_bitrate: Option<f64>,
#[serde(rename = "PatInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pat_interval: Option<i64>,
#[serde(rename = "PcrControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pcr_control: Option<String>,
#[serde(rename = "PcrPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pcr_period: Option<i64>,
#[serde(rename = "PcrPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pcr_pid: Option<String>,
#[serde(rename = "PmtInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pmt_interval: Option<i64>,
#[serde(rename = "PmtPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pmt_pid: Option<String>,
#[serde(rename = "ProgramNum")]
#[serde(skip_serializing_if = "Option::is_none")]
pub program_num: Option<i64>,
#[serde(rename = "RateMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rate_mode: Option<String>,
#[serde(rename = "Scte27Pids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_27_pids: Option<String>,
#[serde(rename = "Scte35Control")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_35_control: Option<String>,
#[serde(rename = "Scte35Pid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_35_pid: Option<String>,
#[serde(rename = "SegmentationMarkers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segmentation_markers: Option<String>,
#[serde(rename = "SegmentationStyle")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segmentation_style: Option<String>,
#[serde(rename = "SegmentationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segmentation_time: Option<f64>,
#[serde(rename = "TimedMetadataBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timed_metadata_behavior: Option<String>,
#[serde(rename = "TimedMetadataPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timed_metadata_pid: Option<String>,
#[serde(rename = "TransportStreamId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transport_stream_id: Option<i64>,
#[serde(rename = "VideoPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub video_pid: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct M3u8Settings {
#[serde(rename = "AudioFramesPerPes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_frames_per_pes: Option<i64>,
#[serde(rename = "AudioPids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_pids: Option<String>,
#[serde(rename = "EcmPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ecm_pid: Option<String>,
#[serde(rename = "PatInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pat_interval: Option<i64>,
#[serde(rename = "PcrControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pcr_control: Option<String>,
#[serde(rename = "PcrPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pcr_period: Option<i64>,
#[serde(rename = "PcrPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pcr_pid: Option<String>,
#[serde(rename = "PmtInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pmt_interval: Option<i64>,
#[serde(rename = "PmtPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pmt_pid: Option<String>,
#[serde(rename = "ProgramNum")]
#[serde(skip_serializing_if = "Option::is_none")]
pub program_num: Option<i64>,
#[serde(rename = "Scte35Behavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_35_behavior: Option<String>,
#[serde(rename = "Scte35Pid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_35_pid: Option<String>,
#[serde(rename = "TimedMetadataBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timed_metadata_behavior: Option<String>,
#[serde(rename = "TimedMetadataPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timed_metadata_pid: Option<String>,
#[serde(rename = "TransportStreamId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transport_stream_id: Option<i64>,
#[serde(rename = "VideoPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub video_pid: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct MediaConnectFlow {
#[serde(rename = "FlowArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub flow_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct MediaConnectFlowRequest {
#[serde(rename = "FlowArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub flow_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Mp2Settings {
#[serde(rename = "Bitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bitrate: Option<f64>,
#[serde(rename = "CodingMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub coding_mode: Option<String>,
#[serde(rename = "SampleRate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sample_rate: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MsSmoothGroupSettings {
#[serde(rename = "AcquisitionPointId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub acquisition_point_id: Option<String>,
#[serde(rename = "AudioOnlyTimecodeControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_only_timecode_control: Option<String>,
#[serde(rename = "CertificateMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_mode: Option<String>,
#[serde(rename = "ConnectionRetryInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_retry_interval: Option<i64>,
#[serde(rename = "Destination")]
pub destination: OutputLocationRef,
#[serde(rename = "EventId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_id: Option<String>,
#[serde(rename = "EventIdMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_id_mode: Option<String>,
#[serde(rename = "EventStopBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_stop_behavior: Option<String>,
#[serde(rename = "FilecacheDuration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filecache_duration: Option<i64>,
#[serde(rename = "FragmentLength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fragment_length: Option<i64>,
#[serde(rename = "InputLossAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_loss_action: Option<String>,
#[serde(rename = "NumRetries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub num_retries: Option<i64>,
#[serde(rename = "RestartDelay")]
#[serde(skip_serializing_if = "Option::is_none")]
pub restart_delay: Option<i64>,
#[serde(rename = "SegmentationMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segmentation_mode: Option<String>,
#[serde(rename = "SendDelayMs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub send_delay_ms: Option<i64>,
#[serde(rename = "SparseTrackType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sparse_track_type: Option<String>,
#[serde(rename = "StreamManifestBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_manifest_behavior: Option<String>,
#[serde(rename = "TimestampOffset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp_offset: Option<String>,
#[serde(rename = "TimestampOffsetMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp_offset_mode: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MsSmoothOutputSettings {
#[serde(rename = "NameModifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name_modifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct NetworkInputSettings {
#[serde(rename = "HlsInputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hls_input_settings: Option<HlsInputSettings>,
#[serde(rename = "ServerValidation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_validation: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Offering {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option<String>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "DurationUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_units: Option<String>,
#[serde(rename = "FixedPrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fixed_price: Option<f64>,
#[serde(rename = "OfferingDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_description: Option<String>,
#[serde(rename = "OfferingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_id: Option<String>,
#[serde(rename = "OfferingType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_type: Option<String>,
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "ResourceSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_specification: Option<ReservationResourceSpecification>,
#[serde(rename = "UsagePrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub usage_price: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Output {
#[serde(rename = "AudioDescriptionNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_description_names: Option<Vec<String>>,
#[serde(rename = "CaptionDescriptionNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub caption_description_names: Option<Vec<String>>,
#[serde(rename = "OutputName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_name: Option<String>,
#[serde(rename = "OutputSettings")]
pub output_settings: OutputSettings,
#[serde(rename = "VideoDescriptionName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub video_description_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OutputDestination {
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Settings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub settings: Option<Vec<OutputDestinationSettings>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OutputDestinationSettings {
#[serde(rename = "PasswordParam")]
#[serde(skip_serializing_if = "Option::is_none")]
pub password_param: Option<String>,
#[serde(rename = "StreamName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_name: Option<String>,
#[serde(rename = "Url")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(rename = "Username")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OutputGroup {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OutputGroupSettings")]
pub output_group_settings: OutputGroupSettings,
#[serde(rename = "Outputs")]
pub outputs: Vec<Output>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OutputGroupSettings {
#[serde(rename = "ArchiveGroupSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub archive_group_settings: Option<ArchiveGroupSettings>,
#[serde(rename = "FrameCaptureGroupSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frame_capture_group_settings: Option<FrameCaptureGroupSettings>,
#[serde(rename = "HlsGroupSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hls_group_settings: Option<HlsGroupSettings>,
#[serde(rename = "MsSmoothGroupSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ms_smooth_group_settings: Option<MsSmoothGroupSettings>,
#[serde(rename = "RtmpGroupSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rtmp_group_settings: Option<RtmpGroupSettings>,
#[serde(rename = "UdpGroupSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub udp_group_settings: Option<UdpGroupSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OutputLocationRef {
#[serde(rename = "DestinationRefId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_ref_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OutputSettings {
#[serde(rename = "ArchiveOutputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub archive_output_settings: Option<ArchiveOutputSettings>,
#[serde(rename = "FrameCaptureOutputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frame_capture_output_settings: Option<FrameCaptureOutputSettings>,
#[serde(rename = "HlsOutputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hls_output_settings: Option<HlsOutputSettings>,
#[serde(rename = "MsSmoothOutputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ms_smooth_output_settings: Option<MsSmoothOutputSettings>,
#[serde(rename = "RtmpOutputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rtmp_output_settings: Option<RtmpOutputSettings>,
#[serde(rename = "UdpOutputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub udp_output_settings: Option<UdpOutputSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PassThroughSettings {}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PurchaseOffering {
pub count: i64,
pub name: Option<String>,
pub request_id: Option<String>,
pub start: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PurchaseOfferingRequest {
#[serde(rename = "Count")]
pub count: i64,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OfferingId")]
pub offering_id: String,
#[serde(rename = "RequestId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_id: Option<String>,
#[serde(rename = "Start")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PurchaseOfferingResponse {
#[serde(rename = "Reservation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservation: Option<Reservation>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PurchaseOfferingResultModel {
pub reservation: Option<Reservation>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RemixSettings {
#[serde(rename = "ChannelMappings")]
pub channel_mappings: Vec<AudioChannelMapping>,
#[serde(rename = "ChannelsIn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channels_in: Option<i64>,
#[serde(rename = "ChannelsOut")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channels_out: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Reservation {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Count")]
#[serde(skip_serializing_if = "Option::is_none")]
pub count: Option<i64>,
#[serde(rename = "CurrencyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub currency_code: Option<String>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "DurationUnits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_units: Option<String>,
#[serde(rename = "End")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end: Option<String>,
#[serde(rename = "FixedPrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fixed_price: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OfferingDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_description: Option<String>,
#[serde(rename = "OfferingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_id: Option<String>,
#[serde(rename = "OfferingType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offering_type: Option<String>,
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "ReservationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservation_id: Option<String>,
#[serde(rename = "ResourceSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_specification: Option<ReservationResourceSpecification>,
#[serde(rename = "Start")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "UsagePrice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub usage_price: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ReservationResourceSpecification {
#[serde(rename = "Codec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub codec: Option<String>,
#[serde(rename = "MaximumBitrate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_bitrate: Option<String>,
#[serde(rename = "MaximumFramerate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_framerate: Option<String>,
#[serde(rename = "Resolution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resolution: Option<String>,
#[serde(rename = "ResourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
#[serde(rename = "SpecialFeature")]
#[serde(skip_serializing_if = "Option::is_none")]
pub special_feature: Option<String>,
#[serde(rename = "VideoQuality")]
#[serde(skip_serializing_if = "Option::is_none")]
pub video_quality: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResourceConflict {
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResourceNotFound {
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RtmpCaptionInfoDestinationSettings {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RtmpGroupSettings {
#[serde(rename = "AuthenticationScheme")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_scheme: Option<String>,
#[serde(rename = "CacheFullBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_full_behavior: Option<String>,
#[serde(rename = "CacheLength")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_length: Option<i64>,
#[serde(rename = "CaptionData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub caption_data: Option<String>,
#[serde(rename = "InputLossAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_loss_action: Option<String>,
#[serde(rename = "RestartDelay")]
#[serde(skip_serializing_if = "Option::is_none")]
pub restart_delay: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RtmpOutputSettings {
#[serde(rename = "CertificateMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_mode: Option<String>,
#[serde(rename = "ConnectionRetryInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_retry_interval: Option<i64>,
#[serde(rename = "Destination")]
pub destination: OutputLocationRef,
#[serde(rename = "NumRetries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub num_retries: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ScheduleAction {
#[serde(rename = "ActionName")]
pub action_name: String,
#[serde(rename = "ScheduleActionSettings")]
pub schedule_action_settings: ScheduleActionSettings,
#[serde(rename = "ScheduleActionStartSettings")]
pub schedule_action_start_settings: ScheduleActionStartSettings,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ScheduleActionSettings {
#[serde(rename = "HlsTimedMetadataSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hls_timed_metadata_settings: Option<HlsTimedMetadataScheduleActionSettings>,
#[serde(rename = "InputSwitchSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_switch_settings: Option<InputSwitchScheduleActionSettings>,
#[serde(rename = "Scte35ReturnToNetworkSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_35_return_to_network_settings: Option<Scte35ReturnToNetworkScheduleActionSettings>,
#[serde(rename = "Scte35SpliceInsertSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_35_splice_insert_settings: Option<Scte35SpliceInsertScheduleActionSettings>,
#[serde(rename = "Scte35TimeSignalSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scte_35_time_signal_settings: Option<Scte35TimeSignalScheduleActionSettings>,
#[serde(rename = "StaticImageActivateSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub static_image_activate_settings: Option<StaticImageActivateScheduleActionSettings>,
#[serde(rename = "StaticImageDeactivateSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub static_image_deactivate_settings: Option<StaticImageDeactivateScheduleActionSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ScheduleActionStartSettings {
#[serde(rename = "FixedModeScheduleActionStartSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fixed_mode_schedule_action_start_settings: Option<FixedModeScheduleActionStartSettings>,
#[serde(rename = "FollowModeScheduleActionStartSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub follow_mode_schedule_action_start_settings: Option<FollowModeScheduleActionStartSettings>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ScheduleDescribeResultModel {
pub next_token: Option<String>,
pub schedule_actions: Vec<ScheduleAction>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte20PlusEmbeddedDestinationSettings {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte20SourceSettings {
#[serde(rename = "Convert608To708")]
#[serde(skip_serializing_if = "Option::is_none")]
pub convert_608_to_708: Option<String>,
#[serde(rename = "Source608ChannelNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_608_channel_number: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte27DestinationSettings {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte27SourceSettings {
#[serde(rename = "Pid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pid: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte35DeliveryRestrictions {
#[serde(rename = "ArchiveAllowedFlag")]
pub archive_allowed_flag: String,
#[serde(rename = "DeviceRestrictions")]
pub device_restrictions: String,
#[serde(rename = "NoRegionalBlackoutFlag")]
pub no_regional_blackout_flag: String,
#[serde(rename = "WebDeliveryAllowedFlag")]
pub web_delivery_allowed_flag: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte35Descriptor {
#[serde(rename = "Scte35DescriptorSettings")]
pub scte_35_descriptor_settings: Scte35DescriptorSettings,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte35DescriptorSettings {
#[serde(rename = "SegmentationDescriptorScte35DescriptorSettings")]
pub segmentation_descriptor_scte_35_descriptor_settings: Scte35SegmentationDescriptor,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte35ReturnToNetworkScheduleActionSettings {
#[serde(rename = "SpliceEventId")]
pub splice_event_id: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte35SegmentationDescriptor {
#[serde(rename = "DeliveryRestrictions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delivery_restrictions: Option<Scte35DeliveryRestrictions>,
#[serde(rename = "SegmentNum")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segment_num: Option<i64>,
#[serde(rename = "SegmentationCancelIndicator")]
pub segmentation_cancel_indicator: String,
#[serde(rename = "SegmentationDuration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segmentation_duration: Option<i64>,
#[serde(rename = "SegmentationEventId")]
pub segmentation_event_id: i64,
#[serde(rename = "SegmentationTypeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segmentation_type_id: Option<i64>,
#[serde(rename = "SegmentationUpid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segmentation_upid: Option<String>,
#[serde(rename = "SegmentationUpidType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segmentation_upid_type: Option<i64>,
#[serde(rename = "SegmentsExpected")]
#[serde(skip_serializing_if = "Option::is_none")]
pub segments_expected: Option<i64>,
#[serde(rename = "SubSegmentNum")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sub_segment_num: Option<i64>,
#[serde(rename = "SubSegmentsExpected")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sub_segments_expected: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte35SpliceInsert {
#[serde(rename = "AdAvailOffset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ad_avail_offset: Option<i64>,
#[serde(rename = "NoRegionalBlackoutFlag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub no_regional_blackout_flag: Option<String>,
#[serde(rename = "WebDeliveryAllowedFlag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub web_delivery_allowed_flag: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte35SpliceInsertScheduleActionSettings {
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "SpliceEventId")]
pub splice_event_id: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte35TimeSignalApos {
#[serde(rename = "AdAvailOffset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ad_avail_offset: Option<i64>,
#[serde(rename = "NoRegionalBlackoutFlag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub no_regional_blackout_flag: Option<String>,
#[serde(rename = "WebDeliveryAllowedFlag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub web_delivery_allowed_flag: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Scte35TimeSignalScheduleActionSettings {
#[serde(rename = "Scte35Descriptors")]
pub scte_35_descriptors: Vec<Scte35Descriptor>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SmpteTtDestinationSettings {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StandardHlsSettings {
#[serde(rename = "AudioRenditionSets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_rendition_sets: Option<String>,
#[serde(rename = "M3u8Settings")]
pub m_3u_8_settings: M3u8Settings,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartChannelRequest {
#[serde(rename = "ChannelId")]
pub channel_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartChannelResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<OutputDestination>>,
#[serde(rename = "EgressEndpoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub egress_endpoints: Option<Vec<ChannelEgressEndpoint>>,
#[serde(rename = "EncoderSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoder_settings: Option<EncoderSettings>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "InputAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_attachments: Option<Vec<InputAttachment>>,
#[serde(rename = "InputSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_specification: Option<InputSpecification>,
#[serde(rename = "LogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "PipelinesRunningCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipelines_running_count: Option<i64>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StaticImageActivateScheduleActionSettings {
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "FadeIn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fade_in: Option<i64>,
#[serde(rename = "FadeOut")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fade_out: Option<i64>,
#[serde(rename = "Height")]
#[serde(skip_serializing_if = "Option::is_none")]
pub height: Option<i64>,
#[serde(rename = "Image")]
pub image: InputLocation,
#[serde(rename = "ImageX")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_x: Option<i64>,
#[serde(rename = "ImageY")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_y: Option<i64>,
#[serde(rename = "Layer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub layer: Option<i64>,
#[serde(rename = "Opacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub opacity: Option<i64>,
#[serde(rename = "Width")]
#[serde(skip_serializing_if = "Option::is_none")]
pub width: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StaticImageDeactivateScheduleActionSettings {
#[serde(rename = "FadeOut")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fade_out: Option<i64>,
#[serde(rename = "Layer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub layer: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StaticKeySettings {
#[serde(rename = "KeyProviderServer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_provider_server: Option<InputLocation>,
#[serde(rename = "StaticKeyValue")]
pub static_key_value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopChannelRequest {
#[serde(rename = "ChannelId")]
pub channel_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopChannelResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<OutputDestination>>,
#[serde(rename = "EgressEndpoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub egress_endpoints: Option<Vec<ChannelEgressEndpoint>>,
#[serde(rename = "EncoderSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoder_settings: Option<EncoderSettings>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "InputAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_attachments: Option<Vec<InputAttachment>>,
#[serde(rename = "InputSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_specification: Option<InputSpecification>,
#[serde(rename = "LogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "PipelinesRunningCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipelines_running_count: Option<i64>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TagsModel {
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TeletextDestinationSettings {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TeletextSourceSettings {
#[serde(rename = "PageNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_number: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TimecodeConfig {
#[serde(rename = "Source")]
pub source: String,
#[serde(rename = "SyncThreshold")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sync_threshold: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TtmlDestinationSettings {
#[serde(rename = "StyleControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub style_control: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UdpContainerSettings {
#[serde(rename = "M2tsSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub m_2ts_settings: Option<M2tsSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UdpGroupSettings {
#[serde(rename = "InputLossAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_loss_action: Option<String>,
#[serde(rename = "TimedMetadataId3Frame")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timed_metadata_id_3_frame: Option<String>,
#[serde(rename = "TimedMetadataId3Period")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timed_metadata_id_3_period: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UdpOutputSettings {
#[serde(rename = "BufferMsec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub buffer_msec: Option<i64>,
#[serde(rename = "ContainerSettings")]
pub container_settings: UdpContainerSettings,
#[serde(rename = "Destination")]
pub destination: OutputLocationRef,
#[serde(rename = "FecOutputSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fec_output_settings: Option<FecOutputSettings>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateChannel {
pub destinations: Option<Vec<OutputDestination>>,
pub encoder_settings: Option<EncoderSettings>,
pub input_attachments: Option<Vec<InputAttachment>>,
pub input_specification: Option<InputSpecification>,
pub log_level: Option<String>,
pub name: Option<String>,
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateChannelRequest {
#[serde(rename = "ChannelId")]
pub channel_id: String,
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<OutputDestination>>,
#[serde(rename = "EncoderSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoder_settings: Option<EncoderSettings>,
#[serde(rename = "InputAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_attachments: Option<Vec<InputAttachment>>,
#[serde(rename = "InputSpecification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_specification: Option<InputSpecification>,
#[serde(rename = "LogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateChannelResponse {
#[serde(rename = "Channel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel: Option<Channel>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateChannelResultModel {
pub channel: Option<Channel>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateInput {
pub destinations: Option<Vec<InputDestinationRequest>>,
pub input_security_groups: Option<Vec<String>>,
pub media_connect_flows: Option<Vec<MediaConnectFlowRequest>>,
pub name: Option<String>,
pub role_arn: Option<String>,
pub sources: Option<Vec<InputSourceRequest>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateInputRequest {
#[serde(rename = "Destinations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destinations: Option<Vec<InputDestinationRequest>>,
#[serde(rename = "InputId")]
pub input_id: String,
#[serde(rename = "InputSecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_security_groups: Option<Vec<String>>,
#[serde(rename = "MediaConnectFlows")]
#[serde(skip_serializing_if = "Option::is_none")]
pub media_connect_flows: Option<Vec<MediaConnectFlowRequest>>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "Sources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<InputSourceRequest>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateInputResponse {
#[serde(rename = "Input")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input: Option<Input>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateInputResultModel {
pub input: Option<Input>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateInputSecurityGroupRequest {
#[serde(rename = "InputSecurityGroupId")]
pub input_security_group_id: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "WhitelistRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub whitelist_rules: Option<Vec<InputWhitelistRuleCidr>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateInputSecurityGroupResponse {
#[serde(rename = "SecurityGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group: Option<InputSecurityGroup>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateInputSecurityGroupResultModel {
pub security_group: Option<InputSecurityGroup>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ValidationError {
pub element_path: Option<String>,
pub error_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VideoCodecSettings {
#[serde(rename = "FrameCaptureSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frame_capture_settings: Option<FrameCaptureSettings>,
#[serde(rename = "H264Settings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub h264_settings: Option<H264Settings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VideoDescription {
#[serde(rename = "CodecSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub codec_settings: Option<VideoCodecSettings>,
#[serde(rename = "Height")]
#[serde(skip_serializing_if = "Option::is_none")]
pub height: Option<i64>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RespondToAfd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub respond_to_afd: Option<String>,
#[serde(rename = "ScalingBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scaling_behavior: Option<String>,
#[serde(rename = "Sharpness")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sharpness: Option<i64>,
#[serde(rename = "Width")]
#[serde(skip_serializing_if = "Option::is_none")]
pub width: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VideoSelector {
#[serde(rename = "ColorSpace")]
#[serde(skip_serializing_if = "Option::is_none")]
pub color_space: Option<String>,
#[serde(rename = "ColorSpaceUsage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub color_space_usage: Option<String>,
#[serde(rename = "SelectorSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selector_settings: Option<VideoSelectorSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VideoSelectorPid {
#[serde(rename = "Pid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pid: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VideoSelectorProgramId {
#[serde(rename = "ProgramId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub program_id: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VideoSelectorSettings {
#[serde(rename = "VideoSelectorPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub video_selector_pid: Option<VideoSelectorPid>,
#[serde(rename = "VideoSelectorProgramId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub video_selector_program_id: Option<VideoSelectorProgramId>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebvttDestinationSettings {}
#[derive(Debug, PartialEq)]
pub enum BatchUpdateScheduleError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
UnprocessableEntity(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl BatchUpdateScheduleError {
pub fn from_response(res: BufferedHttpResponse) -> BatchUpdateScheduleError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return BatchUpdateScheduleError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return BatchUpdateScheduleError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return BatchUpdateScheduleError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return BatchUpdateScheduleError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return BatchUpdateScheduleError::InternalServerError(String::from(
error_message,
));
}
"NotFoundException" => {
return BatchUpdateScheduleError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return BatchUpdateScheduleError::TooManyRequests(String::from(error_message));
}
"UnprocessableEntityException" => {
return BatchUpdateScheduleError::UnprocessableEntity(String::from(
error_message,
));
}
"ValidationException" => {
return BatchUpdateScheduleError::Validation(error_message.to_string());
}
_ => {}
}
}
return BatchUpdateScheduleError::Unknown(res);
}
}
impl From<serde_json::error::Error> for BatchUpdateScheduleError {
fn from(err: serde_json::error::Error) -> BatchUpdateScheduleError {
BatchUpdateScheduleError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for BatchUpdateScheduleError {
fn from(err: CredentialsError) -> BatchUpdateScheduleError {
BatchUpdateScheduleError::Credentials(err)
}
}
impl From<HttpDispatchError> for BatchUpdateScheduleError {
fn from(err: HttpDispatchError) -> BatchUpdateScheduleError {
BatchUpdateScheduleError::HttpDispatch(err)
}
}
impl From<io::Error> for BatchUpdateScheduleError {
fn from(err: io::Error) -> BatchUpdateScheduleError {
BatchUpdateScheduleError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for BatchUpdateScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchUpdateScheduleError {
fn description(&self) -> &str {
match *self {
BatchUpdateScheduleError::BadGateway(ref cause) => cause,
BatchUpdateScheduleError::BadRequest(ref cause) => cause,
BatchUpdateScheduleError::Forbidden(ref cause) => cause,
BatchUpdateScheduleError::GatewayTimeout(ref cause) => cause,
BatchUpdateScheduleError::InternalServerError(ref cause) => cause,
BatchUpdateScheduleError::NotFound(ref cause) => cause,
BatchUpdateScheduleError::TooManyRequests(ref cause) => cause,
BatchUpdateScheduleError::UnprocessableEntity(ref cause) => cause,
BatchUpdateScheduleError::Validation(ref cause) => cause,
BatchUpdateScheduleError::Credentials(ref err) => err.description(),
BatchUpdateScheduleError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
BatchUpdateScheduleError::ParseError(ref cause) => cause,
BatchUpdateScheduleError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateChannelError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
TooManyRequests(String),
UnprocessableEntity(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateChannelError {
pub fn from_response(res: BufferedHttpResponse) -> CreateChannelError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return CreateChannelError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return CreateChannelError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return CreateChannelError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return CreateChannelError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return CreateChannelError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return CreateChannelError::InternalServerError(String::from(error_message));
}
"TooManyRequestsException" => {
return CreateChannelError::TooManyRequests(String::from(error_message));
}
"UnprocessableEntityException" => {
return CreateChannelError::UnprocessableEntity(String::from(error_message));
}
"ValidationException" => {
return CreateChannelError::Validation(error_message.to_string());
}
_ => {}
}
}
return CreateChannelError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateChannelError {
fn from(err: serde_json::error::Error) -> CreateChannelError {
CreateChannelError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateChannelError {
fn from(err: CredentialsError) -> CreateChannelError {
CreateChannelError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateChannelError {
fn from(err: HttpDispatchError) -> CreateChannelError {
CreateChannelError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateChannelError {
fn from(err: io::Error) -> CreateChannelError {
CreateChannelError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateChannelError {
fn description(&self) -> &str {
match *self {
CreateChannelError::BadGateway(ref cause) => cause,
CreateChannelError::BadRequest(ref cause) => cause,
CreateChannelError::Conflict(ref cause) => cause,
CreateChannelError::Forbidden(ref cause) => cause,
CreateChannelError::GatewayTimeout(ref cause) => cause,
CreateChannelError::InternalServerError(ref cause) => cause,
CreateChannelError::TooManyRequests(ref cause) => cause,
CreateChannelError::UnprocessableEntity(ref cause) => cause,
CreateChannelError::Validation(ref cause) => cause,
CreateChannelError::Credentials(ref err) => err.description(),
CreateChannelError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
CreateChannelError::ParseError(ref cause) => cause,
CreateChannelError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateInputError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateInputError {
pub fn from_response(res: BufferedHttpResponse) -> CreateInputError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return CreateInputError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return CreateInputError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return CreateInputError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return CreateInputError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return CreateInputError::InternalServerError(String::from(error_message));
}
"TooManyRequestsException" => {
return CreateInputError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return CreateInputError::Validation(error_message.to_string());
}
_ => {}
}
}
return CreateInputError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateInputError {
fn from(err: serde_json::error::Error) -> CreateInputError {
CreateInputError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateInputError {
fn from(err: CredentialsError) -> CreateInputError {
CreateInputError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateInputError {
fn from(err: HttpDispatchError) -> CreateInputError {
CreateInputError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateInputError {
fn from(err: io::Error) -> CreateInputError {
CreateInputError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateInputError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateInputError {
fn description(&self) -> &str {
match *self {
CreateInputError::BadGateway(ref cause) => cause,
CreateInputError::BadRequest(ref cause) => cause,
CreateInputError::Forbidden(ref cause) => cause,
CreateInputError::GatewayTimeout(ref cause) => cause,
CreateInputError::InternalServerError(ref cause) => cause,
CreateInputError::TooManyRequests(ref cause) => cause,
CreateInputError::Validation(ref cause) => cause,
CreateInputError::Credentials(ref err) => err.description(),
CreateInputError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
CreateInputError::ParseError(ref cause) => cause,
CreateInputError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateInputSecurityGroupError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateInputSecurityGroupError {
pub fn from_response(res: BufferedHttpResponse) -> CreateInputSecurityGroupError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return CreateInputSecurityGroupError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return CreateInputSecurityGroupError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return CreateInputSecurityGroupError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return CreateInputSecurityGroupError::GatewayTimeout(String::from(
error_message,
));
}
"InternalServerErrorException" => {
return CreateInputSecurityGroupError::InternalServerError(String::from(
error_message,
));
}
"TooManyRequestsException" => {
return CreateInputSecurityGroupError::TooManyRequests(String::from(
error_message,
));
}
"ValidationException" => {
return CreateInputSecurityGroupError::Validation(error_message.to_string());
}
_ => {}
}
}
return CreateInputSecurityGroupError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateInputSecurityGroupError {
fn from(err: serde_json::error::Error) -> CreateInputSecurityGroupError {
CreateInputSecurityGroupError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateInputSecurityGroupError {
fn from(err: CredentialsError) -> CreateInputSecurityGroupError {
CreateInputSecurityGroupError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateInputSecurityGroupError {
fn from(err: HttpDispatchError) -> CreateInputSecurityGroupError {
CreateInputSecurityGroupError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateInputSecurityGroupError {
fn from(err: io::Error) -> CreateInputSecurityGroupError {
CreateInputSecurityGroupError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateInputSecurityGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateInputSecurityGroupError {
fn description(&self) -> &str {
match *self {
CreateInputSecurityGroupError::BadGateway(ref cause) => cause,
CreateInputSecurityGroupError::BadRequest(ref cause) => cause,
CreateInputSecurityGroupError::Forbidden(ref cause) => cause,
CreateInputSecurityGroupError::GatewayTimeout(ref cause) => cause,
CreateInputSecurityGroupError::InternalServerError(ref cause) => cause,
CreateInputSecurityGroupError::TooManyRequests(ref cause) => cause,
CreateInputSecurityGroupError::Validation(ref cause) => cause,
CreateInputSecurityGroupError::Credentials(ref err) => err.description(),
CreateInputSecurityGroupError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateInputSecurityGroupError::ParseError(ref cause) => cause,
CreateInputSecurityGroupError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTagsError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateTagsError {
pub fn from_response(res: BufferedHttpResponse) -> CreateTagsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadRequestException" => {
return CreateTagsError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return CreateTagsError::Forbidden(String::from(error_message));
}
"InternalServerErrorException" => {
return CreateTagsError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return CreateTagsError::NotFound(String::from(error_message));
}
"ValidationException" => {
return CreateTagsError::Validation(error_message.to_string());
}
_ => {}
}
}
return CreateTagsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateTagsError {
fn from(err: serde_json::error::Error) -> CreateTagsError {
CreateTagsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateTagsError {
fn from(err: CredentialsError) -> CreateTagsError {
CreateTagsError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateTagsError {
fn from(err: HttpDispatchError) -> CreateTagsError {
CreateTagsError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateTagsError {
fn from(err: io::Error) -> CreateTagsError {
CreateTagsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTagsError {
fn description(&self) -> &str {
match *self {
CreateTagsError::BadRequest(ref cause) => cause,
CreateTagsError::Forbidden(ref cause) => cause,
CreateTagsError::InternalServerError(ref cause) => cause,
CreateTagsError::NotFound(ref cause) => cause,
CreateTagsError::Validation(ref cause) => cause,
CreateTagsError::Credentials(ref err) => err.description(),
CreateTagsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
CreateTagsError::ParseError(ref cause) => cause,
CreateTagsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteChannelError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteChannelError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteChannelError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DeleteChannelError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DeleteChannelError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return DeleteChannelError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return DeleteChannelError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DeleteChannelError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return DeleteChannelError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return DeleteChannelError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DeleteChannelError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return DeleteChannelError::Validation(error_message.to_string());
}
_ => {}
}
}
return DeleteChannelError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteChannelError {
fn from(err: serde_json::error::Error) -> DeleteChannelError {
DeleteChannelError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteChannelError {
fn from(err: CredentialsError) -> DeleteChannelError {
DeleteChannelError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteChannelError {
fn from(err: HttpDispatchError) -> DeleteChannelError {
DeleteChannelError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteChannelError {
fn from(err: io::Error) -> DeleteChannelError {
DeleteChannelError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteChannelError {
fn description(&self) -> &str {
match *self {
DeleteChannelError::BadGateway(ref cause) => cause,
DeleteChannelError::BadRequest(ref cause) => cause,
DeleteChannelError::Conflict(ref cause) => cause,
DeleteChannelError::Forbidden(ref cause) => cause,
DeleteChannelError::GatewayTimeout(ref cause) => cause,
DeleteChannelError::InternalServerError(ref cause) => cause,
DeleteChannelError::NotFound(ref cause) => cause,
DeleteChannelError::TooManyRequests(ref cause) => cause,
DeleteChannelError::Validation(ref cause) => cause,
DeleteChannelError::Credentials(ref err) => err.description(),
DeleteChannelError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DeleteChannelError::ParseError(ref cause) => cause,
DeleteChannelError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteInputError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteInputError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteInputError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DeleteInputError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DeleteInputError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return DeleteInputError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return DeleteInputError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DeleteInputError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return DeleteInputError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return DeleteInputError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DeleteInputError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return DeleteInputError::Validation(error_message.to_string());
}
_ => {}
}
}
return DeleteInputError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteInputError {
fn from(err: serde_json::error::Error) -> DeleteInputError {
DeleteInputError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteInputError {
fn from(err: CredentialsError) -> DeleteInputError {
DeleteInputError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteInputError {
fn from(err: HttpDispatchError) -> DeleteInputError {
DeleteInputError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteInputError {
fn from(err: io::Error) -> DeleteInputError {
DeleteInputError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteInputError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteInputError {
fn description(&self) -> &str {
match *self {
DeleteInputError::BadGateway(ref cause) => cause,
DeleteInputError::BadRequest(ref cause) => cause,
DeleteInputError::Conflict(ref cause) => cause,
DeleteInputError::Forbidden(ref cause) => cause,
DeleteInputError::GatewayTimeout(ref cause) => cause,
DeleteInputError::InternalServerError(ref cause) => cause,
DeleteInputError::NotFound(ref cause) => cause,
DeleteInputError::TooManyRequests(ref cause) => cause,
DeleteInputError::Validation(ref cause) => cause,
DeleteInputError::Credentials(ref err) => err.description(),
DeleteInputError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DeleteInputError::ParseError(ref cause) => cause,
DeleteInputError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteInputSecurityGroupError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteInputSecurityGroupError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteInputSecurityGroupError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DeleteInputSecurityGroupError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DeleteInputSecurityGroupError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return DeleteInputSecurityGroupError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DeleteInputSecurityGroupError::GatewayTimeout(String::from(
error_message,
));
}
"InternalServerErrorException" => {
return DeleteInputSecurityGroupError::InternalServerError(String::from(
error_message,
));
}
"NotFoundException" => {
return DeleteInputSecurityGroupError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DeleteInputSecurityGroupError::TooManyRequests(String::from(
error_message,
));
}
"ValidationException" => {
return DeleteInputSecurityGroupError::Validation(error_message.to_string());
}
_ => {}
}
}
return DeleteInputSecurityGroupError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteInputSecurityGroupError {
fn from(err: serde_json::error::Error) -> DeleteInputSecurityGroupError {
DeleteInputSecurityGroupError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteInputSecurityGroupError {
fn from(err: CredentialsError) -> DeleteInputSecurityGroupError {
DeleteInputSecurityGroupError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteInputSecurityGroupError {
fn from(err: HttpDispatchError) -> DeleteInputSecurityGroupError {
DeleteInputSecurityGroupError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteInputSecurityGroupError {
fn from(err: io::Error) -> DeleteInputSecurityGroupError {
DeleteInputSecurityGroupError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteInputSecurityGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteInputSecurityGroupError {
fn description(&self) -> &str {
match *self {
DeleteInputSecurityGroupError::BadGateway(ref cause) => cause,
DeleteInputSecurityGroupError::BadRequest(ref cause) => cause,
DeleteInputSecurityGroupError::Forbidden(ref cause) => cause,
DeleteInputSecurityGroupError::GatewayTimeout(ref cause) => cause,
DeleteInputSecurityGroupError::InternalServerError(ref cause) => cause,
DeleteInputSecurityGroupError::NotFound(ref cause) => cause,
DeleteInputSecurityGroupError::TooManyRequests(ref cause) => cause,
DeleteInputSecurityGroupError::Validation(ref cause) => cause,
DeleteInputSecurityGroupError::Credentials(ref err) => err.description(),
DeleteInputSecurityGroupError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeleteInputSecurityGroupError::ParseError(ref cause) => cause,
DeleteInputSecurityGroupError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteReservationError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteReservationError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteReservationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DeleteReservationError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DeleteReservationError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return DeleteReservationError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return DeleteReservationError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DeleteReservationError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return DeleteReservationError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return DeleteReservationError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DeleteReservationError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return DeleteReservationError::Validation(error_message.to_string());
}
_ => {}
}
}
return DeleteReservationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteReservationError {
fn from(err: serde_json::error::Error) -> DeleteReservationError {
DeleteReservationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteReservationError {
fn from(err: CredentialsError) -> DeleteReservationError {
DeleteReservationError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteReservationError {
fn from(err: HttpDispatchError) -> DeleteReservationError {
DeleteReservationError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteReservationError {
fn from(err: io::Error) -> DeleteReservationError {
DeleteReservationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteReservationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteReservationError {
fn description(&self) -> &str {
match *self {
DeleteReservationError::BadGateway(ref cause) => cause,
DeleteReservationError::BadRequest(ref cause) => cause,
DeleteReservationError::Conflict(ref cause) => cause,
DeleteReservationError::Forbidden(ref cause) => cause,
DeleteReservationError::GatewayTimeout(ref cause) => cause,
DeleteReservationError::InternalServerError(ref cause) => cause,
DeleteReservationError::NotFound(ref cause) => cause,
DeleteReservationError::TooManyRequests(ref cause) => cause,
DeleteReservationError::Validation(ref cause) => cause,
DeleteReservationError::Credentials(ref err) => err.description(),
DeleteReservationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeleteReservationError::ParseError(ref cause) => cause,
DeleteReservationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTagsError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteTagsError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteTagsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadRequestException" => {
return DeleteTagsError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return DeleteTagsError::Forbidden(String::from(error_message));
}
"InternalServerErrorException" => {
return DeleteTagsError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return DeleteTagsError::NotFound(String::from(error_message));
}
"ValidationException" => {
return DeleteTagsError::Validation(error_message.to_string());
}
_ => {}
}
}
return DeleteTagsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteTagsError {
fn from(err: serde_json::error::Error) -> DeleteTagsError {
DeleteTagsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteTagsError {
fn from(err: CredentialsError) -> DeleteTagsError {
DeleteTagsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteTagsError {
fn from(err: HttpDispatchError) -> DeleteTagsError {
DeleteTagsError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteTagsError {
fn from(err: io::Error) -> DeleteTagsError {
DeleteTagsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTagsError {
fn description(&self) -> &str {
match *self {
DeleteTagsError::BadRequest(ref cause) => cause,
DeleteTagsError::Forbidden(ref cause) => cause,
DeleteTagsError::InternalServerError(ref cause) => cause,
DeleteTagsError::NotFound(ref cause) => cause,
DeleteTagsError::Validation(ref cause) => cause,
DeleteTagsError::Credentials(ref err) => err.description(),
DeleteTagsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DeleteTagsError::ParseError(ref cause) => cause,
DeleteTagsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeChannelError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeChannelError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeChannelError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DescribeChannelError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DescribeChannelError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return DescribeChannelError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DescribeChannelError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return DescribeChannelError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return DescribeChannelError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DescribeChannelError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return DescribeChannelError::Validation(error_message.to_string());
}
_ => {}
}
}
return DescribeChannelError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeChannelError {
fn from(err: serde_json::error::Error) -> DescribeChannelError {
DescribeChannelError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeChannelError {
fn from(err: CredentialsError) -> DescribeChannelError {
DescribeChannelError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeChannelError {
fn from(err: HttpDispatchError) -> DescribeChannelError {
DescribeChannelError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeChannelError {
fn from(err: io::Error) -> DescribeChannelError {
DescribeChannelError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeChannelError {
fn description(&self) -> &str {
match *self {
DescribeChannelError::BadGateway(ref cause) => cause,
DescribeChannelError::BadRequest(ref cause) => cause,
DescribeChannelError::Forbidden(ref cause) => cause,
DescribeChannelError::GatewayTimeout(ref cause) => cause,
DescribeChannelError::InternalServerError(ref cause) => cause,
DescribeChannelError::NotFound(ref cause) => cause,
DescribeChannelError::TooManyRequests(ref cause) => cause,
DescribeChannelError::Validation(ref cause) => cause,
DescribeChannelError::Credentials(ref err) => err.description(),
DescribeChannelError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DescribeChannelError::ParseError(ref cause) => cause,
DescribeChannelError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInputError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeInputError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeInputError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DescribeInputError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DescribeInputError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return DescribeInputError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DescribeInputError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return DescribeInputError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return DescribeInputError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DescribeInputError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return DescribeInputError::Validation(error_message.to_string());
}
_ => {}
}
}
return DescribeInputError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeInputError {
fn from(err: serde_json::error::Error) -> DescribeInputError {
DescribeInputError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeInputError {
fn from(err: CredentialsError) -> DescribeInputError {
DescribeInputError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeInputError {
fn from(err: HttpDispatchError) -> DescribeInputError {
DescribeInputError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeInputError {
fn from(err: io::Error) -> DescribeInputError {
DescribeInputError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeInputError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInputError {
fn description(&self) -> &str {
match *self {
DescribeInputError::BadGateway(ref cause) => cause,
DescribeInputError::BadRequest(ref cause) => cause,
DescribeInputError::Forbidden(ref cause) => cause,
DescribeInputError::GatewayTimeout(ref cause) => cause,
DescribeInputError::InternalServerError(ref cause) => cause,
DescribeInputError::NotFound(ref cause) => cause,
DescribeInputError::TooManyRequests(ref cause) => cause,
DescribeInputError::Validation(ref cause) => cause,
DescribeInputError::Credentials(ref err) => err.description(),
DescribeInputError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DescribeInputError::ParseError(ref cause) => cause,
DescribeInputError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInputSecurityGroupError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeInputSecurityGroupError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeInputSecurityGroupError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DescribeInputSecurityGroupError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DescribeInputSecurityGroupError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return DescribeInputSecurityGroupError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DescribeInputSecurityGroupError::GatewayTimeout(String::from(
error_message,
));
}
"InternalServerErrorException" => {
return DescribeInputSecurityGroupError::InternalServerError(String::from(
error_message,
));
}
"NotFoundException" => {
return DescribeInputSecurityGroupError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DescribeInputSecurityGroupError::TooManyRequests(String::from(
error_message,
));
}
"ValidationException" => {
return DescribeInputSecurityGroupError::Validation(error_message.to_string());
}
_ => {}
}
}
return DescribeInputSecurityGroupError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeInputSecurityGroupError {
fn from(err: serde_json::error::Error) -> DescribeInputSecurityGroupError {
DescribeInputSecurityGroupError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeInputSecurityGroupError {
fn from(err: CredentialsError) -> DescribeInputSecurityGroupError {
DescribeInputSecurityGroupError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeInputSecurityGroupError {
fn from(err: HttpDispatchError) -> DescribeInputSecurityGroupError {
DescribeInputSecurityGroupError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeInputSecurityGroupError {
fn from(err: io::Error) -> DescribeInputSecurityGroupError {
DescribeInputSecurityGroupError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeInputSecurityGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInputSecurityGroupError {
fn description(&self) -> &str {
match *self {
DescribeInputSecurityGroupError::BadGateway(ref cause) => cause,
DescribeInputSecurityGroupError::BadRequest(ref cause) => cause,
DescribeInputSecurityGroupError::Forbidden(ref cause) => cause,
DescribeInputSecurityGroupError::GatewayTimeout(ref cause) => cause,
DescribeInputSecurityGroupError::InternalServerError(ref cause) => cause,
DescribeInputSecurityGroupError::NotFound(ref cause) => cause,
DescribeInputSecurityGroupError::TooManyRequests(ref cause) => cause,
DescribeInputSecurityGroupError::Validation(ref cause) => cause,
DescribeInputSecurityGroupError::Credentials(ref err) => err.description(),
DescribeInputSecurityGroupError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeInputSecurityGroupError::ParseError(ref cause) => cause,
DescribeInputSecurityGroupError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeOfferingError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeOfferingError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeOfferingError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DescribeOfferingError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DescribeOfferingError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return DescribeOfferingError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DescribeOfferingError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return DescribeOfferingError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return DescribeOfferingError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DescribeOfferingError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return DescribeOfferingError::Validation(error_message.to_string());
}
_ => {}
}
}
return DescribeOfferingError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeOfferingError {
fn from(err: serde_json::error::Error) -> DescribeOfferingError {
DescribeOfferingError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeOfferingError {
fn from(err: CredentialsError) -> DescribeOfferingError {
DescribeOfferingError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeOfferingError {
fn from(err: HttpDispatchError) -> DescribeOfferingError {
DescribeOfferingError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeOfferingError {
fn from(err: io::Error) -> DescribeOfferingError {
DescribeOfferingError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeOfferingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeOfferingError {
fn description(&self) -> &str {
match *self {
DescribeOfferingError::BadGateway(ref cause) => cause,
DescribeOfferingError::BadRequest(ref cause) => cause,
DescribeOfferingError::Forbidden(ref cause) => cause,
DescribeOfferingError::GatewayTimeout(ref cause) => cause,
DescribeOfferingError::InternalServerError(ref cause) => cause,
DescribeOfferingError::NotFound(ref cause) => cause,
DescribeOfferingError::TooManyRequests(ref cause) => cause,
DescribeOfferingError::Validation(ref cause) => cause,
DescribeOfferingError::Credentials(ref err) => err.description(),
DescribeOfferingError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DescribeOfferingError::ParseError(ref cause) => cause,
DescribeOfferingError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeReservationError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeReservationError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeReservationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DescribeReservationError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DescribeReservationError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return DescribeReservationError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DescribeReservationError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return DescribeReservationError::InternalServerError(String::from(
error_message,
));
}
"NotFoundException" => {
return DescribeReservationError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DescribeReservationError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return DescribeReservationError::Validation(error_message.to_string());
}
_ => {}
}
}
return DescribeReservationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeReservationError {
fn from(err: serde_json::error::Error) -> DescribeReservationError {
DescribeReservationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeReservationError {
fn from(err: CredentialsError) -> DescribeReservationError {
DescribeReservationError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeReservationError {
fn from(err: HttpDispatchError) -> DescribeReservationError {
DescribeReservationError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeReservationError {
fn from(err: io::Error) -> DescribeReservationError {
DescribeReservationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeReservationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeReservationError {
fn description(&self) -> &str {
match *self {
DescribeReservationError::BadGateway(ref cause) => cause,
DescribeReservationError::BadRequest(ref cause) => cause,
DescribeReservationError::Forbidden(ref cause) => cause,
DescribeReservationError::GatewayTimeout(ref cause) => cause,
DescribeReservationError::InternalServerError(ref cause) => cause,
DescribeReservationError::NotFound(ref cause) => cause,
DescribeReservationError::TooManyRequests(ref cause) => cause,
DescribeReservationError::Validation(ref cause) => cause,
DescribeReservationError::Credentials(ref err) => err.description(),
DescribeReservationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeReservationError::ParseError(ref cause) => cause,
DescribeReservationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeScheduleError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeScheduleError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeScheduleError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return DescribeScheduleError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return DescribeScheduleError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return DescribeScheduleError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return DescribeScheduleError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return DescribeScheduleError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return DescribeScheduleError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return DescribeScheduleError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return DescribeScheduleError::Validation(error_message.to_string());
}
_ => {}
}
}
return DescribeScheduleError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeScheduleError {
fn from(err: serde_json::error::Error) -> DescribeScheduleError {
DescribeScheduleError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeScheduleError {
fn from(err: CredentialsError) -> DescribeScheduleError {
DescribeScheduleError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeScheduleError {
fn from(err: HttpDispatchError) -> DescribeScheduleError {
DescribeScheduleError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeScheduleError {
fn from(err: io::Error) -> DescribeScheduleError {
DescribeScheduleError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeScheduleError {
fn description(&self) -> &str {
match *self {
DescribeScheduleError::BadGateway(ref cause) => cause,
DescribeScheduleError::BadRequest(ref cause) => cause,
DescribeScheduleError::Forbidden(ref cause) => cause,
DescribeScheduleError::GatewayTimeout(ref cause) => cause,
DescribeScheduleError::InternalServerError(ref cause) => cause,
DescribeScheduleError::NotFound(ref cause) => cause,
DescribeScheduleError::TooManyRequests(ref cause) => cause,
DescribeScheduleError::Validation(ref cause) => cause,
DescribeScheduleError::Credentials(ref err) => err.description(),
DescribeScheduleError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DescribeScheduleError::ParseError(ref cause) => cause,
DescribeScheduleError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListChannelsError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListChannelsError {
pub fn from_response(res: BufferedHttpResponse) -> ListChannelsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return ListChannelsError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return ListChannelsError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return ListChannelsError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return ListChannelsError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return ListChannelsError::InternalServerError(String::from(error_message));
}
"TooManyRequestsException" => {
return ListChannelsError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return ListChannelsError::Validation(error_message.to_string());
}
_ => {}
}
}
return ListChannelsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListChannelsError {
fn from(err: serde_json::error::Error) -> ListChannelsError {
ListChannelsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListChannelsError {
fn from(err: CredentialsError) -> ListChannelsError {
ListChannelsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListChannelsError {
fn from(err: HttpDispatchError) -> ListChannelsError {
ListChannelsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListChannelsError {
fn from(err: io::Error) -> ListChannelsError {
ListChannelsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListChannelsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListChannelsError {
fn description(&self) -> &str {
match *self {
ListChannelsError::BadGateway(ref cause) => cause,
ListChannelsError::BadRequest(ref cause) => cause,
ListChannelsError::Forbidden(ref cause) => cause,
ListChannelsError::GatewayTimeout(ref cause) => cause,
ListChannelsError::InternalServerError(ref cause) => cause,
ListChannelsError::TooManyRequests(ref cause) => cause,
ListChannelsError::Validation(ref cause) => cause,
ListChannelsError::Credentials(ref err) => err.description(),
ListChannelsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
ListChannelsError::ParseError(ref cause) => cause,
ListChannelsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListInputSecurityGroupsError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListInputSecurityGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> ListInputSecurityGroupsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return ListInputSecurityGroupsError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return ListInputSecurityGroupsError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return ListInputSecurityGroupsError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return ListInputSecurityGroupsError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return ListInputSecurityGroupsError::InternalServerError(String::from(
error_message,
));
}
"TooManyRequestsException" => {
return ListInputSecurityGroupsError::TooManyRequests(String::from(
error_message,
));
}
"ValidationException" => {
return ListInputSecurityGroupsError::Validation(error_message.to_string());
}
_ => {}
}
}
return ListInputSecurityGroupsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListInputSecurityGroupsError {
fn from(err: serde_json::error::Error) -> ListInputSecurityGroupsError {
ListInputSecurityGroupsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListInputSecurityGroupsError {
fn from(err: CredentialsError) -> ListInputSecurityGroupsError {
ListInputSecurityGroupsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListInputSecurityGroupsError {
fn from(err: HttpDispatchError) -> ListInputSecurityGroupsError {
ListInputSecurityGroupsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListInputSecurityGroupsError {
fn from(err: io::Error) -> ListInputSecurityGroupsError {
ListInputSecurityGroupsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListInputSecurityGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListInputSecurityGroupsError {
fn description(&self) -> &str {
match *self {
ListInputSecurityGroupsError::BadGateway(ref cause) => cause,
ListInputSecurityGroupsError::BadRequest(ref cause) => cause,
ListInputSecurityGroupsError::Forbidden(ref cause) => cause,
ListInputSecurityGroupsError::GatewayTimeout(ref cause) => cause,
ListInputSecurityGroupsError::InternalServerError(ref cause) => cause,
ListInputSecurityGroupsError::TooManyRequests(ref cause) => cause,
ListInputSecurityGroupsError::Validation(ref cause) => cause,
ListInputSecurityGroupsError::Credentials(ref err) => err.description(),
ListInputSecurityGroupsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListInputSecurityGroupsError::ParseError(ref cause) => cause,
ListInputSecurityGroupsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListInputsError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListInputsError {
pub fn from_response(res: BufferedHttpResponse) -> ListInputsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return ListInputsError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return ListInputsError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return ListInputsError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return ListInputsError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return ListInputsError::InternalServerError(String::from(error_message));
}
"TooManyRequestsException" => {
return ListInputsError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return ListInputsError::Validation(error_message.to_string());
}
_ => {}
}
}
return ListInputsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListInputsError {
fn from(err: serde_json::error::Error) -> ListInputsError {
ListInputsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListInputsError {
fn from(err: CredentialsError) -> ListInputsError {
ListInputsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListInputsError {
fn from(err: HttpDispatchError) -> ListInputsError {
ListInputsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListInputsError {
fn from(err: io::Error) -> ListInputsError {
ListInputsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListInputsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListInputsError {
fn description(&self) -> &str {
match *self {
ListInputsError::BadGateway(ref cause) => cause,
ListInputsError::BadRequest(ref cause) => cause,
ListInputsError::Forbidden(ref cause) => cause,
ListInputsError::GatewayTimeout(ref cause) => cause,
ListInputsError::InternalServerError(ref cause) => cause,
ListInputsError::TooManyRequests(ref cause) => cause,
ListInputsError::Validation(ref cause) => cause,
ListInputsError::Credentials(ref err) => err.description(),
ListInputsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
ListInputsError::ParseError(ref cause) => cause,
ListInputsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListOfferingsError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListOfferingsError {
pub fn from_response(res: BufferedHttpResponse) -> ListOfferingsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return ListOfferingsError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return ListOfferingsError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return ListOfferingsError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return ListOfferingsError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return ListOfferingsError::InternalServerError(String::from(error_message));
}
"TooManyRequestsException" => {
return ListOfferingsError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return ListOfferingsError::Validation(error_message.to_string());
}
_ => {}
}
}
return ListOfferingsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListOfferingsError {
fn from(err: serde_json::error::Error) -> ListOfferingsError {
ListOfferingsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListOfferingsError {
fn from(err: CredentialsError) -> ListOfferingsError {
ListOfferingsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListOfferingsError {
fn from(err: HttpDispatchError) -> ListOfferingsError {
ListOfferingsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListOfferingsError {
fn from(err: io::Error) -> ListOfferingsError {
ListOfferingsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListOfferingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListOfferingsError {
fn description(&self) -> &str {
match *self {
ListOfferingsError::BadGateway(ref cause) => cause,
ListOfferingsError::BadRequest(ref cause) => cause,
ListOfferingsError::Forbidden(ref cause) => cause,
ListOfferingsError::GatewayTimeout(ref cause) => cause,
ListOfferingsError::InternalServerError(ref cause) => cause,
ListOfferingsError::TooManyRequests(ref cause) => cause,
ListOfferingsError::Validation(ref cause) => cause,
ListOfferingsError::Credentials(ref err) => err.description(),
ListOfferingsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
ListOfferingsError::ParseError(ref cause) => cause,
ListOfferingsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListReservationsError {
BadGateway(String),
BadRequest(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListReservationsError {
pub fn from_response(res: BufferedHttpResponse) -> ListReservationsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return ListReservationsError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return ListReservationsError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return ListReservationsError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return ListReservationsError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return ListReservationsError::InternalServerError(String::from(error_message));
}
"TooManyRequestsException" => {
return ListReservationsError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return ListReservationsError::Validation(error_message.to_string());
}
_ => {}
}
}
return ListReservationsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListReservationsError {
fn from(err: serde_json::error::Error) -> ListReservationsError {
ListReservationsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListReservationsError {
fn from(err: CredentialsError) -> ListReservationsError {
ListReservationsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListReservationsError {
fn from(err: HttpDispatchError) -> ListReservationsError {
ListReservationsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListReservationsError {
fn from(err: io::Error) -> ListReservationsError {
ListReservationsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListReservationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListReservationsError {
fn description(&self) -> &str {
match *self {
ListReservationsError::BadGateway(ref cause) => cause,
ListReservationsError::BadRequest(ref cause) => cause,
ListReservationsError::Forbidden(ref cause) => cause,
ListReservationsError::GatewayTimeout(ref cause) => cause,
ListReservationsError::InternalServerError(ref cause) => cause,
ListReservationsError::TooManyRequests(ref cause) => cause,
ListReservationsError::Validation(ref cause) => cause,
ListReservationsError::Credentials(ref err) => err.description(),
ListReservationsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
ListReservationsError::ParseError(ref cause) => cause,
ListReservationsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> ListTagsForResourceError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadRequestException" => {
return ListTagsForResourceError::BadRequest(String::from(error_message));
}
"ForbiddenException" => {
return ListTagsForResourceError::Forbidden(String::from(error_message));
}
"InternalServerErrorException" => {
return ListTagsForResourceError::InternalServerError(String::from(
error_message,
));
}
"NotFoundException" => {
return ListTagsForResourceError::NotFound(String::from(error_message));
}
"ValidationException" => {
return ListTagsForResourceError::Validation(error_message.to_string());
}
_ => {}
}
}
return ListTagsForResourceError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListTagsForResourceError {
fn from(err: serde_json::error::Error) -> ListTagsForResourceError {
ListTagsForResourceError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListTagsForResourceError {
fn from(err: CredentialsError) -> ListTagsForResourceError {
ListTagsForResourceError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListTagsForResourceError {
fn from(err: HttpDispatchError) -> ListTagsForResourceError {
ListTagsForResourceError::HttpDispatch(err)
}
}
impl From<io::Error> for ListTagsForResourceError {
fn from(err: io::Error) -> ListTagsForResourceError {
ListTagsForResourceError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::BadRequest(ref cause) => cause,
ListTagsForResourceError::Forbidden(ref cause) => cause,
ListTagsForResourceError::InternalServerError(ref cause) => cause,
ListTagsForResourceError::NotFound(ref cause) => cause,
ListTagsForResourceError::Validation(ref cause) => cause,
ListTagsForResourceError::Credentials(ref err) => err.description(),
ListTagsForResourceError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListTagsForResourceError::ParseError(ref cause) => cause,
ListTagsForResourceError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum PurchaseOfferingError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl PurchaseOfferingError {
pub fn from_response(res: BufferedHttpResponse) -> PurchaseOfferingError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return PurchaseOfferingError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return PurchaseOfferingError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return PurchaseOfferingError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return PurchaseOfferingError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return PurchaseOfferingError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return PurchaseOfferingError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return PurchaseOfferingError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return PurchaseOfferingError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return PurchaseOfferingError::Validation(error_message.to_string());
}
_ => {}
}
}
return PurchaseOfferingError::Unknown(res);
}
}
impl From<serde_json::error::Error> for PurchaseOfferingError {
fn from(err: serde_json::error::Error) -> PurchaseOfferingError {
PurchaseOfferingError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for PurchaseOfferingError {
fn from(err: CredentialsError) -> PurchaseOfferingError {
PurchaseOfferingError::Credentials(err)
}
}
impl From<HttpDispatchError> for PurchaseOfferingError {
fn from(err: HttpDispatchError) -> PurchaseOfferingError {
PurchaseOfferingError::HttpDispatch(err)
}
}
impl From<io::Error> for PurchaseOfferingError {
fn from(err: io::Error) -> PurchaseOfferingError {
PurchaseOfferingError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for PurchaseOfferingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PurchaseOfferingError {
fn description(&self) -> &str {
match *self {
PurchaseOfferingError::BadGateway(ref cause) => cause,
PurchaseOfferingError::BadRequest(ref cause) => cause,
PurchaseOfferingError::Conflict(ref cause) => cause,
PurchaseOfferingError::Forbidden(ref cause) => cause,
PurchaseOfferingError::GatewayTimeout(ref cause) => cause,
PurchaseOfferingError::InternalServerError(ref cause) => cause,
PurchaseOfferingError::NotFound(ref cause) => cause,
PurchaseOfferingError::TooManyRequests(ref cause) => cause,
PurchaseOfferingError::Validation(ref cause) => cause,
PurchaseOfferingError::Credentials(ref err) => err.description(),
PurchaseOfferingError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
PurchaseOfferingError::ParseError(ref cause) => cause,
PurchaseOfferingError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartChannelError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl StartChannelError {
pub fn from_response(res: BufferedHttpResponse) -> StartChannelError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return StartChannelError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return StartChannelError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return StartChannelError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return StartChannelError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return StartChannelError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return StartChannelError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return StartChannelError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return StartChannelError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return StartChannelError::Validation(error_message.to_string());
}
_ => {}
}
}
return StartChannelError::Unknown(res);
}
}
impl From<serde_json::error::Error> for StartChannelError {
fn from(err: serde_json::error::Error) -> StartChannelError {
StartChannelError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for StartChannelError {
fn from(err: CredentialsError) -> StartChannelError {
StartChannelError::Credentials(err)
}
}
impl From<HttpDispatchError> for StartChannelError {
fn from(err: HttpDispatchError) -> StartChannelError {
StartChannelError::HttpDispatch(err)
}
}
impl From<io::Error> for StartChannelError {
fn from(err: io::Error) -> StartChannelError {
StartChannelError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for StartChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartChannelError {
fn description(&self) -> &str {
match *self {
StartChannelError::BadGateway(ref cause) => cause,
StartChannelError::BadRequest(ref cause) => cause,
StartChannelError::Conflict(ref cause) => cause,
StartChannelError::Forbidden(ref cause) => cause,
StartChannelError::GatewayTimeout(ref cause) => cause,
StartChannelError::InternalServerError(ref cause) => cause,
StartChannelError::NotFound(ref cause) => cause,
StartChannelError::TooManyRequests(ref cause) => cause,
StartChannelError::Validation(ref cause) => cause,
StartChannelError::Credentials(ref err) => err.description(),
StartChannelError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
StartChannelError::ParseError(ref cause) => cause,
StartChannelError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopChannelError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
TooManyRequests(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl StopChannelError {
pub fn from_response(res: BufferedHttpResponse) -> StopChannelError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return StopChannelError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return StopChannelError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return StopChannelError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return StopChannelError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return StopChannelError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return StopChannelError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return StopChannelError::NotFound(String::from(error_message));
}
"TooManyRequestsException" => {
return StopChannelError::TooManyRequests(String::from(error_message));
}
"ValidationException" => {
return StopChannelError::Validation(error_message.to_string());
}
_ => {}
}
}
return StopChannelError::Unknown(res);
}
}
impl From<serde_json::error::Error> for StopChannelError {
fn from(err: serde_json::error::Error) -> StopChannelError {
StopChannelError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for StopChannelError {
fn from(err: CredentialsError) -> StopChannelError {
StopChannelError::Credentials(err)
}
}
impl From<HttpDispatchError> for StopChannelError {
fn from(err: HttpDispatchError) -> StopChannelError {
StopChannelError::HttpDispatch(err)
}
}
impl From<io::Error> for StopChannelError {
fn from(err: io::Error) -> StopChannelError {
StopChannelError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for StopChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopChannelError {
fn description(&self) -> &str {
match *self {
StopChannelError::BadGateway(ref cause) => cause,
StopChannelError::BadRequest(ref cause) => cause,
StopChannelError::Conflict(ref cause) => cause,
StopChannelError::Forbidden(ref cause) => cause,
StopChannelError::GatewayTimeout(ref cause) => cause,
StopChannelError::InternalServerError(ref cause) => cause,
StopChannelError::NotFound(ref cause) => cause,
StopChannelError::TooManyRequests(ref cause) => cause,
StopChannelError::Validation(ref cause) => cause,
StopChannelError::Credentials(ref err) => err.description(),
StopChannelError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
StopChannelError::ParseError(ref cause) => cause,
StopChannelError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateChannelError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
UnprocessableEntity(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateChannelError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateChannelError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return UpdateChannelError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return UpdateChannelError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return UpdateChannelError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return UpdateChannelError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return UpdateChannelError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return UpdateChannelError::InternalServerError(String::from(error_message));
}
"UnprocessableEntityException" => {
return UpdateChannelError::UnprocessableEntity(String::from(error_message));
}
"ValidationException" => {
return UpdateChannelError::Validation(error_message.to_string());
}
_ => {}
}
}
return UpdateChannelError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateChannelError {
fn from(err: serde_json::error::Error) -> UpdateChannelError {
UpdateChannelError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateChannelError {
fn from(err: CredentialsError) -> UpdateChannelError {
UpdateChannelError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateChannelError {
fn from(err: HttpDispatchError) -> UpdateChannelError {
UpdateChannelError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateChannelError {
fn from(err: io::Error) -> UpdateChannelError {
UpdateChannelError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateChannelError {
fn description(&self) -> &str {
match *self {
UpdateChannelError::BadGateway(ref cause) => cause,
UpdateChannelError::BadRequest(ref cause) => cause,
UpdateChannelError::Conflict(ref cause) => cause,
UpdateChannelError::Forbidden(ref cause) => cause,
UpdateChannelError::GatewayTimeout(ref cause) => cause,
UpdateChannelError::InternalServerError(ref cause) => cause,
UpdateChannelError::UnprocessableEntity(ref cause) => cause,
UpdateChannelError::Validation(ref cause) => cause,
UpdateChannelError::Credentials(ref err) => err.description(),
UpdateChannelError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
UpdateChannelError::ParseError(ref cause) => cause,
UpdateChannelError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateInputError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateInputError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateInputError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return UpdateInputError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return UpdateInputError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return UpdateInputError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return UpdateInputError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return UpdateInputError::GatewayTimeout(String::from(error_message));
}
"InternalServerErrorException" => {
return UpdateInputError::InternalServerError(String::from(error_message));
}
"NotFoundException" => {
return UpdateInputError::NotFound(String::from(error_message));
}
"ValidationException" => {
return UpdateInputError::Validation(error_message.to_string());
}
_ => {}
}
}
return UpdateInputError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateInputError {
fn from(err: serde_json::error::Error) -> UpdateInputError {
UpdateInputError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateInputError {
fn from(err: CredentialsError) -> UpdateInputError {
UpdateInputError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateInputError {
fn from(err: HttpDispatchError) -> UpdateInputError {
UpdateInputError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateInputError {
fn from(err: io::Error) -> UpdateInputError {
UpdateInputError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateInputError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateInputError {
fn description(&self) -> &str {
match *self {
UpdateInputError::BadGateway(ref cause) => cause,
UpdateInputError::BadRequest(ref cause) => cause,
UpdateInputError::Conflict(ref cause) => cause,
UpdateInputError::Forbidden(ref cause) => cause,
UpdateInputError::GatewayTimeout(ref cause) => cause,
UpdateInputError::InternalServerError(ref cause) => cause,
UpdateInputError::NotFound(ref cause) => cause,
UpdateInputError::Validation(ref cause) => cause,
UpdateInputError::Credentials(ref err) => err.description(),
UpdateInputError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
UpdateInputError::ParseError(ref cause) => cause,
UpdateInputError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateInputSecurityGroupError {
BadGateway(String),
BadRequest(String),
Conflict(String),
Forbidden(String),
GatewayTimeout(String),
InternalServerError(String),
NotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateInputSecurityGroupError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateInputSecurityGroupError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let error_type = match res.headers.get("x-amzn-errortype") {
Some(raw_error_type) => raw_error_type
.split(':')
.next()
.unwrap_or_else(|| "Unknown"),
_ => json
.get("code")
.or_else(|| json.get("Code"))
.and_then(|c| c.as_str())
.unwrap_or_else(|| "Unknown"),
};
let error_message = json
.get("message")
.or_else(|| json.get("Message"))
.and_then(|m| m.as_str())
.unwrap_or("");
match error_type {
"BadGatewayException" => {
return UpdateInputSecurityGroupError::BadGateway(String::from(error_message));
}
"BadRequestException" => {
return UpdateInputSecurityGroupError::BadRequest(String::from(error_message));
}
"ConflictException" => {
return UpdateInputSecurityGroupError::Conflict(String::from(error_message));
}
"ForbiddenException" => {
return UpdateInputSecurityGroupError::Forbidden(String::from(error_message));
}
"GatewayTimeoutException" => {
return UpdateInputSecurityGroupError::GatewayTimeout(String::from(
error_message,
));
}
"InternalServerErrorException" => {
return UpdateInputSecurityGroupError::InternalServerError(String::from(
error_message,
));
}
"NotFoundException" => {
return UpdateInputSecurityGroupError::NotFound(String::from(error_message));
}
"ValidationException" => {
return UpdateInputSecurityGroupError::Validation(error_message.to_string());
}
_ => {}
}
}
return UpdateInputSecurityGroupError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateInputSecurityGroupError {
fn from(err: serde_json::error::Error) -> UpdateInputSecurityGroupError {
UpdateInputSecurityGroupError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateInputSecurityGroupError {
fn from(err: CredentialsError) -> UpdateInputSecurityGroupError {
UpdateInputSecurityGroupError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateInputSecurityGroupError {
fn from(err: HttpDispatchError) -> UpdateInputSecurityGroupError {
UpdateInputSecurityGroupError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateInputSecurityGroupError {
fn from(err: io::Error) -> UpdateInputSecurityGroupError {
UpdateInputSecurityGroupError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateInputSecurityGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateInputSecurityGroupError {
fn description(&self) -> &str {
match *self {
UpdateInputSecurityGroupError::BadGateway(ref cause) => cause,
UpdateInputSecurityGroupError::BadRequest(ref cause) => cause,
UpdateInputSecurityGroupError::Conflict(ref cause) => cause,
UpdateInputSecurityGroupError::Forbidden(ref cause) => cause,
UpdateInputSecurityGroupError::GatewayTimeout(ref cause) => cause,
UpdateInputSecurityGroupError::InternalServerError(ref cause) => cause,
UpdateInputSecurityGroupError::NotFound(ref cause) => cause,
UpdateInputSecurityGroupError::Validation(ref cause) => cause,
UpdateInputSecurityGroupError::Credentials(ref err) => err.description(),
UpdateInputSecurityGroupError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateInputSecurityGroupError::ParseError(ref cause) => cause,
UpdateInputSecurityGroupError::Unknown(_) => "unknown error",
}
}
}
pub trait MediaLive {
fn batch_update_schedule(
&self,
input: BatchUpdateScheduleRequest,
) -> RusotoFuture<BatchUpdateScheduleResponse, BatchUpdateScheduleError>;
fn create_channel(
&self,
input: CreateChannelRequest,
) -> RusotoFuture<CreateChannelResponse, CreateChannelError>;
fn create_input(
&self,
input: CreateInputRequest,
) -> RusotoFuture<CreateInputResponse, CreateInputError>;
fn create_input_security_group(
&self,
input: CreateInputSecurityGroupRequest,
) -> RusotoFuture<CreateInputSecurityGroupResponse, CreateInputSecurityGroupError>;
fn create_tags(&self, input: CreateTagsRequest) -> RusotoFuture<(), CreateTagsError>;
fn delete_channel(
&self,
input: DeleteChannelRequest,
) -> RusotoFuture<DeleteChannelResponse, DeleteChannelError>;
fn delete_input(
&self,
input: DeleteInputRequest,
) -> RusotoFuture<DeleteInputResponse, DeleteInputError>;
fn delete_input_security_group(
&self,
input: DeleteInputSecurityGroupRequest,
) -> RusotoFuture<DeleteInputSecurityGroupResponse, DeleteInputSecurityGroupError>;
fn delete_reservation(
&self,
input: DeleteReservationRequest,
) -> RusotoFuture<DeleteReservationResponse, DeleteReservationError>;
fn delete_tags(&self, input: DeleteTagsRequest) -> RusotoFuture<(), DeleteTagsError>;
fn describe_channel(
&self,
input: DescribeChannelRequest,
) -> RusotoFuture<DescribeChannelResponse, DescribeChannelError>;
fn describe_input(
&self,
input: DescribeInputRequest,
) -> RusotoFuture<DescribeInputResponse, DescribeInputError>;
fn describe_input_security_group(
&self,
input: DescribeInputSecurityGroupRequest,
) -> RusotoFuture<DescribeInputSecurityGroupResponse, DescribeInputSecurityGroupError>;
fn describe_offering(
&self,
input: DescribeOfferingRequest,
) -> RusotoFuture<DescribeOfferingResponse, DescribeOfferingError>;
fn describe_reservation(
&self,
input: DescribeReservationRequest,
) -> RusotoFuture<DescribeReservationResponse, DescribeReservationError>;
fn describe_schedule(
&self,
input: DescribeScheduleRequest,
) -> RusotoFuture<DescribeScheduleResponse, DescribeScheduleError>;
fn list_channels(
&self,
input: ListChannelsRequest,
) -> RusotoFuture<ListChannelsResponse, ListChannelsError>;
fn list_input_security_groups(
&self,
input: ListInputSecurityGroupsRequest,
) -> RusotoFuture<ListInputSecurityGroupsResponse, ListInputSecurityGroupsError>;
fn list_inputs(
&self,
input: ListInputsRequest,
) -> RusotoFuture<ListInputsResponse, ListInputsError>;
fn list_offerings(
&self,
input: ListOfferingsRequest,
) -> RusotoFuture<ListOfferingsResponse, ListOfferingsError>;
fn list_reservations(
&self,
input: ListReservationsRequest,
) -> RusotoFuture<ListReservationsResponse, ListReservationsError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError>;
fn purchase_offering(
&self,
input: PurchaseOfferingRequest,
) -> RusotoFuture<PurchaseOfferingResponse, PurchaseOfferingError>;
fn start_channel(
&self,
input: StartChannelRequest,
) -> RusotoFuture<StartChannelResponse, StartChannelError>;
fn stop_channel(
&self,
input: StopChannelRequest,
) -> RusotoFuture<StopChannelResponse, StopChannelError>;
fn update_channel(
&self,
input: UpdateChannelRequest,
) -> RusotoFuture<UpdateChannelResponse, UpdateChannelError>;
fn update_input(
&self,
input: UpdateInputRequest,
) -> RusotoFuture<UpdateInputResponse, UpdateInputError>;
fn update_input_security_group(
&self,
input: UpdateInputSecurityGroupRequest,
) -> RusotoFuture<UpdateInputSecurityGroupResponse, UpdateInputSecurityGroupError>;
}
#[derive(Clone)]
pub struct MediaLiveClient {
client: Client,
region: region::Region,
}
impl MediaLiveClient {
pub fn new(region: region::Region) -> MediaLiveClient {
MediaLiveClient {
client: Client::shared(),
region: region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> MediaLiveClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
MediaLiveClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region: region,
}
}
}
impl MediaLive for MediaLiveClient {
fn batch_update_schedule(
&self,
input: BatchUpdateScheduleRequest,
) -> RusotoFuture<BatchUpdateScheduleResponse, BatchUpdateScheduleError> {
let request_uri = format!(
"/prod/channels/{channel_id}/schedule",
channel_id = input.channel_id
);
let mut request = SignedRequest::new("PUT", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result =
serde_json::from_slice::<BatchUpdateScheduleResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(BatchUpdateScheduleError::from_response(response))
}),
)
}
})
}
fn create_channel(
&self,
input: CreateChannelRequest,
) -> RusotoFuture<CreateChannelResponse, CreateChannelError> {
let request_uri = "/prod/channels";
let mut request = SignedRequest::new("POST", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<CreateChannelResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateChannelError::from_response(response))),
)
}
})
}
fn create_input(
&self,
input: CreateInputRequest,
) -> RusotoFuture<CreateInputResponse, CreateInputError> {
let request_uri = "/prod/inputs";
let mut request = SignedRequest::new("POST", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<CreateInputResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateInputError::from_response(response))),
)
}
})
}
fn create_input_security_group(
&self,
input: CreateInputSecurityGroupRequest,
) -> RusotoFuture<CreateInputSecurityGroupResponse, CreateInputSecurityGroupError> {
let request_uri = "/prod/inputSecurityGroups";
let mut request = SignedRequest::new("POST", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result =
serde_json::from_slice::<CreateInputSecurityGroupResponse>(&body).unwrap();
result
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateInputSecurityGroupError::from_response(response))
}))
}
})
}
fn create_tags(&self, input: CreateTagsRequest) -> RusotoFuture<(), CreateTagsError> {
let request_uri = format!(
"/prod/tags/{resource_arn}",
resource_arn = input.resource_arn
);
let mut request = SignedRequest::new("POST", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().map(|response| {
let result = ::std::mem::drop(response);
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateTagsError::from_response(response))),
)
}
})
}
fn delete_channel(
&self,
input: DeleteChannelRequest,
) -> RusotoFuture<DeleteChannelResponse, DeleteChannelError> {
let request_uri = format!("/prod/channels/{channel_id}", channel_id = input.channel_id);
let mut request = SignedRequest::new("DELETE", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<DeleteChannelResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteChannelError::from_response(response))),
)
}
})
}
fn delete_input(
&self,
input: DeleteInputRequest,
) -> RusotoFuture<DeleteInputResponse, DeleteInputError> {
let request_uri = format!("/prod/inputs/{input_id}", input_id = input.input_id);
let mut request = SignedRequest::new("DELETE", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<DeleteInputResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteInputError::from_response(response))),
)
}
})
}
fn delete_input_security_group(
&self,
input: DeleteInputSecurityGroupRequest,
) -> RusotoFuture<DeleteInputSecurityGroupResponse, DeleteInputSecurityGroupError> {
let request_uri = format!(
"/prod/inputSecurityGroups/{input_security_group_id}",
input_security_group_id = input.input_security_group_id
);
let mut request = SignedRequest::new("DELETE", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result =
serde_json::from_slice::<DeleteInputSecurityGroupResponse>(&body).unwrap();
result
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteInputSecurityGroupError::from_response(response))
}))
}
})
}
fn delete_reservation(
&self,
input: DeleteReservationRequest,
) -> RusotoFuture<DeleteReservationResponse, DeleteReservationError> {
let request_uri = format!(
"/prod/reservations/{reservation_id}",
reservation_id = input.reservation_id
);
let mut request = SignedRequest::new("DELETE", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result =
serde_json::from_slice::<DeleteReservationResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteReservationError::from_response(response))),
)
}
})
}
fn delete_tags(&self, input: DeleteTagsRequest) -> RusotoFuture<(), DeleteTagsError> {
let request_uri = format!(
"/prod/tags/{resource_arn}",
resource_arn = input.resource_arn
);
let mut request = SignedRequest::new("DELETE", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
for item in input.tag_keys.iter() {
params.put("tagKeys", item);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().map(|response| {
let result = ::std::mem::drop(response);
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteTagsError::from_response(response))),
)
}
})
}
fn describe_channel(
&self,
input: DescribeChannelRequest,
) -> RusotoFuture<DescribeChannelResponse, DescribeChannelError> {
let request_uri = format!("/prod/channels/{channel_id}", channel_id = input.channel_id);
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<DescribeChannelResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeChannelError::from_response(response))),
)
}
})
}
fn describe_input(
&self,
input: DescribeInputRequest,
) -> RusotoFuture<DescribeInputResponse, DescribeInputError> {
let request_uri = format!("/prod/inputs/{input_id}", input_id = input.input_id);
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<DescribeInputResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeInputError::from_response(response))),
)
}
})
}
fn describe_input_security_group(
&self,
input: DescribeInputSecurityGroupRequest,
) -> RusotoFuture<DescribeInputSecurityGroupResponse, DescribeInputSecurityGroupError> {
let request_uri = format!(
"/prod/inputSecurityGroups/{input_security_group_id}",
input_security_group_id = input.input_security_group_id
);
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result =
serde_json::from_slice::<DescribeInputSecurityGroupResponse>(&body)
.unwrap();
result
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeInputSecurityGroupError::from_response(response))
}))
}
})
}
fn describe_offering(
&self,
input: DescribeOfferingRequest,
) -> RusotoFuture<DescribeOfferingResponse, DescribeOfferingError> {
let request_uri = format!(
"/prod/offerings/{offering_id}",
offering_id = input.offering_id
);
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<DescribeOfferingResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeOfferingError::from_response(response))),
)
}
})
}
fn describe_reservation(
&self,
input: DescribeReservationRequest,
) -> RusotoFuture<DescribeReservationResponse, DescribeReservationError> {
let request_uri = format!(
"/prod/reservations/{reservation_id}",
reservation_id = input.reservation_id
);
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result =
serde_json::from_slice::<DescribeReservationResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeReservationError::from_response(response))
}),
)
}
})
}
fn describe_schedule(
&self,
input: DescribeScheduleRequest,
) -> RusotoFuture<DescribeScheduleResponse, DescribeScheduleError> {
let request_uri = format!(
"/prod/channels/{channel_id}/schedule",
channel_id = input.channel_id
);
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<DescribeScheduleResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeScheduleError::from_response(response))),
)
}
})
}
fn list_channels(
&self,
input: ListChannelsRequest,
) -> RusotoFuture<ListChannelsResponse, ListChannelsError> {
let request_uri = "/prod/channels";
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<ListChannelsResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListChannelsError::from_response(response))),
)
}
})
}
fn list_input_security_groups(
&self,
input: ListInputSecurityGroupsRequest,
) -> RusotoFuture<ListInputSecurityGroupsResponse, ListInputSecurityGroupsError> {
let request_uri = "/prod/inputSecurityGroups";
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result =
serde_json::from_slice::<ListInputSecurityGroupsResponse>(&body).unwrap();
result
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListInputSecurityGroupsError::from_response(response))
}))
}
})
}
fn list_inputs(
&self,
input: ListInputsRequest,
) -> RusotoFuture<ListInputsResponse, ListInputsError> {
let request_uri = "/prod/inputs";
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<ListInputsResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListInputsError::from_response(response))),
)
}
})
}
fn list_offerings(
&self,
input: ListOfferingsRequest,
) -> RusotoFuture<ListOfferingsResponse, ListOfferingsError> {
let request_uri = "/prod/offerings";
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.channel_configuration {
params.put("channelConfiguration", x);
}
if let Some(ref x) = input.codec {
params.put("codec", x);
}
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.maximum_bitrate {
params.put("maximumBitrate", x);
}
if let Some(ref x) = input.maximum_framerate {
params.put("maximumFramerate", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.resolution {
params.put("resolution", x);
}
if let Some(ref x) = input.resource_type {
params.put("resourceType", x);
}
if let Some(ref x) = input.special_feature {
params.put("specialFeature", x);
}
if let Some(ref x) = input.video_quality {
params.put("videoQuality", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<ListOfferingsResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListOfferingsError::from_response(response))),
)
}
})
}
fn list_reservations(
&self,
input: ListReservationsRequest,
) -> RusotoFuture<ListReservationsResponse, ListReservationsError> {
let request_uri = "/prod/reservations";
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.codec {
params.put("codec", x);
}
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.maximum_bitrate {
params.put("maximumBitrate", x);
}
if let Some(ref x) = input.maximum_framerate {
params.put("maximumFramerate", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.resolution {
params.put("resolution", x);
}
if let Some(ref x) = input.resource_type {
params.put("resourceType", x);
}
if let Some(ref x) = input.special_feature {
params.put("specialFeature", x);
}
if let Some(ref x) = input.video_quality {
params.put("videoQuality", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<ListReservationsResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListReservationsError::from_response(response))),
)
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError> {
let request_uri = format!(
"/prod/tags/{resource_arn}",
resource_arn = input.resource_arn
);
let mut request = SignedRequest::new("GET", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result =
serde_json::from_slice::<ListTagsForResourceResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn purchase_offering(
&self,
input: PurchaseOfferingRequest,
) -> RusotoFuture<PurchaseOfferingResponse, PurchaseOfferingError> {
let request_uri = format!(
"/prod/offerings/{offering_id}/purchase",
offering_id = input.offering_id
);
let mut request = SignedRequest::new("POST", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<PurchaseOfferingResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PurchaseOfferingError::from_response(response))),
)
}
})
}
fn start_channel(
&self,
input: StartChannelRequest,
) -> RusotoFuture<StartChannelResponse, StartChannelError> {
let request_uri = format!(
"/prod/channels/{channel_id}/start",
channel_id = input.channel_id
);
let mut request = SignedRequest::new("POST", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<StartChannelResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartChannelError::from_response(response))),
)
}
})
}
fn stop_channel(
&self,
input: StopChannelRequest,
) -> RusotoFuture<StopChannelResponse, StopChannelError> {
let request_uri = format!(
"/prod/channels/{channel_id}/stop",
channel_id = input.channel_id
);
let mut request = SignedRequest::new("POST", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<StopChannelResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopChannelError::from_response(response))),
)
}
})
}
fn update_channel(
&self,
input: UpdateChannelRequest,
) -> RusotoFuture<UpdateChannelResponse, UpdateChannelError> {
let request_uri = format!("/prod/channels/{channel_id}", channel_id = input.channel_id);
let mut request = SignedRequest::new("PUT", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<UpdateChannelResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateChannelError::from_response(response))),
)
}
})
}
fn update_input(
&self,
input: UpdateInputRequest,
) -> RusotoFuture<UpdateInputResponse, UpdateInputError> {
let request_uri = format!("/prod/inputs/{input_id}", input_id = input.input_id);
let mut request = SignedRequest::new("PUT", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result = serde_json::from_slice::<UpdateInputResponse>(&body).unwrap();
result
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateInputError::from_response(response))),
)
}
})
}
fn update_input_security_group(
&self,
input: UpdateInputSecurityGroupRequest,
) -> RusotoFuture<UpdateInputSecurityGroupResponse, UpdateInputSecurityGroupError> {
let request_uri = format!(
"/prod/inputSecurityGroups/{input_security_group_id}",
input_security_group_id = input.input_security_group_id
);
let mut request = SignedRequest::new("PUT", "medialive", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body == b"null" || body.is_empty() {
body = b"{}".to_vec();
}
debug!("Response body: {:?}", body);
debug!("Response status: {}", response.status);
let result =
serde_json::from_slice::<UpdateInputSecurityGroupResponse>(&body).unwrap();
result
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateInputSecurityGroupError::from_response(response))
}))
}
})
}
}
#[cfg(test)]
mod protocol_tests {}